diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 42 |
1 files changed, 15 insertions, 27 deletions
@@ -1862,21 +1862,10 @@ states.objective_card_events = { view.prompt = "Objective Card Events!" let c = commune_objective_card() - let v = versailles_objective_card() - if (c && v) { - if (game.active === COMMUNE) - view.objective = [ c, v ] - else - view.objective = [ v, c ] - } else if (c) - view.objective = [ c ] - else if (v) - view.objective = [ v ] - else - view.objective = [ ] - if (c) gen_action_card(c) + + let v = versailles_objective_card() if (v) gen_action_card(v) }, @@ -2007,7 +1996,7 @@ states.final_crisis_opponent_event = { view.actions.pass = 1 }, event() { - log("Played C" + c + ".") + log("Played C" + game.what + ".") goto_play_event(game.what) }, pass() { @@ -2241,14 +2230,14 @@ function vm_increase_prussian_collaboration() { } function vm_decrease_revolutionary_momentum() { - if (game.red_momentum > 1) + if (game.red_momentum > 0) game.state = "vm_decrease_revolutionary_momentum" else vm_next() } function vm_decrease_prussian_collaboration() { - if (game.blue_momentum > 1) + if (game.blue_momentum > 0) game.state = "vm_decrease_prussian_collaboration" else vm_next() @@ -2710,7 +2699,7 @@ states.vm_move = { states.reveal_commune_objective = { prompt() { view.prompt = "Revealing Commune player's Objective Card." - view.objective = game.red_objective + view.red_objective = game.red_objective view.actions.done = 1 }, done() { @@ -2721,7 +2710,7 @@ states.reveal_commune_objective = { states.reveal_commune_hand = { prompt() { view.prompt = "Revealing Commune player's hand." - view.objective = game.red_hand + view.hand = game.red_hand view.actions.done = 1 }, done() { @@ -2733,14 +2722,14 @@ states.general_louis_valentin = { prompt() { event_prompt("Remove a red cube from up to 2 different Paris spaces where you are present.") view.actions.skip = 1 - for (let s of game.spaces) + for (let s of game.vm.spaces) if (can_remove_cube(s)) for_each_enemy_cube(s, gen_action_piece) }, piece(p) { push_undo() let s = game.pieces[p] - array_remove_item(game.spaces, s) + array_remove_item(game.vm.spaces, s) log("Removed from S" + s + ".") remove_piece(p) if (--game.count === 0 || !can_vm_remove()) @@ -2983,7 +2972,6 @@ exports.view = function(state, player) { hand: 0, final: 0, set_aside: 0, - objective: 0 } if (player === COMMUNE) { @@ -3272,7 +3260,7 @@ CODE[5] = [ // Le Figaro CODE[6] = [ // Général Louis Valentin [ vm_asm, ()=>game.count = 2 ], - [ vm_asm, ()=>game.spaces = where_present(PARIS) ], + [ vm_asm, ()=>game.vm.spaces = where_present(PARIS) ], [ vm_if, ()=>(can_vm_remove()) ], [ vm_goto, "general_louis_valentin" ], [ vm_endif ], @@ -3352,6 +3340,7 @@ CODE[15] = [ // Jules Favre ] CODE[16] = [ // Hostage Decree + [ vm_prompt, "Remove all from Catholic Church." ], [ vm_remove, 20, CATHOLIC_CHURCH ], [ vm_return ], ] @@ -3469,13 +3458,8 @@ CODE[33] = [ // Jules Vallès ] CODE[34] = [ // Charles Delescluze - [ vm_prompt, "Use 3 OP in Military or 1 in Political." ], - [ vm_switch, ["military","political"] ], - [ vm_case, "military" ], [ vm_ops, 3, MILITARY ], - [ vm_case, "political" ], [ vm_ops, 1, POLITICAL ], - [ vm_endswitch ], [ vm_return ], ] @@ -3549,6 +3533,7 @@ CODE[41] = [ // Freemason Parade ] CODE[42] = [ // Paris Cannons + [ vm_if, ()=>(can_advance_momentum()) ], [ vm_prompt, "Use 3 OP in Paris or increase your Player Momentum." ], [ vm_switch, ["momentum","ops"] ], [ vm_case, "momentum" ], @@ -3560,6 +3545,9 @@ CODE[42] = [ // Paris Cannons [ vm_case, "ops" ], [ vm_ops, 3, PARIS ], [ vm_endswitch ], + [ vm_else ], + [ vm_ops, 3, PARIS ], + [ vm_endif ], [ vm_return ], ] |