diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-22 18:55:31 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-22 18:55:31 +0100 |
commit | 8e242bf261d369a7434c338f0578661cb626142d (patch) | |
tree | 759933dafcf033c005062a308be2cb6f72f86b65 | |
parent | 54f39a619066d5fe28496270938e29cae7cc9b3d (diff) | |
download | 1989-dawn-of-freedom-8e242bf261d369a7434c338f0578661cb626142d.tar.gz |
Fix Reformer Rehabilitated
-rw-r--r-- | rules.js | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -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
}
}
|