diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-02-18 02:39:52 +0100 |
---|---|---|
committer | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-02-18 02:39:52 +0100 |
commit | 9203c50ac1a3baf70c928429453ad5d8cfa11b00 (patch) | |
tree | 29a375ede60a08dbea6aed827be9cfd348b590d1 /rules.js | |
parent | c7582be76c4f14f8c154ae1025bd06462806802f (diff) | |
download | plantagenet-9203c50ac1a3baf70c928429453ad5d8cfa11b00.tar.gz |
fix warden of the marchen
event being played while not having any friendly locale = lords staying at same place
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -5873,7 +5873,7 @@ function can_action_parley_command() { if (game.actions <= 0) return false - if (is_lord_at_sea(game.active)) + if (is_lord_at_sea(game.command)) return false if (!is_first_action() && game.active === YORK && is_event_in_play(EVENT_LANCASTER_NEW_ACT_OF_PARLIAMENT)) @@ -8209,6 +8209,16 @@ function prompt_battle_events_death() { // === EVENT : WARDEN OF THE MARCHES === function can_play_warden_of_the_marches() { + // TOOD : Maybe a bug with blocked ford/exile ? + let can_play = false + for (let loc = first_locale; loc <= last_locale; loc++) { + if (is_friendly_locale(loc) && is_north(loc) && loc !== game.battle.where) { + can_play = true + } + } + if (!can_play) { + return false + } // if blocked ford then flee if (is_north(game.where)) return true |