summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-01-24 17:43:30 +0100
committerTor Andersson <tor@ccxvii.net>2025-01-24 17:43:30 +0100
commit304634d0d4dfed245730abbb1992e6c71ba3e826 (patch)
tree3893f8e384bc5d86bad10c5af36f307bfd78d916
parent48336561d589cf2c247c794a0f78098d80b3abcf (diff)
downloadwashingtons-war-304634d0d4dfed245730abbb1992e6c71ba3e826.tar.gz
fix glitch with flagging CU as moved if moving general is removed.HEADmaster
-rw-r--r--rules.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 5967414..554630b 100644
--- a/rules.js
+++ b/rules.js
@@ -2352,8 +2352,10 @@ function resume_moving() {
}
function end_move(stop) {
- let where = location_of_general(game.move.who)
- if (has_general_moved(game.move.who)) {
+ let where = game.move.to
+
+ // if moved or eliminated!
+ if (has_general_moved(game.move.who) || !is_general_on_map(game.move.who)) {
mark_moved_british_cu(where, game.move.carry_british)
mark_moved_american_cu(where, game.move.carry_american)
mark_moved_french_cu(where, game.move.carry_french)