Web Dev Solutions

Catalin Mititiuc

From 34ed6e2a9c0ef9d4354454394c52e412d8c34d51 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Fri, 2 Aug 2024 18:53:02 -0700 Subject: Add weapon counters for new weapons --- public/assets/css/style.css | 1 + public/assets/images/counters.svg | 42 ++++++++++++++++++++++++ public/assets/images/scenario-dragon_hunting.svg | 4 +++ src/modules/gameboard.js | 6 ++-- src/modules/record_sheet.js | 2 +- 5 files changed, 51 insertions(+), 4 deletions(-) diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 213926f..f3dbc4d 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -268,6 +268,7 @@ div#content { #record-sheet .records { overflow-y: auto; + overflow-x: hidden; } .soldier-record { diff --git a/public/assets/images/counters.svg b/public/assets/images/counters.svg index ab525d9..d57bffb 100644 --- a/public/assets/images/counters.svg +++ b/public/assets/images/counters.svg @@ -72,6 +72,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/scenario-dragon_hunting.svg b/public/assets/images/scenario-dragon_hunting.svg index 0f728c5..40f0a87 100644 --- a/public/assets/images/scenario-dragon_hunting.svg +++ b/public/assets/images/scenario-dragon_hunting.svg @@ -1,5 +1,9 @@ + + + + diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index d386855..74e5582 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -371,9 +371,9 @@ export function start(el) { // debug // // Add a trooper counter //const defender = { dataset: { allegiance: 'defender', number: 1, squad: 2 }}; - //const cell2 = getCell(-1, 0, 1, 0); + //const cell2 = getCell(-5, 10, -5, 0); //frontmost.setAttributeNS(null, 'transform', cell2.getAttributeNS(null, 'transform')); - //const trooper2 = soldier.createCounter(defender, 'blazer'); + //const trooper2 = soldier.createCounter(defender, 'gl'); //frontmostStore.set(trooper2, cell2); //frontmost.append(trooper2); //cell2.classList.add('hover'); @@ -381,7 +381,7 @@ export function start(el) { //const cell = getCell(0, 0, 0, 0); //const attacker = { dataset: { allegiance: 'attacker', number: 1, squad: 1 }}; //const trooper = soldier.createCounter(attacker, 'blazer'); - //soldier.place(svg, trooper, cell); + //soldier.place(svg, trooper2, cell2); // Add some counters in an unoccupied cell //const countersCell = getCell(-1, 1, 0, 0); diff --git a/src/modules/record_sheet.js b/src/modules/record_sheet.js index 384d5d1..01a9051 100644 --- a/src/modules/record_sheet.js +++ b/src/modules/record_sheet.js @@ -45,7 +45,7 @@ const weapons = { longRange: '31-84' }, gl: { - name: 'Grenade Launcher', + name: 'SMG w/Grenade Launcher', damage: '4/2/1 L', shortRange: '1-10', longRange: '11-24' -- cgit v1.2.3