diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -4559,6 +4559,14 @@ function can_play_coehorns_in_attack() { return false } +function can_play_coehorns_in_defense() { + // If played during siege, this will be false during assault because the card is in discard. + // There's no risk of being prompted twice. + if (is_card_available_for_defender(COEHORNS)) + return game.battle.assault && has_friendly_regulars(game.battle.where) + return false +} + function can_play_fieldworks_in_attack() { if (!game.battle.assault) { if (is_card_available_for_attacker(FIELDWORKS_1) || is_card_available_for_attacker(FIELDWORKS_2)) { @@ -4595,7 +4603,7 @@ function goto_battle_attacker_events() { function goto_battle_defender_events() { set_active(game.battle.defender) - if (can_play_ambush_in_defense() || can_play_fieldworks_in_defense()) { + if (can_play_ambush_in_defense() || can_play_coehorns_in_defense() || can_play_fieldworks_in_defense()) { game.state = 'defender_events' } else { goto_battle_roll() @@ -4704,6 +4712,14 @@ states.defender_events = { else dont_have.push('"Ambush"') } + if (can_play_coehorns_in_defense()) { + if (player.hand.includes(COEHORNS)) { + gen_action('play_event', COEHORNS) + have.push('"Coehorns"') + } else { + dont_have.push('"Coehorns"') + } + } if (can_play_fieldworks_in_defense()) { let x = false if (player.hand.includes(FIELDWORKS_1)) { @@ -4740,6 +4756,9 @@ states.defender_events = { else game.events.ambush = game.active break + case COEHORNS: + game.events.coehorns = game.active + break case FIELDWORKS_1: case FIELDWORKS_2: place_fieldworks(game.battle.where) |