From 9203c50ac1a3baf70c928429453ad5d8cfa11b00 Mon Sep 17 00:00:00 2001 From: teisuru <31881306+teisuru@users.noreply.github.com> Date: Sun, 18 Feb 2024 02:39:52 +0100 Subject: fix warden of the marchen event being played while not having any friendly locale = lords staying at same place --- rules.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index cf168ce..c99c2aa 100644 --- a/rules.js +++ b/rules.js @@ -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 -- cgit v1.2.3