From 8e242bf261d369a7434c338f0578661cb626142d Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sun, 22 Sep 2024 18:55:31 +0100 Subject: Fix Reformer Rehabilitated --- rules.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index cbcc69d..9d8d372 100644 --- a/rules.js +++ b/rules.js @@ -430,6 +430,8 @@ states.choose_card = { }, card(card) { push_undo() + game.playable_cards[67].playable = DEM + console.log('game.playable_cards[67].playable', game.playable_cards[67].playable) game.played_card = card let find_card if (game.active === COM) { @@ -508,8 +510,13 @@ states.play_card ={ } // Special check for Reformer Rehabilitated - if ((game.active === DEM && game.playable_cards[game.played_card] === 2 && (game.dem_tst_position > game.com_tst_position)) || (game.active === COM && game.playable_cards[game.played_card].playable === 2 && (game.dem_tst_position < game.com_tst_position))) { - gen_action('event') + if (game.played_card === 67){ + if (game.active === DEM && game.playable_cards[67].playable === DEM) { + gen_action('event') + } + if (game.active === COM && game.playable_cards[67].playable === COM) { + gen_action('event') + } } //Continue with normal logic @@ -2614,8 +2621,11 @@ function do_tst_attempt() { } } // Check whether The Reformer is playable: - if ((game.dem_tst_position !== game.com_tst_position)) { - game.playable_cards[67].playable = 2 + if ((game.dem_tst_position > game.com_tst_position)) { + game.playable_cards[67].playable = DEM + } + if ((game.dem_tst_position < game.com_tst_position)) { + game.playable_cards[67].playable = COM } } -- cgit v1.2.3