index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/modules/game/soldier.js')
-rw-r--r-- | src/modules/game/soldier.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js index c5b2323..ffb902b 100644 --- a/src/modules/game/soldier.js +++ b/src/modules/game/soldier.js @@ -115,11 +115,13 @@ export function removeClones(svg, counter) { } export function endMove(svg, counter) { - const proneCounter = counter.querySelector('[href="#counter-prone"]'); - - if (proneCounter) { - proneCounter.dataset.preexisting = ''; - } + Array.from(counter.children).forEach(n => { + if (n.classList.contains('removed')) { + n.remove(); + } else { + n.dataset.preexisting = ''; + } + }); svg.querySelector(traceSelector(counter))?.remove(); delete counter.dataset.previous; |