From e0a7c43aac55aff47325366dfc810eb843a8ff0e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 5 Jan 2023 19:47:36 +0100 Subject: Fix Field Organ. --- rules.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index 9d95887..394f01d 100644 --- a/rules.js +++ b/rules.js @@ -6390,6 +6390,13 @@ function could_play_card(c) { return true } +function has_lords_in_battle() { + for (let p = 0; p < 12; ++p) + if (is_friendly_lord(game.battle.array[p])) + return true + return has_reserves() +} + function can_play_battle_events() { if (!game.battle.storm) { if (game.active === TEUTONS) { @@ -6429,7 +6436,7 @@ function can_play_battle_events() { // Battle or Storm if (game.active === TEUTONS) { if (could_play_card(EVENT_TEUTONIC_FIELD_ORGAN)) - if (has_reserves()) + if (has_lords_in_battle()) return true } @@ -6444,7 +6451,8 @@ function prompt_battle_events() { if (!is_winter()) gen_action_card_if_held(EVENT_TEUTONIC_BRIDGE) } - gen_action_card_if_held(EVENT_TEUTONIC_FIELD_ORGAN) + if (has_lords_in_battle()) + gen_action_card_if_held(EVENT_TEUTONIC_FIELD_ORGAN) } if (game.active === RUSSIANS) { -- cgit v1.2.3