diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-27 16:55:19 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-30 21:59:25 +0200 |
commit | a22eb4ab7c82d41b44da9d646776a08b87ca636c (patch) | |
tree | 59f4baf05e84c7801743e316a0af153b19e31829 | |
parent | 3cd960930b75a45acdc331fa1b97639d96e4a777 (diff) | |
download | friedrich-a22eb4ab7c82d41b44da9d646776a08b87ca636c.tar.gz |
log actual number of troops lost
-rw-r--r-- | rules.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2416,15 +2416,14 @@ function remove_stack_from_combat(s) { } function goto_retreat() { - let hits = Math.abs(game.count) + let lost = Math.abs(game.count) + let hits = lost let loser = get_loser() // no more fighting for the loser remove_stack_from_combat(loser) - log("P" + get_supreme_commander(loser) + " lost " + hits + " troops.") - // apply hits for (let i = game.selected.length - 1; i >= 0 && hits > 0; --i) { let p = game.selected[i] @@ -2442,6 +2441,8 @@ function goto_retreat() { } } + log("P" + get_supreme_commander(loser) + " lost " + (lost-hits) + " troops") + resume_retreat() } |