summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2024-02-27 10:04:10 +0100
committerteisuru <31881306+teisuru@users.noreply.github.com>2024-02-27 10:18:03 +0100
commit18948cf81df3217baa13bb3f483deeec023ac898 (patch)
tree6b770c3c620b65afb31778f9cdf506fa1cf40ae2 /rules.js
parent7cd89c4adde49cb3642f4d585818267c126e6402 (diff)
downloadplantagenet-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.js10
1 files changed, 10 insertions, 0 deletions
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]) {