diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-28 07:48:28 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-28 07:48:28 +0100 |
commit | 596edf2c4bf3461368451beabb139fdc9289708b (patch) | |
tree | 84e1b5f1aad405d22284f540a9dcde91ba1d074a /rules.js | |
parent | 7eccedf3e0ec6cf88b2e09b88a168170a0a98428 (diff) | |
download | 1989-dawn-of-freedom-596edf2c4bf3461368451beabb139fdc9289708b.tar.gz |
Fix for Reformer
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 36 |
1 files changed, 20 insertions, 16 deletions
@@ -2763,21 +2763,6 @@ function do_tst_attempt() { game.com_tst_attempted = 1
}
}
- // Check whether The Reformer is playable:
- 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[67].playable = DEM
- }
- if (game.dem_tst_position < game.com_tst_position) {
- console.log('reformer set to COM')
- game.playable_cards[67].playable = COM
- }
- if (game.dem_tst_position === game.com_tst_position) {
- console.log(`reformer set to ''`)
- game.playable_cards[67].playable = ''
- }
- console.log('game.playable_cards[67].playable', game.playable_cards[67].playable)
}
function check_presence(country) {
@@ -3078,6 +3063,23 @@ 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[67].playable = DEM
+ }
+ if (game.dem_tst_position < game.com_tst_position) {
+ console.log('reformer set to COM')
+ game.playable_cards[67].playable = COM
+ }
+ if (game.dem_tst_position === game.com_tst_position) {
+ console.log(`reformer set to ''`)
+ game.playable_cards[67].playable = ''
+ }
+ console.log('game.playable_cards[67].playable', game.playable_cards[67].playable)
+}
+
// =========== MOVING THROUGH TURNS ============
function end_round() {
@@ -3154,7 +3156,9 @@ function end_round() { console.log('game.dem_tst_position ', game.dem_tst_position , 'game.com_tst_position ', game.com_tst_position )
-
+ //Check if the Reformer is playable
+ check_reformer()
+
// Check if last round and if so resolve end turn events
if (game.round_player === DEM && game.round === 7) {
if(game.persistent_events['honecker']) {
|