summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2024-02-12 12:30:10 +0100
committerteisuru <31881306+teisuru@users.noreply.github.com>2024-02-12 12:30:10 +0100
commitc391c4c559814fa33436b49a71a85dac60a3b6fa (patch)
tree4ec59d766a6dd129b2cef39a66d0e802fcdbd004 /rules.js
parent7d3d1766a568be4d5683ea2ac4f483001262fcd7 (diff)
downloadplantagenet-c391c4c559814fa33436b49a71a85dac60a3b6fa.tar.gz
fix Y10 Tax collectors
bugging when there was many taxable cases
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index c8b81c3..246958b 100644
--- a/rules.js
+++ b/rules.js
@@ -3559,7 +3559,7 @@ function can_action_tax_collectors(lord) {
let here = get_lord_locale(lord)
if (can_tax_collectors_at(here, lord))
return true
- return search_tax_collectors(false, here)
+ return search_tax_collectors(false, here, lord)
}
function can_tax_collectors_at(here, lord) {
@@ -3581,7 +3581,7 @@ function can_tax_collectors_at(here, lord) {
return false
}
-function search_tax_collectors(result, start) {
+function search_tax_collectors(result, start, lord) {
let ships = get_shared_assets(start, SHIP)
search_seen.fill(0)
@@ -3591,8 +3591,8 @@ function search_tax_collectors(result, start) {
while (queue.length > 0) {
let here = queue.shift()
- if (is_lord_on_map(game.who) && !is_lord_on_calendar(game.who)) {
- if (can_tax_collectors_at(here, game.who)) {
+ if (is_lord_on_map(lord) && !is_lord_on_calendar(lord)) {
+ if (can_tax_collectors_at(here, lord)) {
if (result)
set_add(result, here)
else
@@ -3652,7 +3652,7 @@ states.double_tax_collectors = {
prompt() {
view.prompt = "Tax: Select the location to tax for double."
if (game.where === NOWHERE) {
- for (let loc of search_tax_collectors([], get_lord_locale(game.who)))
+ for (let loc of search_tax_collectors([], get_lord_locale(game.who), game.who))
gen_action_locale(loc)
} else {
view.prompt = `Tax: Attempting to tax ${data.locales[game.where].name}. `