summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-14 16:11:10 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-24 21:06:18 +0200
commitbcfe205056fb1024197207cc3e47c0a061ef46f5 (patch)
tree80ab3afd662a449f10688154249f176bfad72a62
parent4e5227a05928528f1e812f2ff901f392153726c9 (diff)
downloadred-flag-over-paris-bcfe205056fb1024197207cc3e47c0a061ef46f5.tar.gz
Inactive prompts.
-rw-r--r--rules.js80
1 files changed, 65 insertions, 15 deletions
diff --git a/rules.js b/rules.js
index 312885a..ffb1d19 100644
--- a/rules.js
+++ b/rules.js
@@ -995,7 +995,7 @@ function goto_initiative_phase() {
states.initiative_phase = {
inactive: "decide initiative",
prompt() {
- view.prompt = "Decide who will have the initiative."
+ view.prompt = "Initiative Phase: Decide first player."
view.actions.commune = 1
view.actions.versailles = 1
},
@@ -1028,14 +1028,16 @@ function goto_censorship_phase() {
}
states.censorship_phase = {
- inactive: "censorship phase",
+ inactive: "discard a card",
prompt() {
- view.prompt = "Discard a card from your hand."
+ view.prompt = "Censorship Phase: Discard a card from your hand."
for (let c of player_hand())
gen_action("card", c)
},
card(c) {
- log(game.active + " discarded C" + c + ".")
+ log_br()
+ log(game.active + " - Censorship")
+ logi("C" + c)
discard_card(c)
if (game.active === game.initiative)
game.active = enemy_player()
@@ -1083,7 +1085,7 @@ function player_final_crisis_card() {
states.strategy_phase = {
inactive: "play a card",
prompt() {
- view.prompt = "Play a card."
+ view.prompt = "Strategy Phase: Play a card."
for (let c of player_hand())
gen_action_card(c)
@@ -1113,6 +1115,7 @@ states.strategy_phase = {
}
states.play_card = {
+ inactive: "play a card",
prompt() {
let c = game.what
@@ -1168,6 +1171,7 @@ states.play_card = {
}
states.advance_revolutionary_momentum = {
+ inactive: "advance Revolutionary Momentum",
prompt() {
view.prompt = "Advance Revolutionary Momentum."
view.actions.red_momentum = 1
@@ -1178,8 +1182,9 @@ states.advance_revolutionary_momentum = {
}
states.advance_prussian_collaboration = {
+ inactive: "advance Prussian Collaboration",
prompt() {
- view.prompt = "Advance Prussian Collaboration"
+ view.prompt = "Advance Prussian Collaboration."
view.actions.blue_momentum = 1
},
blue_momentum() {
@@ -1188,6 +1193,7 @@ states.advance_prussian_collaboration = {
}
states.play_discard = {
+ inactive: "play a card",
prompt() {
view.prompt = card_names[game.what] + ": Discard a card."
for (let c of player_hand())
@@ -1205,6 +1211,7 @@ states.play_discard = {
}
states.play_final_discard = {
+ inactive: "play a card",
prompt() {
view.prompt = card_names[game.what] + ": Discard a card."
for (let c of player_hand())
@@ -1223,6 +1230,7 @@ states.play_final_discard = {
}
states.play_final_ops = {
+ inactive: "play a card",
prompt() {
view.prompt = card_names[game.what] + ": Use up to 4 Ops."
view.selected_card = game.what
@@ -1324,6 +1332,7 @@ function end_decrease_momentum() {
}
states.decrease_revolutionary_momentum_remove = {
+ inactive: "remove cubes from Pool",
prompt() {
view.prompt = "Revolutionary Momentum: Remove cubes from Pool."
for (let i = game.red_momentum; i < 3; ++i)
@@ -1337,6 +1346,7 @@ states.decrease_revolutionary_momentum_remove = {
}
states.increase_prussian_collaboration_add = {
+ inactive: "add cubes to Pool",
prompt() {
view.prompt = "Prussian Collaboration: Add cubes to Pool."
for (let i = 0; i < game.blue_momentum; ++i)
@@ -1350,6 +1360,7 @@ states.increase_prussian_collaboration_add = {
}
states.increase_revolutionary_momentum_trigger = {
+ inactive: "place a cube",
prompt() {
view.prompt = "Revolutionary Momentum: Place a cube in an Institutional space."
for (let s of INSTITUTIONAL)
@@ -1368,6 +1379,7 @@ states.increase_revolutionary_momentum_trigger = {
}
states.increase_prussian_collaboration_trigger = {
+ inactive: "place a cube",
prompt() {
view.prompt = "Prussian Collaboration: Place a cube in a Public Opinion space."
for (let s of PUBLIC_OPINION)
@@ -1482,6 +1494,7 @@ function end_versailles_crisis_breach() {
}
states.commune_crisis_breach = {
+ inactive: "add cubes to Pool",
prompt() {
view.prompt = "Crisis Breach: Add cubes to Pool."
if (count_commune_cubes(RED_CRISIS_TRACK[1]) < 2)
@@ -1507,6 +1520,7 @@ states.commune_crisis_breach = {
}
states.versailles_crisis_breach = {
+ inactive: "add cubes to Pool",
prompt() {
view.prompt = "Crisis Breach: Add cubes to Pool."
if (count_versailles_cubes(BLUE_CRISIS_TRACK[1]) < 2)
@@ -1587,6 +1601,7 @@ function piece_abbr(p) {
}
states.operations_remove = {
+ inactive: "use Operations Points",
prompt() {
let prompt = "Use " + game.count + " OP in " + space_list_name(game.spaces) + " to remove."
if (game.vm)
@@ -1637,6 +1652,7 @@ states.operations_remove = {
}
states.operations_remove_spend = {
+ inactive: "use Operations Points",
prompt() {
let p = game.who
let s = game.pieces[p]
@@ -1660,8 +1676,9 @@ states.operations_remove_spend = {
}
states.operations_remove_draw = {
+ inactive: "use Operations Points",
prompt() {
- view.prompt = "Operations: Draw card for Military removal."
+ view.prompt = "Operations: Draw card for removal in Military."
view.actions.draw = 1
},
draw() {
@@ -1726,6 +1743,7 @@ function can_operations_place_space(s) {
}
states.operations_place = {
+ inactive: "use Operations Points",
prompt() {
let prompt = "Use " + game.count + " OP in " + space_list_name(game.spaces) + " to place."
if (game.vm)
@@ -1768,6 +1786,7 @@ function goto_operations_done() {
}
states.operations_done = {
+ inactive: "use Operations Points",
prompt() {
view.prompt = "Operations: All done."
view.actions.done = 1
@@ -1821,8 +1840,9 @@ function end_crisis_breach_pivotal() {
}
states.pivotal_space_bonus_actions = {
+ inactive: "choose a Pivotal Space",
prompt() {
- view.prompt = "Perform Pivotal Space bonus actions."
+ view.prompt = "Pivotal Space Bonus Actions: Choose a Pivotal Space."
for (let s of game.spaces)
gen_action_space(s)
},
@@ -1843,9 +1863,10 @@ function goto_bonus_action(s) {
}
states.bonus_action = {
+ inactive: "choose a Bonus Action",
prompt() {
let dimension = DIMENSION_SPACES[game.where]
- view.prompt = "Bonus Action in " + DIMENSION_NAME[game.where] + "."
+ view.prompt = "Pivotal Space Bonus Action in " + DIMENSION_NAME[game.where] + "."
view.where = game.where
view.actions.pass = 1
view.actions.de_escalate = 1
@@ -1879,6 +1900,7 @@ states.bonus_action = {
}
states.de_escalate_1 = {
+ inactive: "de-escalate",
prompt() {
let dimension = DIMENSION_SPACES[game.where]
view.prompt = "De-escalate in " + DIMENSION_NAME[game.where] + ": Remove your own cube."
@@ -1895,6 +1917,7 @@ states.de_escalate_1 = {
}
states.de_escalate_2 = {
+ inactive: "de-escalate",
prompt() {
let dimension = DIMENSION_SPACES[game.where]
view.prompt = "De-escalate in " + DIMENSION_NAME[game.where] + ": Remove your own or opponent's cube."
@@ -1913,6 +1936,7 @@ states.de_escalate_2 = {
}
states.spread_influence = {
+ inactive: "spread influence",
prompt() {
let dimension = DIMENSION_SPACES[game.where]
view.prompt = "Spread Influence in " + DIMENSION_NAME[game.where] + "."
@@ -1946,6 +1970,7 @@ states.spread_influence = {
}
states.turncoat = {
+ inactive: "replace a cube",
prompt() {
let dimension = DIMENSION_SPACES[game.where]
view.prompt = "Turncoat in " + DIMENSION_NAME[game.where] + ": Replace an opponent's cube."
@@ -2029,8 +2054,9 @@ function goto_crisis_dimension_scoring() {
}
states.crisis_dimension_scoring = {
+ inactive: "score Crisis Dimensions",
prompt() {
- view.prompt = "Crisis Dimension Scoring!"
+ view.prompt = "Crisis Dimension Scoring: Choose a Dimension."
for (let s of game.spaces)
gen_action_space(s)
},
@@ -2062,6 +2088,7 @@ function goto_objective_card_scoring() {
}
states.objective_card_scoring = {
+ inactive: "score Objective Cards",
prompt() {
view.prompt = "Objective Card Scoring: Score each Objective Card space."
if (game.count & 1)
@@ -2095,8 +2122,9 @@ function goto_objective_card_remove() {
}
states.objective_card_remove = {
+ inactive: "remove unfulfilled Objective Cards",
prompt() {
- view.prompt = "Objective Card Scoring: Remove failed Objective Cards."
+ view.prompt = "Objective Card Scoring: Remove each unfulfilled Objective Card."
if (!is_commune_control(commune_objective_space()))
gen_action_card(commune_objective_card())
if (!is_versailles_control(versailles_objective_space()))
@@ -2104,12 +2132,12 @@ states.objective_card_remove = {
},
card(c) {
if (c === commune_objective_card()) {
- log_h3("Commune - Failed")
+ log_h3("Commune - Unfulfilled")
logi("C" + commune_objective_card())
game.red_objective = 0
}
if (c === versailles_objective_card()) {
- log_h3("Versailles - Failed")
+ log_h3("Versailles - Unfulfilled")
logi("C" + versailles_objective_card())
game.blue_objective = 0
}
@@ -2129,8 +2157,9 @@ function goto_objective_card_play() {
}
states.objective_card_play = {
+ inactive: "play fulfilled Objective Cards",
prompt() {
- view.prompt = "Objective Card Scoring: Play successful Objective Cards."
+ view.prompt = "Objective Card Scoring: Play each fulfilled Objective Card."
let c = commune_objective_card()
if (c)
@@ -2197,6 +2226,7 @@ function resume_final_crisis_discard() {
}
states.final_crisis_discard = {
+ inactive: "discard a card",
prompt(player) {
view.prompt = "Discard down to " + game.round + " cards."
if (player === COMMUNE) {
@@ -2447,6 +2477,7 @@ function vm_return() {
}
states.vm_return = {
+ inactive: "finish playing the event",
prompt() {
event_prompt("All done.")
// TODO: or end_event ?
@@ -2652,6 +2683,7 @@ function vm_move_up_to() {
// === EVENT STATES ===
states.vm_switch = {
+ inactive: "choose an event option",
prompt() {
event_prompt()
for (let choice of vm_operand(1))
@@ -2705,6 +2737,7 @@ states.vm_switch = {
}
states.vm_increase_revolutionary_momentum = {
+ inactive: "increase Revolutionary Momentum",
prompt() {
event_prompt("Increase Revolutionary Momentum.")
view.actions.red_momentum = 1
@@ -2716,6 +2749,7 @@ states.vm_increase_revolutionary_momentum = {
}
states.vm_increase_prussian_collaboration = {
+ inactive: "increase Prussian Collaboration",
prompt() {
event_prompt("Increase Prussian Collaboration.")
view.actions.blue_momentum = 1
@@ -2727,6 +2761,7 @@ states.vm_increase_prussian_collaboration = {
}
states.vm_decrease_revolutionary_momentum = {
+ inactive: "decrease Revolutionary Momentum",
prompt() {
event_prompt("Decrease Revolutionary Momentum.")
view.actions.red_momentum = 1
@@ -2738,6 +2773,7 @@ states.vm_decrease_revolutionary_momentum = {
}
states.vm_decrease_prussian_collaboration = {
+ inactive: "decrease Prussian Collaboration",
prompt() {
event_prompt("Decrease Prussian Collaboration.")
view.actions.blue_momentum = 1
@@ -2763,6 +2799,7 @@ function goto_vm_place() {
}
states.vm_place = {
+ inactive: "place a cube",
prompt() {
event_prompt()
if (game.vm.upto)
@@ -2806,6 +2843,7 @@ function goto_vm_place_disc() {
}
states.vm_move_disc = {
+ inactive: "place a disc",
prompt() {
event_prompt("Remove a disc to place it elsewhere.")
if (game.vm.upto)
@@ -2833,6 +2871,7 @@ states.vm_move_disc = {
}
states.vm_place_disc = {
+ inactive: "place a disc",
prompt() {
event_prompt()
if (game.vm.upto)
@@ -2871,6 +2910,7 @@ function goto_vm_replace() {
}
states.vm_replace = {
+ inactive: "replace a cube",
prompt() {
event_prompt()
if (game.vm.upto)
@@ -2908,6 +2948,7 @@ function goto_vm_remove() {
}
states.vm_remove = {
+ inactive: "remove a cube",
prompt() {
event_prompt()
if (game.vm.upto)
@@ -2934,6 +2975,7 @@ states.vm_remove = {
}
states.vm_remove_own = {
+ inactive: "remove a cube",
prompt() {
event_prompt()
for (let s of game.vm.spaces)
@@ -2972,6 +3014,7 @@ function goto_vm_move() {
}
states.vm_move = {
+ inactive: "move a cube",
prompt() {
event_prompt()
view.actions.skip = 1
@@ -3007,6 +3050,7 @@ states.vm_move = {
// === COMPLICATED EVENT STATES ===
states.reveal_commune_objective = {
+ inactive: "look at Commune player's Objective Card",
prompt() {
event_prompt("Revealing Commune player's Objective Card.")
view.red_objective = game.red_objective
@@ -3018,6 +3062,7 @@ states.reveal_commune_objective = {
}
states.reveal_commune_hand = {
+ inactive: "look at Commune player's hand",
prompt() {
event_prompt("Revealing Commune player's hand.")
view.hand = game.red_hand
@@ -3029,6 +3074,7 @@ states.reveal_commune_hand = {
}
states.general_louis_valentin = {
+ inactive: "remove a cube",
prompt() {
event_prompt("Remove 1 from up to 2 different Paris spaces where present.")
view.actions.skip = 1
@@ -3051,6 +3097,7 @@ states.general_louis_valentin = {
}
states.pius_ix = {
+ inactive: "replace a cube",
prompt() {
event_prompt("Replace 1 in 2 different Political spaces.")
for (let s of game.vm.spaces)
@@ -3082,6 +3129,7 @@ function init_karl_marx() {
}
states.karl_marx_discard = {
+ inactive: "discard a card",
prompt() {
event_prompt("Discard 2 cards, then play or discard the last card.")
view.hand = game.vm.cards
@@ -3099,6 +3147,7 @@ states.karl_marx_discard = {
}
states.karl_marx_play = {
+ inactive: "play or discard a card",
prompt() {
event_prompt("Play or discard the last card.")
view.hand = game.vm.cards
@@ -3131,6 +3180,7 @@ function can_play_freemason_parade() {
}
states.freemason_parade = {
+ inactive: "remove a cube",
prompt() {
event_prompt("Remove a cube from both factions in a single Military space.")
for (let s of MILITARY)
@@ -3341,7 +3391,7 @@ exports.view = function (state, player) {
view.prompt = game.victory
} else if (player === "Observer" || (game.active !== player && game.active !== "Both")) {
if (states[game.state]) {
- let inactive = states[game.state].inactive || game.state
+ let inactive = states[game.state].inactive
view.prompt = `Waiting for ${game.active} to ${inactive}...`
} else {
view.prompt = "Unknown state: " + game.state