summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-02-09 18:32:36 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-02-09 18:32:36 +0000
commit92bac20c44b3f04435f65f7acd0e60b1571b2094 (patch)
tree1fc3a8567be86d12f6d0bb6c917010374f567983 /rules.js
parente52b645aa489890b1df3ac2598fa80df780ea928 (diff)
download1989-dawn-of-freedom-92bac20c44b3f04435f65f7acd0e60b1571b2094.tar.gz
Show Prudence as both persistent event and in discard
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 3a2a03c..eed3611 100644
--- a/rules.js
+++ b/rules.js
@@ -206,6 +206,7 @@ const C_MALTA_SUMMIT = 110
// END CONSTANTS }}}
const MAGIC_NEW_YEARS_EVE_PARTY = 111
+const EXTRA_PRUDENCE = 800
const dem_tst_req = [5, 5, 6, 6, 7, 8, 9, 10]
const com_tst_req = [6, 6, 7, 7, 8, 7, 6, 5]
@@ -3880,6 +3881,7 @@ function new_turn() {
}
if (game.prudence) {
delete game.prudence
+ game.persistent_events = game.persistent_events.filter( c => c !== EXTRA_PRUDENCE)
no_longer_in_effect.push(C_PRUDENCE)
}
if (no_longer_in_effect.length > 0) {
@@ -5654,6 +5656,8 @@ function vm_prudence() {
game.prudence.DEM--
log(`${game.prudence.DEM} to Democrat Ops for the rest of the turn.`)
}
+ if (!game.persistent_events.includes(EXTRA_PRUDENCE))
+ game.persistent_events.push(EXTRA_PRUDENCE)
vm_next()
}