Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-04-30 10:17:45 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-04-30 10:17:45 -0700
commit82d3a4b415ba920176058d615b697e84a49adabc (patch)
tree7bc250d9f332689e3dc0c4e7aec5949175a0f9fa /src/modules/game
parenta4888a3e0905f3561781cb0ef4686befc0dff122 (diff)
Create record sheet dynamically when map is loaded
Diffstat (limited to 'src/modules/game')
-rw-r--r--src/modules/game/firing_arc.js4
-rw-r--r--src/modules/game/soldier.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/game/firing_arc.js b/src/modules/game/firing_arc.js
index 817bc44..cea8bd0 100644
--- a/src/modules/game/firing_arc.js
+++ b/src/modules/game/firing_arc.js
@@ -13,8 +13,8 @@ const horzToVertDistRatio = 2 * Math.sqrt(3) / 3,
},
firingArcVisibility = {
- davion: false,
- liao: false
+ defender: false,
+ attacker: false
},
clippedFiringArcRadius = 25;
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js
index 922faca..b01ed15 100644
--- a/src/modules/game/soldier.js
+++ b/src/modules/game/soldier.js
@@ -29,6 +29,10 @@ function getCounterAndClones(svg, counter) {
return svg.querySelectorAll(`.counter${dataSelector(counter)}`);
}
+export function getAllCounters(container) {
+ return container.querySelectorAll('g.counter[data-allegiance][data-number]');
+}
+
export function getCounter(svg, selected) {
return svg.querySelector(`.counter${dataSelector(selected)}:not(.clone)`);
}