summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-03-05 16:39:37 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commit1fbcc9d7f64f7d44c29ff6da2b5078901f331d1a (patch)
tree6ad0f872586e76bfc74db22b501e2130918722a8
parent12a5518760f3956f5fcda33d02b82cca78df8bb7 (diff)
downloadwilderness-war-1fbcc9d7f64f7d44c29ff6da2b5078901f331d1a.tar.gz
Add some missing clear_undo calls.
-rw-r--r--rules.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index cd58c3c..01f3bec 100644
--- a/rules.js
+++ b/rules.js
@@ -3380,6 +3380,7 @@ function end_intercept_success() {
function goto_declare_inside() {
let where = moving_piece_space();
if (has_unbesieged_enemy_units_that_did_not_intercept(where)) {
+ clear_undo();
if (is_fortress(where) || has_enemy_fort(where)) {
set_active_enemy();
game.state = 'declare_inside';
@@ -3422,6 +3423,7 @@ function goto_avoid_battle() {
if (has_unbesieged_enemy_units(from)) {
if (!game.move.did_attempt_intercept) {
if (can_enemy_avoid_battle(from)) {
+ clear_undo();
set_active_enemy();
game.move.avoiding = 0;
game.state = 'avoid_who';