From 2d4c8fe1c5f1ac69f9a3e29c6367e51f007668df Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 20 Apr 2024 16:04:43 +0200 Subject: Fix Parley at campaign check. Can only parley remotely at friendly locale. Triggered by London for York event when Lancastrian at Yorkist London. --- rules.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rules.ts b/rules.ts index 4df6e08..7be2e32 100644 --- a/rules.ts +++ b/rules.ts @@ -4390,14 +4390,17 @@ function can_action_parley_campaign() { if (can_parley_at(here)) return true - for (let next of data.locales[here].adjacent) - if (can_parley_at(next)) - return true - - if (is_exile(here) && count_shared_ships(here, false) > 0) - for (let next of find_ports(here, game.command)) + if (is_friendly_locale(here)) { + for (let next of data.locales[here].adjacent) { if (can_parley_at(next)) return true + } + + if (is_exile(here) && count_shared_ships(here, false) > 0) + for (let next of find_ports(here, game.command)) + if (can_parley_at(next)) + return true + } return false } -- cgit v1.2.3