diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-01 18:30:17 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-01 18:30:17 +0100 |
commit | eee8d427718865f21ab328c8c5234aee15e96559 (patch) | |
tree | 3163680bfd0b0e4a2ed1a06441d3c5ef1a344496 | |
parent | 8379a9f203f7947f70cfaaa2452bd487569b1955 (diff) | |
download | 1989-dawn-of-freedom-eee8d427718865f21ab328c8c5234aee15e96559.tar.gz |
Fix for Reformer
-rw-r--r-- | rules.js | 24 |
1 files changed, 7 insertions, 17 deletions
@@ -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() {
|