summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-12-04 14:15:26 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-12-04 14:15:26 +0100
commitb4fbc9ef4ac0958c46b371a307d2fe77037d2580 (patch)
treeb8d02901160bdd42f5d14376474f796cf9e7c0de
parent1b54fb06b630dee302accfc2a7029bfb53efddd1 (diff)
downloadvotes-for-women-b4fbc9ef4ac0958c46b371a307d2fe77037d2580.tar.gz
give details on the target states when adding cubes
-rw-r--r--rules.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 007c935..b4fc337 100644
--- a/rules.js
+++ b/rules.js
@@ -2515,9 +2515,20 @@ states.vm_add_cubes = {
// event_prompt("Choose a cube color to add or remove an Opponent's cube.")
} else {
- event_prompt(`Add ${pluralize(game.vm.count, COLOR_NAMES[game.vm.cube_color] + ' cube')}`)
- if (game.vm.limit)
- view.prompt += `, no more than ${game.vm.limit} per state`
+ if (!game.vm.in_each_of && !game.vm.in_one_state_of_each_region && !game.vm.per_state_in_any_one_region) {
+ let remaining = game.vm.count - map_count(game.vm.added)
+ event_prompt(`Add ${pluralize(remaining, COLOR_NAMES[game.vm.cube_color] + ' cube')}`)
+ if (game.vm.limit)
+ view.prompt += `, no more than ${game.vm.limit} per State`
+ } else {
+ event_prompt(`Add ${pluralize(game.vm.count, COLOR_NAMES[game.vm.cube_color] + ' cube')}`)
+ if (game.vm.in_each_of)
+ view.prompt += ` in each of ${pluralize(game.vm.us_states.length, 'State')}`
+ if (game.vm.in_one_state_of_each_region)
+ view.prompt += ' in one State of each Region'
+ if (game.vm.per_state_in_any_one_region)
+ view.prompt += ' per State in any one Region'
+ }
view.prompt += '.'
// if (has_opponent_cubes)
// event_prompt(`Add a ${COLOR_NAMES[game.vm.cube_color]} cube or remove an Opponent's cube.`)
@@ -2627,7 +2638,7 @@ states.vm_remove_cubes = {
} else {
event_prompt(`Remove ${pluralize(game.vm.count, COLOR_NAMES[game.vm.cubes] + ' cube')}`)
if (game.vm.limit)
- view.prompt += `, no more than ${game.vm.limit} per state`
+ view.prompt += `, no more than ${game.vm.limit} per State`
view.prompt += '.'
}