From 53e7c53467c9e6084356d651f877c85347f9d890 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:09:57 +0100 Subject: Create toggle for Purple / Yellow cube color selection --- rules.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rules.js b/rules.js index cef860a..8a167e2 100644 --- a/rules.js +++ b/rules.js @@ -2278,12 +2278,13 @@ states.vm_add_cubes = { inactive: "add a cube.", prompt() { if (game.vm.cubes === PURPLE_OR_YELLOW) { - gen_action("purple") - gen_action("yellow") + view.actions.purple = (game.vm.cube_color !== PURPLE) + view.actions.yellow = (game.vm.cube_color !== YELLOW) // Alternatively allow a click on a campaigner to switch color for_each_player_campaigner(c => { - gen_action_campaigner(c) + if (game.vm.cube_color !== campaigner_color(c)) + gen_action_campaigner(c) }) } -- cgit v1.2.3