summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-26 23:01:08 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-26 23:01:08 +0200
commit565d9fafd28352f21ba22e8c3b1cb970e9b00a58 (patch)
tree58678f5b84e30377e0d120fb9b884fa9a1228061
parent0d9c88060bc02a80354b8b60fc44553ac1f07b95 (diff)
downloadwashingtons-war-565d9fafd28352f21ba22e8c3b1cb970e9b00a58.tar.gz
Turn into overrun if Arnold is removed with battle event.
-rw-r--r--rules.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 9b20133..f3feaff 100644
--- a/rules.js
+++ b/rules.js
@@ -2693,6 +2693,18 @@ states.play_attacker_battle_card_confirm = {
view.actions.next = 1
},
next() {
+ // Check if Arnold's removal loads to overrun!
+ let to = game.move.to
+ let cu = game.move.carry_british + game.move.carry_american + game.move.carry_french
+ if (cu >= 4 && count_enemy_cu(to) === 1 && !has_enemy_general(to)) {
+ overrun(to)
+ if (game.active === P_BRITAIN && game.congress === to)
+ disperse_continental_congress()
+ delete game.combat
+ resume_moving()
+ return
+ }
+
clear_undo()
goto_play_defender_battle_card()
},