summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts21
1 files changed, 17 insertions, 4 deletions
diff --git a/rules.ts b/rules.ts
index c3e8f33..9806289 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2441,11 +2441,19 @@ function end_pay_lords() {
goto_pay_vassals()
}
+function count_pay_lord_influence_cost() {
+ let n = 0
+ for (let lord of all_friendly_lords())
+ if (is_lord_on_map(lord) && is_lord_unfed(lord))
+ n += is_exile(get_lord_locale(lord)) ? 2 : 1
+ return n
+}
+
states.pay_lords = {
inactive: "Pay Lords",
prompt() {
- view.prompt = "Pay Lords in Influence or Disband them."
if (game.who === NOBODY) {
+ let total = count_pay_lord_influence_cost()
let done = true
for (let lord of all_friendly_lords()) {
if (is_lord_on_map(lord) && is_lord_unfed(lord)) {
@@ -2453,11 +2461,16 @@ states.pay_lords = {
done = false
}
}
- if (!done)
- view.actions.pay_all = 1
- if (done)
+ if (done) {
+ view.prompt = `Pay Lords: All done.`
view.actions.done = 1
+ } else {
+ view.prompt = `Pay Lords: Pay Influence or Disband your Lords. Pay ${total} for all Lords.`
+ view.actions.pay_all = 1
+ }
} else {
+ let total = is_exile(get_lord_locale(game.who)) ? 2 : 1
+ view.prompt = `Pay Lords: Pay ${total} Influence or Disband ${lord_name[game.who]}.`
view.actions.disband = 1
view.actions.pay = 1
}