summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.txt9
-rw-r--r--rules.js92
2 files changed, 42 insertions, 59 deletions
diff --git a/events.txt b/events.txt
index 22260fc..bff41da 100644
--- a/events.txt
+++ b/events.txt
@@ -96,14 +96,9 @@ CARD 13 - Général Ernest de Cissey
ops 4 FORT_D_ISSY
CARD 14 - Colonel de Lochner
+ # see https://boardgamegeek.com/thread/2820690/article/39550904#39550904
if (is_versailles_control(MONT_VALERIEN))
- prompt "Use 3 OP in Mont-Valérien or Butte Montmartre."
- switch ["mont_valerien","butte_montmartre"]
- case "mont_valerien"
- ops 3 MONT_VALERIEN
- case "butte_montmartre"
- ops 3 BUTTE_MONTMARTRE
- endswitch
+ ops 3 BUTTE_MONTMARTRE
else
ops 3 MONT_VALERIEN
endif
diff --git a/rules.js b/rules.js
index 9b7f42d..2273f33 100644
--- a/rules.js
+++ b/rules.js
@@ -349,18 +349,24 @@ function recycle_card(c) {
}
function add_political_vp(side, amount) {
- if (side === COMMUNE)
+ if (side === COMMUNE) {
+ logi("Commune +" + amount + " Political VP.")
game.political_vp += amount
- else
+ } else {
+ logi("Versailles +" + amount + " Political VP.")
game.political_vp -= amount
+ }
game.political_vp = Math.min(5, Math.max(-5, game.political_vp))
}
function add_military_vp(side, amount) {
- if (side === COMMUNE)
+ if (side === COMMUNE) {
+ logi("Commune +" + amount + " Military VP.")
game.military_vp += amount
- else
+ } else {
+ logi("Versailles +" + amount + " Military VP.")
game.military_vp -= amount
+ }
game.military_vp = Math.min(5, Math.max(-5, game.military_vp))
}
@@ -977,12 +983,12 @@ states.initiative_phase = {
view.actions.versailles = 1
},
commune() {
- log("Initiative: Commune")
+ log("Initiative: Commune.")
game.initiative = COMMUNE
end_initiative_phase()
},
versailles() {
- log("Initiative: Versailles")
+ log("Initiative: Versailles.")
game.initiative = VERSAILLES
end_initiative_phase()
},
@@ -1071,7 +1077,6 @@ states.strategy_phase = {
} else if (c === game.discard) {
game.state = "play_discard"
} else {
- log(`Played C${c}.`)
game.state = "play_card"
}
},
@@ -1103,19 +1108,19 @@ states.play_card = {
},
event() {
push_undo()
- log("Event.")
+ log(`Played C${game.what} for Event.`)
discard_card(game.what)
goto_play_event(game.what)
},
political() {
push_undo()
- log(card_ops[game.what] + " OP.")
+ log(`Played C${game.what} for ${card_ops[game.what]} OP.`)
discard_card(game.what)
goto_operations(card_ops[game.what], POLITICAL)
},
military() {
push_undo()
- log(card_ops[game.what] + " OP.")
+ log(`Played C${game.what} for ${card_ops[game.what]} OP.`)
discard_card(game.what)
goto_operations(card_ops[game.what], MILITARY)
},
@@ -1126,10 +1131,10 @@ states.play_card = {
else
discard_card(game.what)
if (game.active === COMMUNE) {
- log("Increased Revolutionary Momentum.")
+ log(`Played C${game.what} for Revolutionary Momentum.`)
advance_revolutionary_momentum(1)
} else {
- log("Increased Prussian Momentum.")
+ log(`Played C${game.what} for Prussian Collaboration.`)
advance_prussian_collaboration(1)
}
},
@@ -1296,7 +1301,6 @@ function assess_crisis_breach(side, i, crisis_track, bonus_cubes, start_count, e
if (enemy_final_crisis) {
if (count_cubes(enemy_final_crisis) === 2) {
for_each_cube(bonus_cubes, remove_piece)
- log("-1 Political VP")
add_political_vp(side, -1)
} else {
for_each_cube(bonus_cubes, remove_piece_from_play)
@@ -1536,7 +1540,7 @@ function goto_operations_done() {
states.operations_done = {
prompt() {
if (game.vm)
- event_prompt("No OP left to spend in " + space_list_name(game.spaces) + ".")
+ event_prompt("Finished Operations in " + space_list_name(game.spaces) + ".")
else
view.prompt = "Operations: All done."
view.actions.done = 1
@@ -1740,25 +1744,22 @@ states.turncoat = {
// === CRISIS DIMENSION SCORING ===
function score_control(s, name, cf, vf, arg) {
+ log(name + ":")
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")
+ logi("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")
+ logi("Nobody")
}
}
}
@@ -1833,10 +1834,12 @@ states.objective_card_scoring = {
function goto_objective_card_events() {
if (!is_commune_control(commune_objective_space())) {
+ log_br()
log("Removed C" + commune_objective_card())
game.red_objective = 0
}
if (!is_versailles_control(versailles_objective_space())) {
+ log_br()
log("Removed C" + versailles_objective_card())
game.blue_objective = 0
}
@@ -1873,16 +1876,16 @@ states.objective_card_events = {
game.red_objective = 0
game.red_fulfilled += 1
game.active = COMMUNE
- log_h2(COMMUNE)
- log("Played C" + c + ".")
+ log_br()
+ log("Commune Played C" + c + ".")
goto_play_event(c)
}
if (c === versailles_objective_card()) {
game.blue_objective = 0
game.blue_fulfilled += 1
game.active = VERSAILLES
- log_h2(VERSAILLES)
- log("Played C" + c + ".")
+ log_br()
+ log("Versailles Played C" + c + ".")
goto_play_event(c)
}
},
@@ -2006,10 +2009,15 @@ states.final_crisis_opponent_event = {
function goto_final_victory() {
update_presence_and_control()
- if (game.red_momentum === 3)
+ if (game.red_momentum === 3) {
+ log("Revolutionary Momentum:")
add_political_vp(COMMUNE, 1)
- if (game.blue_momentum === 3)
- add_political_vp(VERSAILLES, 1)
+ }
+
+ if (game.blue_momentum === 3) {
+ log("Prussian Collaboration:")
+ add_military_vp(VERSAILLES, 1)
+ }
if (versailles_military_vp() > commune_military_vp())
return goto_game_over(VERSAILLES, "Versailles won!")
@@ -2334,14 +2342,8 @@ function vm_move_up_to() {
states.vm_switch = {
prompt() {
event_prompt()
- for (let choice of vm_operand(1)) {
- if (choice === "mont_valerien")
- gen_action_space(MONT_VALERIEN)
- else if (choice === "butte_montmartre")
- gen_action_space(BUTTE_MONTMARTRE)
- else
- view.actions[choice] = 1
- }
+ for (let choice of vm_operand(1))
+ view.actions[choice] = 1
},
place() {
push_undo()
@@ -2388,14 +2390,6 @@ states.vm_switch = {
game.vm.choice = "paris"
vm_next()
},
- space(s) {
- push_undo()
- if (s === MONT_VALERIEN)
- game.vm.choice = "mont_valerien"
- if (s === BUTTE_MONTMARTRE)
- game.vm.choice = "butte_montmartre"
- vm_next()
- },
}
states.vm_increase_revolutionary_momentum = {
@@ -2405,7 +2399,7 @@ states.vm_increase_revolutionary_momentum = {
},
red_momentum() {
push_undo()
- log("Increased Revolutionary Momentum.")
+ log("Revolutionary Momentum.")
advance_revolutionary_momentum(1)
},
}
@@ -2417,7 +2411,7 @@ states.vm_increase_prussian_collaboration = {
},
blue_momentum() {
push_undo()
- log("Increased Prussian Collaboration.")
+ log("Prussian Collaboration.")
advance_prussian_collaboration(1)
},
}
@@ -2905,7 +2899,7 @@ exports.setup = function (seed, scenario, options) {
log_h1("Red Flag Over Paris")
if (scenario === "Censorship") {
- log_h2("Censorship")
+ log("Censorship Phase Variant.")
game.censorship = 1
}
@@ -3341,13 +3335,7 @@ CODE[13] = [ // Général Ernest de Cissey
CODE[14] = [ // Colonel de Lochner
[ vm_if, ()=>(is_versailles_control(MONT_VALERIEN)) ],
- [ 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 ],
- [ vm_case, "butte_montmartre" ],
[ vm_ops, 3, BUTTE_MONTMARTRE ],
- [ vm_endswitch ],
[ vm_else ],
[ vm_ops, 3, MONT_VALERIEN ],
[ vm_endif ],