summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-23 08:24:11 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-23 08:24:11 +0100
commitf60e87ba72f351e42925dcef88c9960c6c2d33d3 (patch)
treeacb87a0e87aa89d0c8caf8ffaf7fa729b79e6cf8
parent4329a3e42af85204b9ae1a8d97f3e35057a1428c (diff)
downloadvotes-for-women-f60e87ba72f351e42925dcef88c9960c6c2d33d3.tar.gz
event cost can compound
-rw-r--r--rules.js14
1 files changed, 9 insertions, 5 deletions
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
}