summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-04-11 21:39:58 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commitd0efeaef7e3f97841c67b8c8dca47a1a497f4fc7 (patch)
treea4812ad47501aab75725dda757435720fc45ab27 /rules.js
parent3665e99918aed9b2a76fa94efe470966958f60aa (diff)
downloadwilderness-war-d0efeaef7e3f97841c67b8c8dca47a1a497f4fc7.tar.gz
Don't remove forts u/c until after any eventual battles.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index ff0b83b..d9b0c38 100644
--- a/rules.js
+++ b/rules.js
@@ -3495,6 +3495,9 @@ function end_move_step(final=false, overrun=false) {
delete game.battle;
game.move.did_attempt_intercept = 0; // reset flag for next move step
+ if (force_has_drilled_troops(who))
+ remove_enemy_forts_uc_in_path(where);
+
if (final)
stop_move();
@@ -3657,12 +3660,6 @@ function gen_intercept() {
}
function goto_intercept() {
- let who = moving_piece();
-
- let here = moving_piece_space();
- if (force_has_drilled_troops(who))
- remove_enemy_forts_uc_in_path(here);
-
if (can_be_intercepted()) {
game.move.intercepting = 0;
clear_undo();