From eee8d427718865f21ab328c8c5234aee15e96559 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Tue, 1 Oct 2024 18:30:17 +0100 Subject: Fix for Reformer --- rules.js | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 1a3f053..da3cc3f 100644 --- a/rules.js +++ b/rules.js @@ -3131,23 +3131,13 @@ function end_stasi_choose_card() { } function check_reformer() { - /*console.log('reformer check, dem pos:', game.dem_tst_position, 'com:', game.com_tst_position) - if (game.dem_tst_position > game.com_tst_position) { - console.log('reformer set to DEM') - //game.playable_cards[find_event(67)] = DEM - } - if (game.dem_tst_position < game.com_tst_position) { - //console.log('reformer set to COM') - //console.log('game.playable_cards[66].playable before', game.playable_cards[66].playable) - //console.log('game.playable_cards[67].playable before', game.playable_cards[67].playable) - game.playable_cards[find_event(67)] = COM - //console.log('game.playable_cards[67].playable after', game.playable_cards[67].playable) - } - if (game.dem_tst_position === game.com_tst_position) { - //console.log(`reformer set to ''`) - game.playable_cards[find_event(67)] = '' - } - //console.log('game.playable_cards[67].playable', game.playable_cards[67].playable) */ + if (game.dem_tst_position !== game.com_tst_position) { + if (!game.playable_cards.includes(67)) { + game.playable_cards.push(67) + } + } else { + game.playable_cards = game.playable_cards.filter(n => n !== 67) + } } function count_scoring_cards() { -- cgit v1.2.3