From 1e8f7fb9cce7fe6829c2cb807c0b7e7d18d27d20 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 19 Jun 2021 16:34:18 +0200 Subject: tripoli: Skip battle card play if no enemies remain during land battle. --- rules.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3