From 3953c85dc7d7eb4d4cc0d29cb7c0e7355ed8f56f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 4 Jan 2024 16:50:23 +0100 Subject: Fix S41 Prince Eugene stick shifting check. --- rules.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index 01270f3..a5ab23f 100644 --- a/rules.js +++ b/rules.js @@ -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) } } -- cgit v1.2.3