summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-04 00:17:21 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-07 22:42:37 +0100
commit5efad42768a6bfaa775dccde8d1af4b92b2344c9 (patch)
tree1c7c269e814a602756c43d23c2685a6d287ce45a
parent91ed031f500e18f13ac90a3f54b47fbc77d07bd3 (diff)
downloadplantagenet-5efad42768a6bfaa775dccde8d1af4b92b2344c9.tar.gz
Fix Naval Blockade + Tax interaction.
The tax path searching did not correctly flag which seas were crossed, which caused the naval blockade code to not trigger.
-rw-r--r--rules.js2
-rw-r--r--rules.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 1cb8a64..64c2a23 100644
--- a/rules.js
+++ b/rules.js
@@ -3865,7 +3865,7 @@ function search_tax(result, start, lord, ships) {
for (let next of find_ports(here, lord)) {
if (!search_seen[next]) {
search_seen[next] = 1;
- search_dist[next] = next_dist;
+ search_dist[next] = next_dist | find_sea_mask(here) | find_sea_mask(next);
queue.push(next);
}
}
diff --git a/rules.ts b/rules.ts
index 964c82c..7c963f1 100644
--- a/rules.ts
+++ b/rules.ts
@@ -4674,7 +4674,7 @@ function search_tax(result, start: Locale, lord: Lord, ships: boolean) {
for (let next of find_ports(here, lord)) {
if (!search_seen[next]) {
search_seen[next] = 1
- search_dist[next] = next_dist
+ search_dist[next] = next_dist | find_sea_mask(here) | find_sea_mask(next)
queue.push(next)
}
}