diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-01-04 16:50:23 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | 3953c85dc7d7eb4d4cc0d29cb7c0e7355ed8f56f (patch) | |
tree | 98df77c2c6912f298cee0ccae0408927c7cc0e54 /rules.js | |
parent | ef78c9bf5a40b8be033a4479a60261da743feeec (diff) | |
download | table-battles-3953c85dc7d7eb4d4cc0d29cb7c0e7355ed8f56f.tar.gz |
Fix S41 Prince Eugene stick shifting check.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1832,6 +1832,15 @@ function side_get_wild_die_card(p) { return -1 } +function has_any_red_normal_cards() { + for (let c of game.front[0]) + if (data.cards[c].wing === RED && !data.cards[c].special) + return true + for (let c of game.front[1]) + if (data.cards[c].wing === RED && !data.cards[c].special) + return true +} + function side_has_wild_die(p) { return side_get_wild_die_card(p) >= 0 } @@ -2065,7 +2074,7 @@ function can_take_any_action() { if (game.scenario === S41_BLENHEIM_SCENARIO) { if (player_index() === 0) { - if (has_any_dice_on_card(S41_PRINCE_EUGENE)) + if (has_any_dice_on_card(S41_PRINCE_EUGENE) && has_any_red_normal_cards()) return true } } @@ -2229,7 +2238,7 @@ states.action = { if (game.scenario === S41_BLENHEIM_SCENARIO) { if (player_index() === 0) { - if (has_any_dice_on_card(S41_PRINCE_EUGENE)) + if (has_any_dice_on_card(S41_PRINCE_EUGENE) && has_any_red_normal_cards()) gen_action_card(S41_PRINCE_EUGENE) } } |