diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-02-11 22:54:17 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-02-11 22:54:44 +0100 |
commit | ca0b58349ef50110fc4c0543377c55b09e53c3d2 (patch) | |
tree | 714ad2bb88484b1a5bd696ebf311ffaa25b2e417 /rules.js | |
parent | e616aa0d9a3438d56c3e0264a0ca92fc70d23736 (diff) | |
download | plantagenet-ca0b58349ef50110fc4c0543377c55b09e53c3d2.tar.gz |
Blocked Ford.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 41 |
1 files changed, 32 insertions, 9 deletions
@@ -4058,14 +4058,6 @@ function prompt_held_event_intercept() { function can_play_held_event(c) { switch (c) { - - /* APPROACH - case EVENT_LANCASTER_BLOCKED_FORD: - return can_play_l_blocked_ford() - case EVENT_YORK_BLOCKED_FORD: - return can_play_y_blocked_ford() - */ - case EVENT_LANCASTER_ASPIELLES: return can_play_l_aspielles() case EVENT_LANCASTER_REBEL_SUPPLY_DEPOT: @@ -6583,11 +6575,42 @@ function end_parliaments_truce() { } function goto_blocked_ford() { - // The marching lord can now play blocked ford to prevent going into exile. + // The marching lord can now play blocked ford to prevent enemy going into exile. + if ( + has_enemy_lord(here) && ( + (game.active === YORK && could_play_card(EVENT_YORK_BLOCKED_FORD)) || + (game.active === LANCASTER && could_play_card(EVENT_LANCASTER_BLOCKED_FORD)) + ) + ) { + game.state = "blocked_ford" + return + } goto_exiles() } +states.blocked_ford = { + inactive: "Blocked Ford?", + prompt() { + view.prompt = "You may play Blocked Ford." + + if (game.active === YORK) + gen_action_card_if_held(EVENT_YORK_BLOCKED_FORD) + else + gen_action_card_if_held(EVENT_LANCASTER_BLOCKED_FORD) + + view.actions.pass = 1 + }, + card(c) { + play_held_event(c) + goto_battle() + }, + pass() { + set_active_enemy() + goto_exiles() + }, +} + // === Exile === function goto_exiles() { |