summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-01-04 23:16:49 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-01-04 23:16:49 +0000
commitcecd7a8c88d50505ba67e15a017d0f0ea3b70de8 (patch)
tree9e072134bbfc399fa18e80877a11d96f218c08e1 /rules.js
parente9cdc5e455fd2481895b9c03fef5d4e1f1c592a9 (diff)
download1989-dawn-of-freedom-cecd7a8c88d50505ba67e15a017d0f0ea3b70de8.tar.gz
Fix autoresolve for Kiss of Death
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 5d7183d..3f80460 100644
--- a/rules.js
+++ b/rules.js
@@ -479,6 +479,7 @@ exports.view = function (state, player) {
}
}
return view
+ console.log('view', view)
}
// === ACTIONS ===========
@@ -4746,14 +4747,12 @@ function vm_return() {
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) &&
+ else if ((is_auto_resolve(game.played_card) && game.played_card !== C_KISS_OF_DEATH ) &&
((cards[game.played_card].side === 'C' && game.active === DEM) ||
(cards[game.played_card].side === 'D' && game.active === COM))
) {
vm_end_event()
- }
- } else {
+ } else {
game.state = 'vm_end_event'
}
}