diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -3407,11 +3407,10 @@ function is_auto_resolve(card) { } return true } - } else if (card === C_KISS_OF_DEATH && game.active === COM) { + } else if (card === C_KISS_OF_DEATH) { if (game.communist_hand.length === 0) { - if (!game.state.startsWith('vm')) { - log('Communist has no cards to discard.') - } + if (game.active !== game.round_player) + change_player() return true } } else if (card === C_DISSIDENT_ARRESTED && game.active === DEM) { @@ -4731,6 +4730,7 @@ function vm_prompt() { } function vm_return() { + console.log('in vm_return, game.active', game.active) // Remove temporary vm variables delete game.support_check_modifier delete game.vm_max_infl @@ -4745,13 +4745,14 @@ function vm_return() { if (game.is_pwr_struggle || game.state === 'vm_tst_6' || game.return_state === 'ceausescu_check') { vm_end_event() } - // Check if auto-resolve opponent event - else if ( - is_auto_resolve(game.played_card) && - ((cards[game.played_card].side === 'C' && game.active === DEM) || - (cards[game.played_card].side === 'D' && game.active === COM)) - ) { - vm_end_event() + // Check if auto-resolve opponent event (excluding Kiss of Death) + else if (game.played_card !== C_KISS_OF_DEATH) { + if (is_auto_resolve(game.played_card) && + ((cards[game.played_card].side === 'C' && game.active === DEM) || + (cards[game.played_card].side === 'D' && game.active === COM)) + ) { + vm_end_event() + } } else { game.state = 'vm_end_event' } @@ -9237,7 +9238,9 @@ CODE[70] = [ // Securitate* CODE[71] = [ // Kiss of Death* [ vm_permanently_remove ], - [ vm_if, ()=>!is_auto_resolve(C_KISS_OF_DEATH) ], + [ vm_if, ()=>is_auto_resolve(C_KISS_OF_DEATH) ], + [ vm_log, 'Communist has no cards to discard.' ], + [ vm_else ], [ vm_kiss_of_death ], [ vm_endif ], [ vm_return ], |