From c459ed62268bb033aabc0dc41fa59c595fec0e4e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 25 May 2023 13:40:37 +0200 Subject: Add confirmation step when placing cube from momentum trigger. --- rules.js | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/rules.js b/rules.js index f967449..7c7f505 100644 --- a/rules.js +++ b/rules.js @@ -1,10 +1,5 @@ "use strict" -// TODO: clean up push/clear_undo -// TODO: clean up prompts -// TODO: event prompts -// TODO: clean up logging - const COMMUNE = "Commune" const VERSAILLES = "Versailles" @@ -1379,15 +1374,27 @@ states.increase_revolutionary_momentum_trigger = { view.actions.pass = 1 }, space(s) { + push_undo() log("Placed BC in S" + s + ".") place_cube(s) - end_increase_momentum() + game.state = "increase_revolutionary_momentum_trigger_done" }, pass() { end_increase_momentum() }, } +states.increase_revolutionary_momentum_trigger_done = { + inactive: "place a cube", + prompt() { + view.prompt = "Revolutionary Momentum: Done." + view.actions.done = 1 + }, + done() { + end_increase_momentum() + }, +} + states.increase_prussian_collaboration_trigger = { inactive: "place a cube", prompt() { @@ -1398,15 +1405,27 @@ states.increase_prussian_collaboration_trigger = { view.actions.pass = 1 }, space(s) { + push_undo() log("Placed RC in S" + s + ".") place_cube(s) - end_increase_momentum() + game.state = "increase_prussian_collaboration_trigger_done" }, pass() { end_increase_momentum() }, } +states.increase_prussian_collaboration_trigger_done = { + inactive: "place a cube", + prompt() { + view.prompt = "Prussian Collaboration: Done." + view.actions.done = 1 + }, + done() { + end_increase_momentum() + }, +} + // === CRISIS TRACK & CUBE POOLS === function is_commune_first_to_breach_final() { -- cgit v1.2.3