From 191527069eed2f7b9afafab025f59c73ee3bd23b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 5 Jun 2023 11:54:40 +0200 Subject: Updated ruling for Aux Barricades and Issy Village objective events. If Versailles wins, shouldn't allow Commune to place Barricade, etc. --- events.txt | 14 ++++++++------ rules.js | 12 ++++-------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/events.txt b/events.txt index f5cef4a..25751b7 100644 --- a/events.txt +++ b/events.txt @@ -282,9 +282,10 @@ CARD 42 - Paris Cannons CARD 43 - Aux Barricades! ops 2 PARIS - player COMMUNE - prompt "You may place a Barricade in Butte-aux-Cailles." - may_place_disc BUTTE_AUX_CAILLES + if (game.active === COMMUNE) + prompt "You may place a Barricade in Butte-aux-Cailles." + may_place_disc BUTTE_AUX_CAILLES + endif CARD 44 - Commune's Stronghold prompt "Use 2 OP in Military or remove 1 from any space." @@ -298,9 +299,10 @@ CARD 44 - Commune's Stronghold CARD 45 - Fighting in Issy Village ops 2 FORTS - player VERSAILLES - prompt "You may place a Fortification in Fort d'Issy." - may_place_disc FORT_D_ISSY + if (game.active === VERSAILLES) + prompt "You may place a Fortification in Fort d'Issy." + may_place_disc FORT_D_ISSY + endif CARD 46 - Battle of Mont-Valérien ops 3 FORTS diff --git a/rules.js b/rules.js index cbd7d0e..9f4a99e 100644 --- a/rules.js +++ b/rules.js @@ -2644,12 +2644,6 @@ function vm_case() { } } -function vm_player() { - // TODO: pause for undo? - game.active = vm_operand(1) - vm_next() -} - function vm_ops() { goto_operations(vm_operand(1), vm_operand_spaces(2)) } @@ -4031,9 +4025,10 @@ CODE[42] = [ // Paris Cannons CODE[43] = [ // Aux Barricades! [ vm_ops, 2, PARIS ], - [ vm_player, COMMUNE ], + [ vm_if, ()=>(game.active === COMMUNE) ], [ vm_prompt, "You may place a Barricade in Butte-aux-Cailles." ], [ vm_may_place_disc, BUTTE_AUX_CAILLES ], + [ vm_endif ], [ vm_return ], ] @@ -4051,9 +4046,10 @@ CODE[44] = [ // Commune's Stronghold CODE[45] = [ // Fighting in Issy Village [ vm_ops, 2, FORTS ], - [ vm_player, VERSAILLES ], + [ vm_if, ()=>(game.active === VERSAILLES) ], [ vm_prompt, "You may place a Fortification in Fort d'Issy." ], [ vm_may_place_disc, FORT_D_ISSY ], + [ vm_endif ], [ vm_return ], ] -- cgit v1.2.3