From 324c500f25c5c7db38d3ba4e1bf21f351b142e7a Mon Sep 17 00:00:00 2001 From: iainp5 Date: Fri, 20 Sep 2024 12:26:52 +0100 Subject: Fix errors game.playable_cards --- rules.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rules.js b/rules.js index 2f5fdb9..c77ab30 100644 --- a/rules.js +++ b/rules.js @@ -471,7 +471,7 @@ states.choose_card = { game.persistent_events['ligachev'] = false } console.log('game.played_card', game.played_card, 'playable', game.playable_cards[game.played_card].playable) - game.playable_cards[97].playable = 1 + game.playable_cards[97] = {number: 97, playable: 1} console.log('game.playable_cards', game.playable_cards) console.log('game.played_card', game.played_card, 'playable', game.playable_cards[game.played_card].playable) game.state = 'play_card' @@ -512,7 +512,7 @@ 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] === 2 && (game.dem_tst_position < game.com_tst_position))) { + 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') } @@ -2542,7 +2542,7 @@ function do_tst_attempt() { } // Check whether The Reformer is playable: if ((game.dem_tst_position !== game.com_tst_position)) { - game.playable_cards[67] = 2 + game.playable_cards[67].playable = 2 } } @@ -4955,10 +4955,10 @@ function vm_the_tyrant_is_gone() { game.valid_spaces.push(space.space_id) } } - game.playable_cards[10] = 0 - game.playable_cards[41] = 0 - game.playable_cards[101] = 0 - game.playable_cards[107] = 0 + game.playable_cards[10].playable = 0 + game.playable_cards[41].playable = 0 + game.playable_cards[101].playable = 0 + game.playable_cards[107].playable = 0 game.state = 'vm_the_tyrant_is_gone' } -- cgit v1.2.3