From f03c54096910c03e441ea3676f223bdabef753cc Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 13 Jan 2025 22:23:25 +0000 Subject: Tweak PS logging --- rules.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 75802a7..995af40 100644 --- a/rules.js +++ b/rules.js @@ -2871,6 +2871,7 @@ function battlegrounds(country) { function take_power(country) { game.revolutions[find_country_index(country)] = true game.times_held[find_country_index(country)] = 1 + game.vp_retain = 0 } function retain_power(country) { @@ -2944,16 +2945,21 @@ function score_country(country) { } logi(`${com_vp} VP`) game.vp += dem_vp + com_vp - let final_vp = game.vp + game.vp_roll - if (final_vp > 0) - log(`C${scoring_cards[countries.indexOf(game.pwr_struggle_in)]}: +${final_vp} VP.`) - else - log(`C${scoring_cards[countries.indexOf(game.pwr_struggle_in)]}: ${final_vp} VP.`) if (game.state === 'final_scoring') { - if (game.vp > 0) - log_gap(`Score is +${game.vp} VP`) + if ((dem_vp + com_vp) > 0) + log_h4(`Total: +${dem_vp + com_vp} VP`) else - log_gap(`Score is ${game.vp} VP`) + log_h4(`Total: ${dem_vp + com_vp} VP`) + if (game.vp > 0) + log(`Score is +${game.vp} VP`) + else + log(`Score is ${game.vp} VP`) + } else { + let final_vp = dem_vp + com_vp + game.vp_roll + game.vp_retain + if (final_vp > 0) + log_h4(`Power Struggle total: +${final_vp} VP`) + else + log_h4(`Power Struggle total: ${final_vp} VP`) } } -- cgit v1.2.3