summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-25 13:40:37 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-25 13:40:37 +0200
commitc459ed62268bb033aabc0dc41fa59c595fec0e4e (patch)
tree6c995ab6b7215aa2db98e8301727b834bf9f1eac
parent2df33971edc881dbe8f613921448c1f68773b17e (diff)
downloadred-flag-over-paris-c459ed62268bb033aabc0dc41fa59c595fec0e4e.tar.gz
Add confirmation step when placing cube from momentum trigger.
-rw-r--r--rules.js33
1 files 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() {