diff options
-rw-r--r-- | play.js | 11 | ||||
-rw-r--r-- | rules.js | 4 |
2 files changed, 14 insertions, 1 deletions
@@ -196,6 +196,8 @@ const C_ARMY_BACKS_REVOLUTION = 108 const C_KREMLIN_COUP = 109 const C_MALTA_SUMMIT = 110 +const EXTRA_PRUDENCE = 800 + // END CONST }}} const scoring_cards = [22, 23, 42, 43, 55, 95] @@ -848,9 +850,16 @@ function on_update() { ui.removed.appendChild(ui.cards[c]) ui.persistent.replaceChildren() - for (let c of view.persistent_events) + console.log('view.persistent_events', view.persistent_events) + for (let c of view.persistent_events) { if (c < 111) ui.persistent.appendChild(ui.cards[c]) + if (c === EXTRA_PRUDENCE) { + const card_e = document.createElement("div") + card_e.className = "card event_" + c + ui.persistent.appendChild(card_e) + } + } ui.played_card.replaceChildren() if (!view.scoring_card) { @@ -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() } |