From bf549eb216df269733cdb2372c61d466203ca636 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 23 Nov 2023 06:35:14 +0100 Subject: 1918 Pandemic. fix persistency requirement for C96 --- events.txt | 3 +-- rules.js | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/events.txt b/events.txt index 52fcf8e..65076d7 100644 --- a/events.txt +++ b/events.txt @@ -468,7 +468,6 @@ CARD 89 - 1918 Pandemic # Remove 1 :congressional_marker from Congress. For the remainder of the turn, the Suffragist player must spend 1 :button in order to play a card as an event. remove_congress 1 prompt "For the remainder of the turn, the Suffragist player must spend 1 :button in order to play a card as an event." - todo persistent REST_OF_TURN CARD 90 - The Business of Being a Woman @@ -503,7 +502,7 @@ CARD 95 - United Daughters of the Confederacy CARD 96 - Cheers to “No on Suffrage” # Playable if *Eighteenth Amendment* is not in effect. Roll :d8. Add that number :red_cube anywhere, no more than 2 per state. - requires_persistent REST_OF_GAME find_card("Eighteenth Amendment") + requires_not_persistent REST_OF_GAME find_card("Eighteenth Amendment") roll 1 D8 add_cubes_limit (game.vm.roll) RED anywhere() 2 diff --git a/rules.js b/rules.js index 12d10bd..e1f5dff 100644 --- a/rules.js +++ b/rules.js @@ -824,6 +824,7 @@ const WAR_IN_EUROPE = find_card("War in Europe") const FIFTEENTH_AMENDMENT = find_card("Fifteenth Amendment") const EIGHTEENTH_AMENDMENT = find_card("Eighteenth Amendment") const SOUTHERN_STRATEGY = find_card("Southern Strategy") +const _1918_PANDEMIC = find_card("1918 Pandemic") function can_play_event(c) { if (game.active === SUF && is_opposition_card(c)) @@ -863,6 +864,10 @@ function can_play_event(c) { if (c === 113 && game.turn < 5) return false + // Suffragist must pay 1 button to play event during 1918 Pandemic + if (game.active === SUF && game.persistent_turn.includes(_1918_PANDEMIC) && !player_buttons()) + return false + return true } @@ -956,6 +961,8 @@ states.operations_phase = { card_event(c) { push_undo() log(`C${c} - Event`) + if (game.active === SUF && game.persistent_turn.includes(_1918_PANDEMIC)) + decrease_player_buttons(1) log_br() goto_event(c) }, @@ -3459,7 +3466,6 @@ CODE[88] = [ // War in Europe CODE[89] = [ // 1918 Pandemic [ vm_remove_congress, 1 ], [ vm_prompt, "For the remainder of the turn, the Suffragist player must spend 1 :button in order to play a card as an event." ], - [ vm_todo ], [ vm_persistent, REST_OF_TURN ], [ vm_return ], ] -- cgit v1.2.3