From 6d04226467871e4327be2d913dcbb65b9cbff0e7 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sun, 27 Oct 2024 14:56:02 +0000 Subject: Fix vm_permanently_remove --- rules.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index fe34bd0..a9fa127 100644 --- a/rules.js +++ b/rules.js @@ -855,10 +855,11 @@ states.resolve_opponent_event = { opp_event() { game.vm_event_to_do = false game.return_state = 'resolve_opponent_event' + game.vm_event = game.played_card if (is_auto_resolve(game.played_card) || switch_events.includes(game.played_card)) { game.return = game.active log(`Played C${game.played_card} for the event`) - goto_vm(game.played_card)} + goto_vm(game.vm_event)} else { if (game.active === DEM) { game.return = COM @@ -867,7 +868,7 @@ states.resolve_opponent_event = { } next_player() log(`C${game.played_card}`) - goto_vm(game.played_card) + goto_vm(game.vm_event) } }, tst_7() { @@ -5869,6 +5870,7 @@ function vm_yakovlev_counsels_gorbachev() { function vm_permanently_remove () { // Check if the event is being played as the result of another card, e.g. Dash for the West, is a card which should be removed, and which hasn't already been removed! + console.log('game.vm_event', game.vm_event) if (game.vm_event !== 0 && cards[game.vm_event].remove === 1 && !game.strategy_removed.includes(game.vm_event)) { permanently_remove(game.vm_event) } -- cgit v1.2.3