summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-09-04 11:51:28 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit0ac7b984e7faa6ed5b14a37cabc74fdfb34f30ca (patch)
treec2275cbdf7526e10f866e95e818bdd48ce0c8609
parent49f732f777466d3b187c24a870112c7483a5a913 (diff)
downloadplantagenet-0ac7b984e7faa6ed5b14a37cabc74fdfb34f30ca.tar.gz
sail bugfix
removing replacing_get_lord_assets by group assets
-rw-r--r--rules.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 9fa4146..db0b361 100644
--- a/rules.js
+++ b/rules.js
@@ -3526,7 +3526,7 @@ function can_action_forage() {
if (game.actions < 1)
return false
let here = get_lord_locale(game.command)
- if (has_exhausted_marker(here))
+ if (has_exhausted_marker(here) || is_sea(here))
return false
return true
}
@@ -3561,8 +3561,6 @@ function goto_tax() {
log(`Taxed %${here}.`)
-
-
if (is_town(here) || is_fortress(here) || is_harlech(here))
add_lord_assets(game.command, COIN, 1)
else if (is_city(here))
@@ -3679,7 +3677,7 @@ states.sail = {
view.prompt = `Sailing with ${ships} Ships. Please discard ${overflow_cart} Cart`
if (cart > 0) {
for (let lord of game.group) {
- if (get_lord_assets(lord, cart) > 0);
+ if (get_lord_assets(lord, CART) > 0)
gen_action_cart(lord)
}
}
@@ -3688,10 +3686,13 @@ states.sail = {
view.prompt = `Sailing with ${ships} Ships. Please discard ${overflow_prov} Provender`
if (prov > 0) {
for (let lord of game.group) {
- if (get_lord_assets(lord, prov) > 0);
+ if (get_lord_assets(lord, PROV) > 0)
gen_action_prov(lord)
}
}
+ }
+ else {
+ view.prompt = 'ERROR'
}
},
prov: drop_prov,