From 304634d0d4dfed245730abbb1992e6c71ba3e826 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 24 Jan 2025 17:43:30 +0100 Subject: fix glitch with flagging CU as moved if moving general is removed. --- rules.js | 6 ++++-- 1 file 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) -- cgit v1.2.3