Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-08-02 18:53:02 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-08-02 18:53:02 -0700
commit34ed6e2a9c0ef9d4354454394c52e412d8c34d51 (patch)
tree099fc56dc496e008e645c2d3ecf0c9e17afc46fc
parentb27a139c9ed426d7c9042b07d5a61ecddaee0175 (diff)
Add weapon counters for new weapons
-rw-r--r--public/assets/css/style.css1
-rw-r--r--public/assets/images/counters.svg42
-rw-r--r--public/assets/images/scenario-dragon_hunting.svg4
-rw-r--r--src/modules/gameboard.js6
-rw-r--r--src/modules/record_sheet.js2
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 @@
</g>
</g>
+ <g id="lmg" style="r: inherit;" class="weapon-symbol">
+ <use style="r: inherit;" href="#counter-base"/>
+ <g style="stroke: white; stroke-width: 0.5px; fill: none;">
+ <line x1="-2" y1="4.5" x2="2" y2="4.5"/>
+ <line x1="0" y1="-4.5" x2="0" y2="4.5"/>
+ <line x1="-2" y1="0.5" x2="2" y2="0.5"/>
+ <polyline points="-2,-3.25 0,-4.75 2,-3.25"/>
+ </g>
+ </g>
+
+ <g id="srm" style="r: inherit;" class="weapon-symbol">
+ <use style="r: inherit;" href="#counter-base"/>
+ <g style="stroke: white; stroke-width: 0.5px; fill: none;">
+ <line x1="0" y1="-4.75" x2="0" y2="5"/>
+ <line x1="-2" y1="0.5" x2="2" y2="0.5"/>
+ <path d="M -2,4.75 V -2.5 C -2,-5.5 2,-5.5 2,-2.5 V 4.75"/>
+ </g>
+ </g>
+
+ <g id="hsplaser" style="r: inherit;" class="weapon-symbol">
+ <use style="r: inherit;" href="#counter-base"/>
+ <g style="stroke: white; stroke-width: 0.5px; fill: none;">
+ <line x1="-2" y1="4.5" x2="2" y2="4.5"/>
+ <line x1="-2" y1="0" x2="2" y2="0"/>
+ <line x1="-2" y1="1" x2="2" y2="1"/>
+ <line x1="-2" y1="-1" x2="-2" y2="2"/>
+ <line x1="2" y1="-1" x2="2" y2="2"/>
+ <polyline points="0,-5 0,-3 -3,-2.5 3,-1.5 0,-1 0,2 -3,2.5, 3,3.5 0,4 0,4.5"/>
+ <polyline points="-2,-3.5 0,-5 2,-3.5"/>
+ </g>
+ </g>
+
+ <g id="gl" style="r: inherit;" class="weapon-symbol">
+ <use style="r: inherit;" href="#counter-base"/>
+ <g style="stroke: white; stroke-width: 0.5px; fill: none;">
+ <use href="#auto"/>
+ <circle cy="-2.25" r="1"/>
+ <line x1="0" y1="-5" x2="0" y2="4.5"/>
+ <line x1="-2" y1="4.5" x2="2" y2="4.5"/>
+ </g>
+ </g>
+
<g id="mech-template" style="pointer-events: none;">
<clipPath id="mech-template-clip-path" r="36.5">
<use href="#dead-zone"/>
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 @@
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -10 200 300">
+ <defs>
+ <use href="counters.svg#mech-template"/>
+ <use href="counters.svg#fallen-mech-template"/>
+ </defs>
<g class="gameboard">
<g class="grid">
<g class="mapsheets">
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'