From 2c25d82a4e308d5e1d93606c28698934c22751c5 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 18 Nov 2024 15:32:55 +0000 Subject: Add autoresolve for Exit Visas --- events.txt | 2 ++ rules.js | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/events.txt b/events.txt index 7db1b63..09eb662 100644 --- a/events.txt +++ b/events.txt @@ -563,8 +563,10 @@ 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 exit_visas +endif CARD 76 - Warsaw Pact Summit diff --git a/rules.js b/rules.js index 4bf7a33..b991456 100644 --- a/rules.js +++ b/rules.js @@ -3077,7 +3077,12 @@ function is_auto_resolve(card) { if (!game.state.startsWith('vm')) { logi('No SPs to remove') } return true } - } + } else if (card === C_EXIT_VISAS) { + if (game.democrat_hand.length === 0) { + if (!game.state.startsWith('vm')) { logi('Democrat has no cards to discard') } + return true + } + } else { return false } @@ -8478,8 +8483,10 @@ CODE[74] = [ // FRG Embassies ] CODE[75] = [ // Exit Visas* + [ vm_if, ()=>!is_auto_resolve(C_EXIT_VISAS) ], [ vm_permanently_remove ], [ vm_exit_visas ], + [ vm_endif ], [ vm_return ], ] -- cgit v1.2.3