summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-23 06:03:06 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-23 06:03:06 +0100
commita47216b161ef15762626d221bfcfe90947f0ce05 (patch)
treeabca9702c7d1942d12279918b2f450cf5687f99f
parent943839692c937960f479bae00ba393e25ae36560 (diff)
downloadvotes-for-women-a47216b161ef15762626d221bfcfe90947f0ce05.tar.gz
replace only in states with checks or xs
-rw-r--r--rules.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 1113c0e..1ff165c 100644
--- a/rules.js
+++ b/rules.js
@@ -1851,6 +1851,9 @@ function vm_replace() {
game.vm.what = vm_operand(1)
game.vm.count = vm_operand(2)
game.vm.cubes = vm_operand(3)
+ game.vm.us_states = anywhere()
+ set_filter(game.vm.us_states, s => is_green_check(s) || is_red_x(s))
+
if (!game.nineteenth_amendment || (game.vm.what === GREEN_CHECK && !count_green_checks()) || game.vm.what === RED_X && !count_red_xs()) {
vm_next()
} else {
@@ -2458,7 +2461,7 @@ states.vm_roll = {
} else {
if (player_buttons() > 0)
gen_action("reroll")
- gen_action("done")
+ gen_action("next")
}
},
roll() {
@@ -2468,7 +2471,7 @@ states.vm_roll = {
decrease_player_buttons(1)
game.vm.roll = roll_ndx(game.vm.count, game.vm.d, "B", "Re-rolled")
},
- done() {
+ next() {
vm_next()
}
}