summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-06 14:19:59 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commite6e9dbf6b3492f8fabbb84ca1eddc9d61f08654d (patch)
tree2f643e260e592f0325253441a09f15ed0f2fb878
parentb8156168b00bab32bfb92806b6ab35910d55e03d (diff)
downloadnevsky-e6e9dbf6b3492f8fabbb84ca1eddc9d61f08654d.tar.gz
Force picking Lower Lord before planning cards.
-rw-r--r--rules.js25
1 files changed, 15 insertions, 10 deletions
diff --git a/rules.js b/rules.js
index e318c38..07c31b1 100644
--- a/rules.js
+++ b/rules.js
@@ -4220,24 +4220,29 @@ states.campaign_plan = {
view.who = upper
view.actions.plan = []
- if (plan.length === 0)
+ if (plan.length === 0 && upper === NOBODY)
view.prompt = "Plan: Designate Lieutenants and build a Plan."
+ else if (plan.length === 0 && upper !== NOBODY)
+ view.prompt = `Plan: Select Lower Lord for ${lord_name[upper]}.`
else if (plan.length === max_plan_length())
view.prompt = "Plan: All done."
else
view.prompt = "Plan: Build a Plan."
- if (plan.length < max_plan_length()) {
- view.actions.end_plan = 0
- if (count_cards_in_plan(plan, NOBODY) < 3)
- gen_action_plan(NOBODY)
- for (let lord = first; lord <= last; ++lord) {
- if (is_lord_on_map(lord) && count_cards_in_plan(plan, lord) < 3)
- gen_action_plan(lord)
+ if (upper === NOBODY) {
+ if (plan.length < max_plan_length()) {
+ view.actions.end_plan = 0
+ if (count_cards_in_plan(plan, NOBODY) < 3)
+ gen_action_plan(NOBODY)
+ for (let lord = first; lord <= last; ++lord) {
+ if (is_lord_on_map(lord) && count_cards_in_plan(plan, lord) < 3)
+ gen_action_plan(lord)
+ }
+ } else {
+ view.actions.end_plan = 1
}
} else {
- if (upper === NOBODY)
- view.actions.end_plan = 1
+ view.actions.end_plan = 0
}
// Designate Lieutenants only if no plan started.