diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-08 08:49:05 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-08 08:49:05 +0000 |
commit | 413878737e5613265ed8748b362b0f560c25ba26 (patch) | |
tree | 9a8f6902f928aae9909779c3aad3ad6c975ff25a /rules.js | |
parent | 18681864bffa4e0a7dab02f28683c5a04865d3c3 (diff) | |
download | 1989-dawn-of-freedom-413878737e5613265ed8748b362b0f560c25ba26.tar.gz |
Update logging of Genscher and AHBR
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -2267,12 +2267,18 @@ function add_infl(space, ops) { check_com_control(space) ) { game[ops]-- - log(`(-1 Op due to C${C_GENSCHER})`) + if (!game.genscher_logged) { + log(`C${C_GENSCHER}`) + game.genscher_logged = true + } } else if (check_opp_control(space)) { game[ops] -= 2 // Check if Austria Hungary Border Reopened was used to place last SP in a controlled space in East Germany. If so, game.available_op will be negative if (game[ops] < 0) { - log(`(Used +1 Op C${C_AUSTRIA_HUNGARY_BORDER_REOPENED})`) + if (!game.ahbr_logged) { + log(`C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`) + game.ahbr_logged = true + } } } else { game[ops]-- @@ -2297,7 +2303,10 @@ function add_infl(space, ops) { game.austria_hungary_border_reopened_tracker ) { game[ops] ++ - log('+1 Op C' + C_AUSTRIA_HUNGARY_BORDER_REOPENED + '.') + if (!game.ahbr_logged) { + log(`C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`) + game.ahbr_logged = true + } game.austria_hungary_border_reopened_tracker = false game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'East_Germany') } @@ -3253,7 +3262,8 @@ function goto_struggle() { } function reset_austria_hungary_border_reopened() { - game.austria_hungary_border_reopened_tracker = false + delete game.austria_hungary_border_reopened_tracker + delete game.ahbr_logged } function end_stasi_choose_card() { @@ -3801,6 +3811,7 @@ function end_round() { game.return = '' game.valid_cards = [] game.valid_spaces = [] + delete game.genscher_logged reset_austria_hungary_border_reopened() // Check for duplicate card entries |