summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.txt31
-rw-r--r--play.js11
-rw-r--r--rules.js335
3 files changed, 218 insertions, 159 deletions
diff --git a/events.txt b/events.txt
index b601ad2..bf367a5 100644
--- a/events.txt
+++ b/events.txt
@@ -17,7 +17,7 @@ CARD 2 - The Murder of Vincenzini
remove_up_to 3 POLITICAL
CARD 3 - Brassardiers
- prompt "Replace 1 in a Military space where you are present."
+ prompt "Replace 1 in Military where present."
replace 1 (where_present(MILITARY))
CARD 4 - Jules Ferry
@@ -82,7 +82,7 @@ CARD 11 - Adolphe Thiers
CARD 12 - Otto von Bismarck
# must remove own cube from National Assembly
- prompt "Remove 1 blue cube from National Assembly."
+ prompt "Remove 1 from National Assembly."
remove_own NATIONAL_ASSEMBLY
increase_prussian_collaboration
ops 2 MILITARY
@@ -92,7 +92,7 @@ CARD 13 - Général Ernest de Cissey
CARD 14 - Colonel de Lochner
if (is_versailles_control(MONT_VALERIEN))
- prompt "Use up to 3 Operations Points in Mont-Valérien or Butte Montmartre."
+ prompt "Use 3 OP in Mont-Valérien or Butte Montmartre."
switch ["mont_valerien","butte_montmartre"]
case "mont_valerien"
ops 3 MONT_VALERIEN
@@ -105,6 +105,7 @@ CARD 14 - Colonel de Lochner
CARD 15 - Jules Favre
increase_prussian_collaboration
+ # TODO BUG HERE? - skipped this
place_up_to 1 REPUBLICANS
CARD 16 - Hostage Decree
@@ -116,11 +117,11 @@ CARD 17 - Maréchal Macmahon
# Commune Cards
CARD 18 - Paule Minck
- prompt "Replace 1 in a Military space where you are present."
+ prompt "Replace 1 in Military where present."
replace 1 (where_present(MILITARY))
CARD 19 - Walery Wroblewski
- prompt "Place one Barricade in a Paris space where you are present."
+ prompt "Place one Barricade in Paris where present."
place_disc (where_present(PARIS))
CARD 20 - Banque de France
@@ -138,11 +139,11 @@ CARD 21 - Le Réveil
CARD 22 - Execution of Generals
increase_prussian_collaboration
- prompt "Replace up to 2 in a Paris space where you are present."
+ prompt "Replace up to 2 in Paris where present."
replace_up_to 2 (where_present(PARIS))
CARD 23 - Les Cantinières
- prompt "Place up to 2 in a Military space where you are present (may use removed)."
+ prompt "Place up to 2 in Military where present (use removed cubes)."
place_removed_up_to 2 (where_present(MILITARY))
CARD 24 - Eugène Protot
@@ -157,7 +158,7 @@ CARD 26 - Gaston Crémieux
CARD 27 - Luise Michel
increase_revolutionary_momentum
- prompt "Use 1 Operations Point in Public Opinion or Paris."
+ prompt "Use 1 OP in Public Opinion or Paris."
switch ["public_opinion","paris"]
case "public_opinion"
ops 1 PUBLIC_OPINION
@@ -190,7 +191,7 @@ CARD 33 - Jules Vallès
ops 2 PUBLIC_OPINION
CARD 34 - Charles Delescluze
- prompt "Use 3 Operations Point in Military or 1 in Political."
+ prompt "Use 3 OP in Military or 1 in Political."
switch ["military","political"]
case "military"
ops 3 MILITARY
@@ -263,7 +264,7 @@ CARD 41 - Freemason Parade
# Objective Cards
CARD 42 - Paris Cannons
- prompt "Use 3 Operations Points in Paris or increase your Player Momentum."
+ prompt "Use 3 OP in Paris or increase your Player Momentum."
switch ["momentum","ops"]
case "momentum"
if (game.active === COMMUNE)
@@ -282,7 +283,7 @@ CARD 43 - Aux Barricades!
may_place_disc BUTTE_AUX_CAILLES
CARD 44 - Commune's Stronghold
- prompt "Use 2 Operations Points in Military or remove 1 from any space."
+ prompt "Use 2 OP in Military or remove 1 from any space."
switch ["ops","remove"]
case "ops"
ops 2 MILITARY
@@ -305,7 +306,7 @@ CARD 46 - Battle of Mont-Valérien
endif
CARD 47 - Raid on Château de Vincennes
- prompt "Use 2 Operations Points in Military or remove 1 from any space."
+ prompt "Use 2 OP in Military or remove 1 from any space."
switch ["ops","remove"]
case "ops"
ops 2 MILITARY
@@ -314,7 +315,7 @@ CARD 47 - Raid on Château de Vincennes
endswitch
CARD 48 - Revolution in the Press
- prompt "Use 3 Operations Points in Public Opinion or replace 1 in any space."
+ prompt "Use 3 OP in Public Opinion or replace 1 in any space."
switch ["ops","replace"]
case "ops"
ops 3 PUBLIC_OPINION
@@ -340,7 +341,7 @@ CARD 50 - Socialist International
endif
CARD 51 - Royalists Dissension
- prompt "Use 2 Operations Points in Institutional or remove 1 from any space."
+ prompt "Use 2 OP in Institutional or remove 1 from any space."
switch ["ops","remove"]
case "ops"
ops 2 INSTITUTIONAL
@@ -349,7 +350,7 @@ CARD 51 - Royalists Dissension
endswitch
CARD 52 - Rise of Republicanism
- prompt "Use 3 Operations Points in Institutional or replace 1 in Military."
+ prompt "Use 3 OP in Institutional or replace 1 in Military."
switch ["ops","replace"]
case "ops"
ops 3 INSTITUTIONAL
diff --git a/play.js b/play.js
index 91a9afb..eb6ea6f 100644
--- a/play.js
+++ b/play.js
@@ -275,11 +275,10 @@ function build_user_interface() {
elt.addEventListener("mousedown", on_click_space)
elt.addEventListener("mouseenter", on_focus_space)
elt.addEventListener("mouseleave", on_blur)
- let bw = 8
- elt.style.top = y + "px"
- elt.style.left = x + "px"
- elt.style.width = (w - bw * 2) + "px"
- elt.style.height = (h - bw * 2) + "px"
+ elt.style.top = (y-1) + "px"
+ elt.style.left = (x-1) + "px"
+ elt.style.width = (w+2) + "px"
+ elt.style.height = (h+2) + "px"
space_layout_cube[i] = { x: x + Math.round(w/2), y: y + Math.round(h*1/2) }
space_layout_disc[i] = { x: x + w, y: y + h }
document.getElementById("spaces").appendChild(elt)
@@ -428,6 +427,7 @@ function on_update() {
for (let i = 0; i < space_count; ++i) {
layout_cubes(layout[i], space_layout_cube[i].x, space_layout_cube[i].y)
ui.spaces[i].classList.toggle("action", is_space_action(i))
+ ui.spaces[i].classList.toggle("selected", i === view.where)
}
for (let i = 0; i < 4; ++i) {
layout_disc(view.pieces[36+i], ui.discs[i])
@@ -468,6 +468,7 @@ function on_update() {
action_button("end_event", "End Event")
action_button("skip", "Skip")
+ action_button("pass", "Pass")
action_button("done", "Done")
action_button("undo", "Undo")
}
diff --git a/rules.js b/rules.js
index a4a7442..bf1cc1b 100644
--- a/rules.js
+++ b/rules.js
@@ -3,7 +3,7 @@
// TODO: clean up push/clear_undo
// TODO: clean up prompts
// TODO: event prompts
-// TODO: add logging
+// TODO: clean up logging
const COMMUNE = "Commune";
const VERSAILLES = "Versailles";
@@ -198,6 +198,39 @@ const PARIS = [ BUTTE_MONTMARTRE, BUTTE_AUX_CAILLES, PERE_LACHAISE ]
const PIVOTAL = [ NATIONAL_ASSEMBLY, PRESS, MONT_VALERIEN, BUTTE_MONTMARTRE ]
+function is_same_list(a, b) {
+ if (a !== b)
+ return true
+ if (a.length !== b.length)
+ return false
+ for (let i = 0; i < a.length; ++i)
+ if (a[i] !== b[i])
+ return false
+ return true
+}
+
+function space_list_name(list) {
+ if (list.length === 1)
+ return space_names[list[0]]
+ if (list.length === 12)
+ return "any space"
+ if (is_same_list(list, POLITICAL))
+ return "Political"
+ if (is_same_list(list, MILITARY))
+ return "Military"
+ if (is_same_list(list, INSTITUTIONAL))
+ return "Institutional"
+ if (is_same_list(list, PUBLIC_OPINION))
+ return "Public Opinion"
+ if (is_same_list(list, FORTS))
+ return "Forts"
+ if (is_same_list(list, PARIS))
+ return "Paris"
+ if (is_same_list(list, PIVOTAL))
+ return "Pivotal"
+ return "???"
+}
+
const DIMENSION_SPACES = [
INSTITUTIONAL, INSTITUTIONAL, INSTITUTIONAL,
PUBLIC_OPINION, PUBLIC_OPINION, PUBLIC_OPINION,
@@ -1078,13 +1111,13 @@ states.play_card = {
},
political() {
push_undo()
- log(card_ops[game.what] + " Operations Points.")
+ log(card_ops[game.what] + " OP.")
discard_card(game.what)
goto_operations(card_ops[game.what], POLITICAL)
},
military() {
push_undo()
- log(card_ops[game.what] + " Operations Points.")
+ log(card_ops[game.what] + " OP.")
discard_card(game.what)
goto_operations(card_ops[game.what], MILITARY)
},
@@ -1095,10 +1128,10 @@ states.play_card = {
else
discard_card(game.what)
if (game.active === COMMUNE) {
- log("Advanced Revolutionary Momentum.")
+ log("Increased Revolutionary Momentum.")
advance_revolutionary_momentum(1)
} else {
- log("Advanced Prussian Momentum.")
+ log("Increased Prussian Momentum.")
advance_prussian_collaboration(1)
}
},
@@ -1142,7 +1175,7 @@ states.play_final_discard = {
states.play_final_ops = {
prompt() {
- view.prompt = card_names[game.what] + ": Use up to 4 Operations Points."
+ view.prompt = card_names[game.what] + ": Use up to 4 Ops."
view.selected_card = game.what
view.actions.political = 1
view.actions.military = 1
@@ -1150,13 +1183,13 @@ states.play_final_ops = {
political() {
push_undo()
discard_final()
- log("4 Operations Points.")
+ log("4 Ops.")
goto_operations(4, POLITICAL)
},
military() {
push_undo()
discard_final()
- log("4 Operations Points.")
+ log("4 Ops.")
goto_operations(4, MILITARY)
},
}
@@ -1200,14 +1233,14 @@ states.revolutionary_momentum_trigger = {
for (let s of INSTITUTIONAL)
if (can_place_cube(s))
gen_action_space(s)
- view.actions.skip = 1
+ view.actions.pass = 1
},
space(s) {
log("Placed red cube in S" + s + ".")
place_cube(s)
end_momentum_trigger()
},
- skip() {
+ pass() {
end_momentum_trigger()
},
}
@@ -1218,14 +1251,14 @@ states.prussian_collaboration_trigger = {
for (let s of PUBLIC_OPINION)
if (can_place_cube(s))
gen_action_space(s)
- view.actions.skip = 1
+ view.actions.pass = 1
},
space(s) {
log("Placed blue cube in S" + s + ".")
place_cube(s)
end_momentum_trigger()
},
- skip() {
+ pass() {
end_momentum_trigger()
},
}
@@ -1242,6 +1275,7 @@ function end_momentum_trigger() {
// === CRISIS TRACK & CUBE POOLS ===
function end_card_play() {
+ clear_undo()
assess_crisis_breach_all()
if (game.round === 4)
resume_final_crisis()
@@ -1328,7 +1362,12 @@ function military_strength(s) {
states.operations_remove = {
prompt() {
- view.prompt = "Operations: Remove opponent's pieces."
+ let prompt = "Use " + game.count + " OP in " + space_list_name(game.spaces) + " to remove."
+ //let prompt = "Use " + game.count + " OP to remove in " + space_list_name(game.spaces) + "."
+ if (game.vm)
+ event_prompt(prompt)
+ else
+ view.prompt = "Operations: " + prompt
for (let s of game.spaces) {
if (can_operations_remove_space(s)) {
if (has_enemy_cube(s))
@@ -1351,21 +1390,16 @@ states.operations_remove = {
if (is_military_space(s)) {
let str = military_strength(s)
if (str >= 3) {
- log("Military strength " + str + ".")
+ logi("Remove from S" + s + ".")
remove_piece(p)
resume_operations_remove()
- } else if (game.count >= 1) {
- game.who = p
- game.state = "operations_remove_spend"
} else {
+ log("Remove from S" + s + ":")
game.who = p
- game.state = "operations_remove_draw"
+ game.state = "operations_remove_spend"
}
} else {
- if (game.current === COMMUNE)
- log("Removed blue cube from S" + s + ".")
- else
- log("Removed red cube from S" + s + ".")
+ log("Removed from S" + s + ".")
remove_piece(p)
resume_operations_remove()
}
@@ -1381,16 +1415,20 @@ states.operations_remove_spend = {
let p = game.who
let s = game.pieces[p]
let str = military_strength(s)
- view.prompt = "Operations: Military strength " + str + " - spend extra Operations Point?"
- view.actions.spend = 1
- view.actions.draw = 1
+ view.prompt = "Operations: Military strength " + str + " \u2014 spend extra OP?"
+ view.selected_cube = p
+ if (game.count > 0)
+ view.actions.spend = 1
+ else
+ view.actions.spend = 0
+ view.actions.pass = 1
},
spend() {
- log("Spent 1 extra Operations Point.")
+ logi("Spent extra OP")
game.count -= 1
attempt_remove_piece(1)
},
- draw() {
+ pass() {
attempt_remove_piece(0)
},
}
@@ -1412,17 +1450,13 @@ function attempt_remove_piece(extra) {
let c = draw_strategy_card()
let str = military_strength(s) + extra
let ops = card_ops[c]
- log("Military strength " + str + ".")
- log("Removed card C" + c + " with " + ops + " Operations Points.")
- remove_card(c)
+ logi("Drew C" + c)
+ logi("Strength " + str + " vs " + ops)
if (str >= ops) {
- if (game.current === COMMUNE)
- log("Removed blue cube from S" + s + ".")
- else
- log("Removed red cube from S" + s + ".")
remove_piece(p)
+ logi("Success")
} else {
- log("Failed.")
+ logi("Failure")
}
game.who = -1
resume_operations_remove()
@@ -1467,11 +1501,16 @@ function can_operations_place_space(s) {
states.operations_place = {
prompt() {
- view.prompt = "Operations: Place cubes."
+ //let prompt = "Use " + game.count + " OP to place in " + space_list_name(game.spaces) + "."
+ let prompt = "Use " + game.count + " OP in " + space_list_name(game.spaces) + " to place."
+ if (game.vm)
+ event_prompt(prompt)
+ else
+ view.prompt = "Operations: " + prompt
for (let s of game.spaces)
if (can_operations_place_space(s))
gen_action_space(s)
- view.actions.end_ops = 1
+ view.actions.pass = 1
},
space(s) {
push_undo()
@@ -1482,7 +1521,7 @@ states.operations_place = {
place_cube(s)
resume_operations_place()
},
- end_ops() {
+ pass() {
end_operations()
},
}
@@ -1498,10 +1537,13 @@ function goto_operations_done() {
states.operations_done = {
prompt() {
- view.prompt = "Operations: All done."
- view.actions.end_ops = 1
+ if (game.vm)
+ event_prompt("No OP left to spend in " + space_list_name(game.spaces) + ".")
+ else
+ view.prompt = "Operations: All done."
+ view.actions.done = 1
},
- end_ops() {
+ done() {
end_operations()
},
}
@@ -1534,6 +1576,8 @@ function goto_set_aside_cards() {
// === PIVOTAL SPACE BONUS ACTIONS ===
function goto_pivotal_space_bonus_actions() {
+ clear_undo()
+ log_h2("Pivotal Bonus Actions")
update_presence_and_control()
game.spaces = PIVOTAL.filter(s => is_commune_control(s) || is_versailles_control(s))
resume_pivotal_space_bonus_actions()
@@ -1560,7 +1604,7 @@ states.pivotal_space_bonus_actions = {
}
function goto_bonus_action(s) {
- log_h2(space_names[s] + " Bonus Action")
+ log_h3("S" + s)
array_remove_item(game.spaces, s)
game.where = s
game.state = "bonus_action"
@@ -1575,7 +1619,7 @@ states.bonus_action = {
let dimension = DIMENSION_SPACES[game.where]
view.prompt = "Bonus Action in " + DIMENSION_NAME[game.where] + "."
view.where = game.where
- view.actions.skip = 1
+ view.actions.pass = 1
view.actions.de_escalate = 1
view.actions.spread_influence = 1
if (can_replace_cube_in_any(dimension))
@@ -1585,19 +1629,23 @@ states.bonus_action = {
},
de_escalate() {
push_undo()
+ log("De-escalated")
game.state = "de_escalate_1"
},
spread_influence() {
push_undo()
+ log("Spread Influence")
game.who = -1
game.count = 2
game.state = "spread_influence"
},
turncoat() {
push_undo()
+ log("Turncoat")
game.state = "turncoat"
},
- skip() {
+ pass() {
+ log("Passed")
resume_pivotal_space_bonus_actions()
},
}
@@ -1611,6 +1659,11 @@ states.de_escalate_1 = {
},
piece(p) {
push_undo()
+ let s = game.pieces[p]
+ if (is_commune_cube(p))
+ logi("Commune S" + s)
+ else
+ logi("Versailles S" + s)
remove_piece(p)
game.state = "de_escalate_2"
},
@@ -1627,6 +1680,11 @@ states.de_escalate_2 = {
},
piece(p) {
push_undo()
+ let s = game.pieces[p]
+ if (is_commune_cube(p))
+ logi("Commune S" + s)
+ else
+ logi("Versailles S" + s)
remove_piece(p)
resume_pivotal_space_bonus_actions()
},
@@ -1646,19 +1704,21 @@ states.spread_influence = {
if (game.pieces[game.who] !== s)
gen_action_space(s)
}
- view.actions.skip = 1
+ view.actions.done = 1
},
piece(p) {
push_undo()
game.who = p
},
space(s) {
+ let from = game.pieces[game.who]
+ logi("S" + from + " to S" + s)
move_piece(game.who, s)
game.who = -1
if (--game.count === 0)
resume_pivotal_space_bonus_actions()
},
- skip() {
+ done() {
resume_pivotal_space_bonus_actions()
}
}
@@ -1671,7 +1731,9 @@ states.turncoat = {
for_each_enemy_cube(s, gen_action_piece)
},
piece(p) {
+ let s = game.pieces[p]
push_undo()
+ logi("Replaced in S" + s)
replace_cube(p)
resume_pivotal_space_bonus_actions()
},
@@ -1679,7 +1741,33 @@ states.turncoat = {
// === CRISIS DIMENSION SCORING ===
+function score_control(s, name, cf, vf, arg) {
+ if (is_political_space(s)) {
+ if (cf(arg)) {
+ log(name + ": Commune")
+ add_political_vp(COMMUNE, 1)
+ } else if (vf(arg)) {
+ log(name + ": Versailles")
+ add_political_vp(VERSAILLES, 1)
+ } else {
+ log(name + ": Nobody")
+ }
+ } else {
+ if (cf(arg)) {
+ log(name + ": Commune")
+ add_military_vp(COMMUNE, 1)
+ } else if (vf(arg)) {
+ log(name + ": Versailles")
+ add_military_vp(VERSAILLES, 1)
+ } else {
+ log(name + ": Nobody")
+ }
+ }
+}
+
function goto_crisis_dimension_scoring() {
+ clear_undo()
+ log_h2("Crisis Dimension Scoring")
update_presence_and_control()
game.spaces = PIVOTAL.slice()
game.active = game.initiative
@@ -1694,22 +1782,10 @@ states.crisis_dimension_scoring = {
},
space(s) {
array_remove_item(game.spaces, s)
- let dimension = DIMENSION_SPACES[s]
- if (is_political_space(s)) {
- if (is_commune_control_dimension(dimension))
- add_political_vp(COMMUNE, 1)
- else if (is_versailles_control_dimension(dimension))
- add_political_vp(VERSAILLES, 1)
- else
- log("Nobody controlled " + DIMENSION_NAME[s] + ".")
- } else {
- if (is_commune_control_dimension(dimension))
- add_military_vp(COMMUNE, 1)
- else if (is_versailles_control_dimension(dimension))
- add_military_vp(VERSAILLES, 1)
- else
- log("Nobody controlled " + DIMENSION_NAME[s] + ".")
- }
+ score_control(s, DIMENSION_NAME[s],
+ is_commune_control_dimension,
+ is_versailles_control_dimension,
+ DIMENSION_SPACES[s])
if (game.spaces.length === 0)
end_crisis_dimension_scoring()
},
@@ -1725,6 +1801,7 @@ function end_crisis_dimension_scoring() {
// === OBJECTIVE CARD SCORING ===
function goto_objective_card_scoring() {
+ log_h2("Objective Card Scoring")
update_presence_and_control()
game.active = game.initiative
game.count = 3
@@ -1733,6 +1810,7 @@ function goto_objective_card_scoring() {
logi("C" + commune_objective_card())
log("Versailles Objective:")
logi("C" + versailles_objective_card())
+ log_br()
}
states.objective_card_scoring = {
@@ -1748,31 +1826,31 @@ states.objective_card_scoring = {
gen_action_space(versailles_objective_space())
},
space(s) {
- if (is_political_space(s)) {
- if (is_commune_control(s))
- add_political_vp(COMMUNE, 1)
- else if (is_versailles_control(s))
- add_political_vp(VERSAILLES, 1)
- else
- log("Nobody controlled S" + s + ".")
- } else {
- if (is_commune_control(s))
- add_military_vp(COMMUNE, 1)
- else if (is_versailles_control(s))
- add_military_vp(VERSAILLES, 1)
- else
- log("Nobody controlled S" + s + ".")
- }
+ score_control(s, "S" + s, is_commune_control, is_versailles_control, s)
if (s === commune_objective_space())
game.count ^= 1
if (s === versailles_objective_space())
game.count ^= 2
if (game.count === 0)
- game.state = "objective_card_events"
+ goto_objective_card_events()
},
}
+function goto_objective_card_events() {
+ if (!is_commune_control(commune_objective_space())) {
+ log("Removed C" + commune_objective_card())
+ game.red_objective = []
+ }
+ if (!is_versailles_control(versailles_objective_space())) {
+ log("Removed C" + versailles_objective_card())
+ game.blue_objective = []
+ }
+ resume_objective_card_events()
+}
+
function resume_objective_card_events() {
+ clear_undo()
+ log_br()
let c = commune_objective_card()
let v = versailles_objective_card()
if (c || v)
@@ -1805,26 +1883,21 @@ states.objective_card_events = {
gen_action_card(v)
},
card(c) {
- let s = objective_card_space(c)
if (c === commune_objective_card()) {
game.red_objective = []
- if (is_commune_control(s)) {
- game.red_fulfilled += 1
- game.active = COMMUNE
- goto_play_event(c)
- } else {
- resume_objective_card_events()
- }
+ game.red_fulfilled += 1
+ game.active = COMMUNE
+ log_h2(COMMUNE)
+ log("Played C" + c + ".")
+ goto_play_event(c)
}
if (c === versailles_objective_card()) {
game.blue_objective = []
- if (is_versailles_control(s)) {
- game.blue_fulfilled += 1
- game.active = VERSAILLES
- goto_play_event(c)
- } else {
- resume_objective_card_events()
- }
+ game.blue_fulfilled += 1
+ game.active = VERSAILLES
+ log_h2(VERSAILLES)
+ log("Played C" + c + ".")
+ goto_play_event(c)
}
},
}
@@ -1927,15 +2000,15 @@ states.final_crisis_events = {
states.final_crisis_opponent_event = {
inactive: "play an event",
prompt() {
- view.prompt = card_names[game.what] + ": Play or skip event."
+ view.prompt = card_names[game.what] + ": Play or ignore event."
view.selected_card = game.what
view.actions.event = 1
- view.actions.skip = 1
+ view.actions.pass = 1
},
event() {
goto_play_event(game.what)
},
- skip() {
+ pass() {
end_card_play()
},
}
@@ -2067,9 +2140,11 @@ function vm_return() {
states.vm_return = {
prompt() {
event_prompt("All done.")
- view.actions.end_event = 1
+ view.actions.done = 1
+ },
+ done() {
+ end_event()
},
- end_event,
}
function vm_if() {
@@ -2330,7 +2405,7 @@ states.vm_increase_revolutionary_momentum = {
},
red_momentum() {
push_undo()
- log("Advanced Revolutionary Momentum.")
+ log("Increased Revolutionary Momentum.")
advance_revolutionary_momentum(1)
},
}
@@ -2342,7 +2417,7 @@ states.vm_increase_prussian_collaboration = {
},
blue_momentum() {
push_undo()
- log("Advanced Prussian Collaboration.")
+ log("Increased Prussian Collaboration.")
advance_prussian_collaboration(1)
},
}
@@ -2397,10 +2472,7 @@ states.vm_place = {
space(s) {
push_undo()
place_cube(s, game.vm.removed)
- if (game.current === COMMUNE)
- log("Placed red cube in S" + s + ".")
- else
- log("Placed blue cube in S" + s + ".")
+ log("Placed in S" + s + ".")
if (--game.vm.count === 0 || !can_vm_place(game.vm.removed))
vm_next()
},
@@ -2505,10 +2577,7 @@ states.vm_replace = {
piece(p) {
push_undo()
replace_cube(p)
- if (game.current === COMMUNE)
- log("Replaced blue cube in S" + s + ".")
- else
- log("Replaced red cube in S" + s + ".")
+ log("Replaced in S" + s + ".")
if (--game.vm.count === 0 || !can_vm_replace())
vm_next()
},
@@ -2544,10 +2613,7 @@ states.vm_remove = {
piece(p) {
push_undo()
let s = game.pieces[p]
- if (game.current === COMMUNE)
- log("Removed blue cube from S" + s + ".")
- else
- log("Removed red cube from S" + s + ".")
+ log("Removed from S" + s + ".")
remove_piece(p)
if (--game.vm.count === 0 || !can_vm_remove())
vm_next()
@@ -2567,10 +2633,7 @@ states.vm_remove_own = {
piece(p) {
push_undo()
let s = game.pieces[p]
- if (game.current === COMMUNE)
- log("Removed red cube from S" + s + ".")
- else
- log("Removed blue cube from S" + s + ".")
+ log("Removed own from S" + s + ".")
remove_piece(p)
vm_next()
},
@@ -2618,10 +2681,7 @@ states.vm_move = {
space(s) {
let old_s = game.pieces[game.who]
move_piece(game.who, s)
- if (game.current === COMMUNE)
- log("Moved red cube from S" + old_s + " to S" + s + ".")
- else
- log("Moved blue cube from S" + old_s + " to S" + s + ".")
+ log("Moved from S" + old_s + " to S" + s + ".")
game.who = -1
if (--game.vm.count === 0 || !can_vm_move())
vm_next()
@@ -2668,10 +2728,7 @@ states.general_louis_valentin = {
push_undo()
let s = game.pieces[p]
array_remove_item(game.spaces, s)
- if (game.current === COMMUNE)
- log("Removed blue cube from S" + s + ".")
- else
- log("Removed red cube from S" + s + ".")
+ log("Removed from S" + s + ".")
remove_piece(p)
if (--game.count === 0 || !can_vm_remove())
vm_next()
@@ -3155,7 +3212,7 @@ CODE[2] = [ // The Murder of Vincenzini
]
CODE[3] = [ // Brassardiers
- [ vm_prompt, "Replace 1 in a Military space where you are present." ],
+ [ vm_prompt, "Replace 1 in Military where present." ],
[ vm_replace, 1, ()=>(where_present(MILITARY)) ],
[ vm_return ],
]
@@ -3233,7 +3290,7 @@ CODE[11] = [ // Adolphe Thiers
]
CODE[12] = [ // Otto von Bismarck
- [ vm_prompt, "Remove 1 blue cube from National Assembly." ],
+ [ vm_prompt, "Remove 1 from National Assembly." ],
[ vm_remove_own, NATIONAL_ASSEMBLY ],
[ vm_increase_prussian_collaboration ],
[ vm_ops, 2, MILITARY ],
@@ -3247,7 +3304,7 @@ CODE[13] = [ // Général Ernest de Cissey
CODE[14] = [ // Colonel de Lochner
[ vm_if, ()=>(is_versailles_control(MONT_VALERIEN)) ],
- [ vm_prompt, "Use up to 3 Operations Points in Mont-Valérien or Butte Montmartre." ],
+ [ vm_prompt, "Use 3 OP in Mont-Valérien or Butte Montmartre." ],
[ vm_switch, ["mont_valerien","butte_montmartre"] ],
[ vm_case, "mont_valerien" ],
[ vm_ops, 3, MONT_VALERIEN ],
@@ -3277,13 +3334,13 @@ CODE[17] = [ // Maréchal Macmahon
]
CODE[18] = [ // Paule Minck
- [ vm_prompt, "Replace 1 in a Military space where you are present." ],
+ [ vm_prompt, "Replace 1 in Military where present." ],
[ vm_replace, 1, ()=>(where_present(MILITARY)) ],
[ vm_return ],
]
CODE[19] = [ // Walery Wroblewski
- [ vm_prompt, "Place one Barricade in a Paris space where you are present." ],
+ [ vm_prompt, "Place one Barricade in Paris where present." ],
[ vm_place_disc, ()=>(where_present(PARIS)) ],
[ vm_return ],
]
@@ -3306,13 +3363,13 @@ CODE[21] = [ // Le Réveil
CODE[22] = [ // Execution of Generals
[ vm_increase_prussian_collaboration ],
- [ vm_prompt, "Replace up to 2 in a Paris space where you are present." ],
+ [ vm_prompt, "Replace up to 2 in Paris where present." ],
[ vm_replace_up_to, 2, ()=>(where_present(PARIS)) ],
[ vm_return ],
]
CODE[23] = [ // Les Cantinières
- [ vm_prompt, "Place up to 2 in a Military space where you are present (may use removed)." ],
+ [ vm_prompt, "Place up to 2 in Military where present (use removed cubes)." ],
[ vm_place_removed_up_to, 2, ()=>(where_present(MILITARY)) ],
[ vm_return ],
]
@@ -3335,7 +3392,7 @@ CODE[26] = [ // Gaston Crémieux
CODE[27] = [ // Luise Michel
[ vm_increase_revolutionary_momentum ],
- [ vm_prompt, "Use 1 Operations Point in Public Opinion or Paris." ],
+ [ vm_prompt, "Use 1 OP in Public Opinion or Paris." ],
[ vm_switch, ["public_opinion","paris"] ],
[ vm_case, "public_opinion" ],
[ vm_ops, 1, PUBLIC_OPINION ],
@@ -3382,7 +3439,7 @@ CODE[33] = [ // Jules Vallès
]
CODE[34] = [ // Charles Delescluze
- [ vm_prompt, "Use 3 Operations Point in Military or 1 in Political." ],
+ [ vm_prompt, "Use 3 OP in Military or 1 in Political." ],
[ vm_switch, ["military","political"] ],
[ vm_case, "military" ],
[ vm_ops, 3, MILITARY ],
@@ -3462,7 +3519,7 @@ CODE[41] = [ // Freemason Parade
]
CODE[42] = [ // Paris Cannons
- [ vm_prompt, "Use 3 Operations Points in Paris or increase your Player Momentum." ],
+ [ vm_prompt, "Use 3 OP in Paris or increase your Player Momentum." ],
[ vm_switch, ["momentum","ops"] ],
[ vm_case, "momentum" ],
[ vm_if, ()=>(game.active === COMMUNE) ],
@@ -3485,7 +3542,7 @@ CODE[43] = [ // Aux Barricades!
]
CODE[44] = [ // Commune's Stronghold
- [ vm_prompt, "Use 2 Operations Points in Military or remove 1 from any space." ],
+ [ vm_prompt, "Use 2 OP in Military or remove 1 from any space." ],
[ vm_switch, ["ops","remove"] ],
[ vm_case, "ops" ],
[ vm_ops, 2, MILITARY ],
@@ -3514,7 +3571,7 @@ CODE[46] = [ // Battle of Mont-Valérien
]
CODE[47] = [ // Raid on Château de Vincennes
- [ vm_prompt, "Use 2 Operations Points in Military or remove 1 from any space." ],
+ [ vm_prompt, "Use 2 OP in Military or remove 1 from any space." ],
[ vm_switch, ["ops","remove"] ],
[ vm_case, "ops" ],
[ vm_ops, 2, MILITARY ],
@@ -3525,7 +3582,7 @@ CODE[47] = [ // Raid on Château de Vincennes
]
CODE[48] = [ // Revolution in the Press
- [ vm_prompt, "Use 3 Operations Points in Public Opinion or replace 1 in any space." ],
+ [ vm_prompt, "Use 3 OP in Public Opinion or replace 1 in any space." ],
[ vm_switch, ["ops","replace"] ],
[ vm_case, "ops" ],
[ vm_ops, 3, PUBLIC_OPINION ],
@@ -3557,7 +3614,7 @@ CODE[50] = [ // Socialist International
]
CODE[51] = [ // Royalists Dissension
- [ vm_prompt, "Use 2 Operations Points in Institutional or remove 1 from any space." ],
+ [ vm_prompt, "Use 2 OP in Institutional or remove 1 from any space." ],
[ vm_switch, ["ops","remove"] ],
[ vm_case, "ops" ],
[ vm_ops, 2, INSTITUTIONAL ],
@@ -3568,7 +3625,7 @@ CODE[51] = [ // Royalists Dissension
]
CODE[52] = [ // Rise of Republicanism
- [ vm_prompt, "Use 3 Operations Points in Institutional or replace 1 in Military." ],
+ [ vm_prompt, "Use 3 OP in Institutional or replace 1 in Military." ],
[ vm_switch, ["ops","replace"] ],
[ vm_case, "ops" ],
[ vm_ops, 3, INSTITUTIONAL ],