From 5053e34e70289e795406f3043ba819dfe102f1f2 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Tue, 14 Jan 2025 20:10:03 +0000 Subject: Tweak Tyrant logging --- rules.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 0a0c6e2..fd6735e 100644 --- a/rules.js +++ b/rules.js @@ -1771,7 +1771,6 @@ states.end_turn_4_5_4 = { if (!dem_has_scoring_card && !com_has_scoring_card) { log('No held scoring cards.') } - if (dem_has_scoring_card && com_has_scoring_card) { log('Both players have held scoring cards') goto_game_over('', `The game is tied due to held scoring cards!`) @@ -4040,9 +4039,10 @@ function check_ceausescu() { function check_tyrant() { if (game.the_tyrant_is_gone > 0 && check_dem_control(game.the_tyrant_is_gone)) { - log('+2 VP C' + C_THE_TYRANT_IS_GONE + '.') + game.tyrant_log = '+2 VP C' + C_THE_TYRANT_IS_GONE + '.' game.vp += 2 if (check_vp()) { + summary_flush() return } delete game.the_tyrant_is_gone @@ -4051,7 +4051,7 @@ function check_tyrant() { function check_tyrant_sc() { if (game.the_tyrant_is_gone > 0 && check_dem_control(game.the_tyrant_is_gone)) { - logi('+2 VP C' + C_THE_TYRANT_IS_GONE + '.') + log('+2 VP C' + C_THE_TYRANT_IS_GONE + '.') game.vp += 2 if (check_vp()) { return @@ -4229,6 +4229,10 @@ function summary_flush() { } else { logi("None") } + if (game.tyrant_log) { + log(`${game.tyrant_log}`) + delete game.tyrant_log + } } // ============ MAP AND SET FUNCTIONS =========== -- cgit v1.2.3