diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-21 18:54:36 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:12:42 +0100 |
commit | 75d5899af2d766433c6d5bb60ac0787ac86462f4 (patch) | |
tree | b4e37006b8d668eed2c9eed834f1bcd1545e0ab0 /rules.js | |
parent | 6972035758926805911293ff6296186d0a1381f1 (diff) | |
download | shores-of-tripoli-75d5899af2d766433c6d5bb60ac0787ac86462f4.tar.gz |
tripoli: Tweak play of battle cards in land battle when no Tr infantry.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1542,9 +1542,6 @@ states.land_battle_bombardment_results = { } 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(); } @@ -2683,6 +2680,8 @@ function can_play_the_guns_of_tripoli() { } function can_play_mercenaries_desert() { + if (count_tripolitan_infantry(game.where) == 0) + return false; // no opposition left return (count_arab_infantry(game.where) > 0) && is_not_removed(MERCENARIES_DESERT); } @@ -2706,10 +2705,14 @@ function can_play_send_in_the_marines() { } function can_play_lieutenant_obannon_leads_the_charge() { + if (count_tripolitan_infantry(game.where) == 0) + return false; // no opposition left return (count_american_marines(game.where) > 0) && is_not_removed(LIEUTENANT_OBANNON_LEADS_THE_CHARGE); } function can_play_marine_sharpshooters() { + if (count_tripolitan_infantry(game.where) == 0) + return false; // no opposition left return (count_american_marines(game.where) > 0) && is_not_removed(MARINE_SHARPSHOOTERS); } |