summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-03-26 12:54:52 +0200
committerTor Andersson <tor@ccxvii.net>2023-03-26 12:54:52 +0200
commitfe298c4c4c1f22fc0b302e9fa26164d73f00dfb7 (patch)
tree1731fed68d93001ff400226edb1fdb6dc8f6e938
parentddc73285302cc5dd706f16ac903f3ec2baa550a3 (diff)
downloadwilderness-war-fe298c4c4c1f22fc0b302e9fa26164d73f00dfb7.tar.gz
Reset "ambush" after battle (so it doesn't affect battles after overrun).
-rw-r--r--rules.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index d6d01b9..575a055 100644
--- a/rules.js
+++ b/rules.js
@@ -5186,6 +5186,9 @@ function goto_determine_winner() {
determine_winner_assault()
else
determine_winner_battle()
+
+ // Reset battle event flags that may occur again (in case of overrun)
+ delete game.events.ambush
}
function determine_winner_battle() {