From 9217632f00c2d141fec36341bdf1479329aed677 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:35:37 +0100 Subject: campaigning and lobbying boosts --- rules.js | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 994bbd1..d2b6eee 100644 --- a/rules.js +++ b/rules.js @@ -1049,18 +1049,42 @@ function end_cleanup_phase() { } // TODO goto final voting + log("TODO Final Voting") } // #endregion // #region NON-EVENT CARD ACTIONS +const SUPPORT_CAMPAIGNING_BOOST = [ + find_card("Property Rights for Women"), + find_card("Marie Louise Bottineau Baldwin"), + find_card("Prison Tour Special") +] +const OPPOSITION_CAMPAIGNING_BOOST = [ + find_card("Beer Brewers"), + find_card("Conservative Opposition"), + find_card("Big Liquor’s Big Money") +] + +function has_campaigning_boost() { + for (let c of game.persistent_turn) { + if (game.active === SUF && SUPPORT_CAMPAIGNING_BOOST.includes(c)) + return true + if (game.active === OPP && OPPOSITION_CAMPAIGNING_BOOST.includes(c)) + return true + } + return false +} + function goto_campaigning(c) { game.played_card = c game.state = 'campaigning' game.count = count_player_active_campaigners() - // TODO persistent events - game.dice = D4 + if (has_campaigning_boost()) + game.dice = D6 + else + game.dice = D4 game.roll = [] } @@ -1274,12 +1298,15 @@ states.organizing = { const PROCESSIONS_FOR_SUFFRAGE = find_card("Processions for Suffrage") +function has_lobbying_boost() { + return game.active === SUF && game.persistent_turn.includes(PROCESSIONS_FOR_SUFFRAGE) +} + function goto_lobbying(c) { game.played_card = c game.state = 'lobbying' game.count = count_player_active_campaigners() - // Processions for Suffrage modifier - if (game.persistent_turn.includes(PROCESSIONS_FOR_SUFFRAGE)) + if (has_lobbying_boost()) game.dice = D8 else game.dice = D6 -- cgit v1.2.3