summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-27 15:03:36 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-27 15:03:36 +0100
commitcaa2e7c3c80e8bd3e5d716ab610d36bfc8d43055 (patch)
tree6f7637f69dd368b20515c1f1bfa5113664400c87
parent16b1f95927d53fc85c9f14b33ee1f0356e89202f (diff)
downloadvotes-for-women-caa2e7c3c80e8bd3e5d716ab610d36bfc8d43055.tar.gz
in Strategy phase, show cost of match/defer/supersede
-rw-r--r--rules.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 9f58ac2..8e9cf10 100644
--- a/rules.js
+++ b/rules.js
@@ -816,9 +816,21 @@ states.strategy_phase = {
gen_action("done")
} else {
view.prompt = `Strategy: Suffragist committed ${pluralize(game.support_committed, 'button')}.`
- view.actions.defer = game.support_committed > 0
- view.actions.match = game.opposition_buttons >= game.support_committed
- view.actions.supersede = game.opposition_buttons > game.support_committed
+ view.actions.defer = 0
+ view.actions.match = 0
+ view.actions.supersede = 0
+ if (game.support_committed > 0) {
+ view.actions.defer = 1
+ view.prompt += ` Defer with 0 buttons.`
+ }
+ if (game.opposition_buttons >= game.support_committed) {
+ view.actions.match = 1
+ view.prompt += ` Match with ${pluralize(game.support_committed, 'button')}.`
+ }
+ if (game.opposition_buttons > game.support_committed) {
+ view.actions.supersede = 1
+ view.prompt += ` Supersede with ${pluralize(game.support_committed + 1, 'button')}.`
+ }
}
},
commit_1_button() {