From 18948cf81df3217baa13bb3f483deeec023ac898 Mon Sep 17 00:00:00 2001 From: teisuru <31881306+teisuru@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:04:10 +0100 Subject: fix bug naval_blockade naval_blockade not searching both by land and sea --- rules.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rules.js b/rules.js index 07fd4d7..f0282a9 100644 --- a/rules.js +++ b/rules.js @@ -5973,6 +5973,7 @@ function goto_parley() { function end_parley() { pop_state() + game.flags.naval_blockade = 0 game.where = NOWHERE game.parley = NOTHING if (game.flags.free_parley_henry > 0 && game.who === LORD_HENRY_VI) { @@ -7596,6 +7597,15 @@ function parley_through_sea(start, locale) { } } } + } + } + queue = [ start ] + while (queue.length > 0) { + let here = queue.shift() + let dist = search_dist[here] + let next_dist = dist + 1 + + if (is_friendly_locale(here)) { if (ships > 0 && is_seaport(here)) { for (let next of find_ports(here)) { if (!search_seen[next]) { -- cgit v1.2.3