diff options
-rw-r--r-- | events.txt | 36 | ||||
-rw-r--r-- | rules.js | 42 |
2 files changed, 33 insertions, 45 deletions
@@ -45,7 +45,7 @@ CARD 5 - Le Figaro CARD 6 - Général Louis Valentin # remove_different_up_to 2 (where_present(PARIS)) asm game.count = 2 - asm game.spaces = where_present(PARIS) + asm game.vm.spaces = where_present(PARIS) if (can_vm_remove()) goto "general_louis_valentin" endif @@ -195,17 +195,13 @@ CARD 33 - Jules Vallès ops 2 PUBLIC_OPINION CARD 34 - Charles Delescluze - prompt "Use 3 OP in Military or 1 in Political." - switch ["military","political"] - case "military" - ops 3 MILITARY - case "political" - ops 1 POLITICAL - endswitch + ops 3 MILITARY + ops 1 POLITICAL # Neutral Cards CARD 35 - Conciliation + # TODO - improve UX here - prompt is confusing prompt "Move up to 2 from Public Opinion or Paris to the other." switch ["public_opinion","paris"] case "public_opinion" @@ -268,17 +264,21 @@ CARD 41 - Freemason Parade # Objective Cards CARD 42 - Paris Cannons - prompt "Use 3 OP in Paris or increase your Player Momentum." - switch ["momentum","ops"] - case "momentum" - if (game.active === COMMUNE) - increase_revolutionary_momentum - else - increase_prussian_collaboration - endif - case "ops" + if (can_advance_momentum()) + prompt "Use 3 OP in Paris or increase your Player Momentum." + switch ["momentum","ops"] + case "momentum" + if (game.active === COMMUNE) + increase_revolutionary_momentum + else + increase_prussian_collaboration + endif + case "ops" + ops 3 PARIS + endswitch + else ops 3 PARIS - endswitch + endif CARD 43 - Aux Barricades! ops 2 PARIS @@ -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 ], ] |