summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-19 16:34:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commit1e8f7fb9cce7fe6829c2cb807c0b7e7d18d27d20 (patch)
tree9c13ea10bb239b41e3551f5054879b16464f89b3 /rules.js
parent9f9aec48dec4797f6276e3e71a7a3a6d1cf651dc (diff)
downloadshores-of-tripoli-1e8f7fb9cce7fe6829c2cb807c0b7e7d18d27d20.tar.gz
tripoli: Skip battle card play if no enemies remain during land battle.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index b6bb546..8d64940 100644
--- a/rules.js
+++ b/rules.js
@@ -1517,10 +1517,17 @@ states.land_battle_bombardment_results = {
log("Land Battle in " + SPACES[game.where] + ".");
- goto_land_battle_american_card();
+ goto_land_battle();
},
}
+function goto_land_battle() {
+ // No opposition left -- skip card play and go to end.
+ if (count_tripolitan_infantry(game.where) == 0)
+ return goto_land_battle_round();
+ goto_land_battle_american_card();
+}
+
function goto_land_battle_american_card() {
game.marine_sharpshooters = false;
game.lieutenant_obannon_leads_the_charge = false;