From 00064f2b6dfd39cefa80f804662c47bbe84ad2e6 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Tue, 14 Jan 2025 07:40:46 +0000 Subject: Tweak PS logging --- rules.js | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 89bb3e1..e68a190 100644 --- a/rules.js +++ b/rules.js @@ -2902,48 +2902,43 @@ function score_country(country) { log('Democrat:') if (presence.dem_control) { - logi(`Control, ${pluralize(presence.dem_battlegrounds,' battleground')}`) - dem_vp += value_control + presence.dem_battlegrounds + logi(`+${value_control} VP Control`) + dem_vp += value_control } else if (presence.dem_domination) { - logi(`Domination, ${pluralize(presence.dem_battlegrounds,' battleground')}`) - dem_vp += value_domination + presence.dem_battlegrounds + logi(`+${value_domination} VP Domination`) + dem_vp += value_domination } else if (presence.dem_spaces) { - if (presence.dem_battlegrounds > 0) { - logi(`Presence, ${pluralize(presence.dem_battlegrounds,' battleground')}`) - dem_vp += value_presence + presence.dem_battlegrounds - } else { - logi(`Presence`) - dem_vp += value_presence - } + logi(`+${value_presence} VP Presence`) + dem_vp += value_presence } - else { - logi('No presence') - } - logi(`+${dem_vp} VP`) + if (presence.dem_battlegrounds > 0) { + logi(`+${presence.dem_battlegrounds} VP Battlegrounds`) + dem_vp += presence.dem_battlegrounds + } + if (!presence.dem_spaces) + logi(`+${dem_vp} VP`) - log_gap('Communist:') + log('Communist:') if (presence.com_control) { - logi(`Control, ${pluralize(presence.com_battlegrounds,' battleground')}`) - com_vp -= (value_control + presence.com_battlegrounds) + logi(`-${value_control} VP Control`) + com_vp -= value_control } else if (presence.com_domination) { - logi(`Domination, ${pluralize(presence.com_battlegrounds,' battleground')}`) - com_vp -= (value_domination + presence.com_battlegrounds) + logi(`-${value_domination} VP Domination`) + com_vp -= value_domination } else if (presence.com_spaces) { - if (presence.com_battlegrounds > 0) { - logi(`Presence, ${pluralize(presence.com_battlegrounds,' battleground')}`) - com_vp -= (value_presence + presence.com_battlegrounds) - } else { - logi(`Presence`) - com_vp -= value_presence - } - } else { - logi('No presence') + logi(`-${value_presence} VP Presence`) + com_vp -= value_presence + } + if (presence.com_battlegrounds > 0) { + logi(`-${presence.com_battlegrounds} VP Battlegrounds`) + com_vp -= presence.com_battlegrounds } - logi(`${com_vp} VP`) + if (!presence.com_spaces) + logi(`-${com_vp} VP`) game.vp += dem_vp + com_vp if (game.state === 'final_scoring') { if ((dem_vp + com_vp) > 0) -- cgit v1.2.3