diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-12-08 18:41:10 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-12-08 18:41:10 +0100 |
commit | dd918e42f7b872457c6811659d66fde48c538c85 (patch) | |
tree | 24ffc6b753fb846f629f6bde97f16921a90f4cf0 /rules.js | |
parent | 5b5883d5b9bc6deecc28d0ff87b2dd321314d964 (diff) | |
download | votes-for-women-dd918e42f7b872457c6811659d66fde48c538c85.tar.gz |
fix The Great 1906 San Francisco Earthquake
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -2689,7 +2689,10 @@ states.vm_remove_cubes = { inactive: "remove a cube.", prompt() { if (game.vm.all) { - event_prompt(`Remove all ${COLOR_NAMES[game.vm.cubes]} cubes.`) + if (game.vm.cubes === PURPLE_OR_YELLOW) + event_prompt(`Remove all Purple and Yellow cubes.`) + else + event_prompt(`Remove all ${COLOR_NAMES[game.vm.cubes]} cubes.`) } else { event_prompt(`Remove ${pluralize(game.vm.count, COLOR_NAMES[game.vm.cubes] + ' cube')}`) if (game.vm.limit) @@ -2697,14 +2700,24 @@ states.vm_remove_cubes = { view.prompt += '.' } + let can_remove = false for (let s of game.vm.us_states) { - if ((game.vm.cubes === PURPLE || game.vm.cubes === PURPLE_OR_YELLOW) && purple_cubes(s)) + if ((game.vm.cubes === PURPLE || game.vm.cubes === PURPLE_OR_YELLOW) && purple_cubes(s)) { gen_action_purple_cube(s) - if ((game.vm.cubes === YELLOW || game.vm.cubes === PURPLE_OR_YELLOW) && yellow_cubes(s)) + can_remove = true + } + if ((game.vm.cubes === YELLOW || game.vm.cubes === PURPLE_OR_YELLOW) && yellow_cubes(s)) { gen_action_yellow_cube(s) - if (game.vm.cubes === RED && red_cubes(s)) + can_remove = true + } + if (game.vm.cubes === RED && red_cubes(s)) { gen_action_red_cube(s) + can_remove = true + } } + + if (!can_remove) + gen_action("next") }, purple_cube(s) { push_undo() @@ -2720,6 +2733,9 @@ states.vm_remove_cubes = { push_undo() remove_cube(RED, s) after_vm_remove_cube(s) + }, + next() { + vm_next() } } |