diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-18 15:36:32 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-18 15:36:32 +0000 |
commit | a5cad5916776ff66e7c7d224f6b2d966db8d888f (patch) | |
tree | eaad71ee64fdf325fccc5a41251c214466439557 | |
parent | 2c25d82a4e308d5e1d93606c28698934c22751c5 (diff) | |
download | 1989-dawn-of-freedom-a5cad5916776ff66e7c7d224f6b2d966db8d888f.tar.gz |
Add autoresolve for Samizdat
-rw-r--r-- | events.txt | 4 | ||||
-rw-r--r-- | rules.js | 9 |
2 files changed, 11 insertions, 2 deletions
@@ -563,8 +563,8 @@ frg_embassies CARD 75 - Exit Visas* # The Democratic Player may discard any cards in his hand and draw new cards from the deck. -if !is_auto_resolve(C_EXIT_VISAS) permanently_remove +if !is_auto_resolve(C_EXIT_VISAS) exit_visas endif @@ -586,7 +586,9 @@ endif CARD 77 - Samizdat # The Democratic Player can put a card in his hand aside for next turn and draw a replacement card from the deck. permanently_remove +if !is_auto_resolve(C_SAMIZDAT) samizdat +endif CARD 78 - Workers Revolt @@ -3082,6 +3082,11 @@ function is_auto_resolve(card) { if (!game.state.startsWith('vm')) { logi('Democrat has no cards to discard') } return true } + } else if (card === C_SAMIZDAT) { + if (game.democrat_hand.length === 0) { + if (!game.state.startsWith('vm')) { logi('Democrat has no cards to set aside') } + return true + } } else { return false @@ -8483,8 +8488,8 @@ CODE[74] = [ // FRG Embassies ] CODE[75] = [ // Exit Visas* - [ vm_if, ()=>!is_auto_resolve(C_EXIT_VISAS) ], [ vm_permanently_remove ], + [ vm_if, ()=>!is_auto_resolve(C_EXIT_VISAS) ], [ vm_exit_visas ], [ vm_endif ], [ vm_return ], @@ -8506,7 +8511,9 @@ CODE[76] = [ // Warsaw Pact Summit CODE[77] = [ // Samizdat [ vm_permanently_remove ], + [ vm_if, ()=>!is_auto_resolve(C_SAMIZDAT) ], [ vm_samizdat ], + [ vm_endif ], [ vm_return ], ] |