summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-24 12:58:06 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-24 12:58:06 +0100
commitf6b23c2e03ba1d38cfa392a9d1d069c5af1a6473 (patch)
tree0bbb8be92f9b572c9238196475c7a70856972d52
parent7f68a08edf0517d166c84daefb1e29eeb27c89b7 (diff)
downloadvotes-for-women-f6b23c2e03ba1d38cfa392a9d1d069c5af1a6473.tar.gz
switch cube color by clicking on campaigner
-rw-r--r--rules.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index cd90ae2..4e961de 100644
--- a/rules.js
+++ b/rules.js
@@ -1019,7 +1019,7 @@ states.operations_phase = {
},
card_event(c) {
push_undo()
- log(`C${c} - Event`)
+ log_h3(`C${c} - Event`)
if (has_extra_event_cost())
decrease_player_buttons(1)
log_br()
@@ -1027,19 +1027,19 @@ states.operations_phase = {
},
card_campaigning(c) {
push_undo()
- log(`C${c} - Campaigning`)
+ log_h3(`C${c} - Campaigning`)
log_br()
goto_campaigning(c)
},
card_organizing(c) {
push_undo()
- log(`C${c} - Organizing`)
+ log_h3(`C${c} - Organizing`)
log_br()
goto_organizing(c)
},
card_lobbying(c) {
push_undo()
- log(`C${c} - Lobbying`)
+ log_h3(`C${c} - Lobbying`)
log_br()
goto_lobbying(c)
},
@@ -2264,6 +2264,11 @@ states.vm_add_cubes = {
if (game.vm.cubes === PURPLE_OR_YELLOW) {
gen_action("purple")
gen_action("yellow")
+
+ // Alternatively allow a click on a campaigner to switch color
+ for_each_player_campaigner(c => {
+ gen_action_campaigner(c)
+ })
}
let has_opponent_cubes = false
@@ -2285,9 +2290,9 @@ states.vm_add_cubes = {
if (!game.vm.cube_color) {
if (!has_opponent_cubes)
- event_prompt("Choose a cube to add.")
+ event_prompt("Choose a cube color to add.")
else
- event_prompt("Choose a cube to add or remove an Opponent's cube.")
+ event_prompt("Choose a cube color to add or remove an Opponent's cube.")
} else {
if (!has_opponent_cubes)
event_prompt(`Add a ${COLOR_NAMES[game.vm.cube_color]} cube.`)
@@ -2301,6 +2306,9 @@ states.vm_add_cubes = {
yellow() {
game.vm.cube_color = YELLOW
},
+ campaigner(c) {
+ game.vm.cube_color = campaigner_color(c)
+ },
purple_cube(s) {
push_undo()
remove_cube(PURPLE, s)