summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-27 14:56:02 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-27 14:56:02 +0000
commit6d04226467871e4327be2d913dcbb65b9cbff0e7 (patch)
tree827c657bc9c62fe7c411a4cdad13a22229362b89
parent50c8e4d663ed6fc61374dad9fd6d7d5e7bdaa796 (diff)
download1989-dawn-of-freedom-6d04226467871e4327be2d913dcbb65b9cbff0e7.tar.gz
Fix vm_permanently_remove
-rw-r--r--rules.js6
1 files 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)
}