From f60e87ba72f351e42925dcef88c9960c6c2d33d3 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 23 Nov 2023 08:24:11 +0100 Subject: event cost can compound --- rules.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 5c703f0..9bfa721 100644 --- a/rules.js +++ b/rules.js @@ -862,18 +862,22 @@ function can_play_event(c) { if ([82, 85, 94, 95].includes(c) && !game.persistent_game.includes(SOUTHERN_STRATEGY)) return false + let cost = 0 // Spend 4 buttons to select - if ([39, 100].includes(c) && player_buttons() < 4) + if ([39, 100].includes(c)) + cost += 4 + + // Suffragist must pay 1 button to play event during 1918 Pandemic or A Threat to the Ideal of Womanhood + if (has_extra_event_cost()) + cost += 1 + + if (player_buttons() < cost) return false // Playable if it is Turn 5 or Turn 6 if (c === 113 && game.turn < 5) return false - // Suffragist must pay 1 button to play event during 1918 Pandemic or A Threat to the Ideal of Womanhood - if (has_extra_event_cost() && !player_buttons()) - return false - return true } -- cgit v1.2.3