diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-02-27 10:04:10 +0100 |
---|---|---|
committer | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-02-27 10:18:03 +0100 |
commit | 18948cf81df3217baa13bb3f483deeec023ac898 (patch) | |
tree | 6b770c3c620b65afb31778f9cdf506fa1cf40ae2 /rules.js | |
parent | 7cd89c4adde49cb3642f4d585818267c126e6402 (diff) | |
download | plantagenet-18948cf81df3217baa13bb3f483deeec023ac898.tar.gz |
fix bug naval_blockade
naval_blockade not searching both by land and sea
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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]) { |