From 0090455a8d211a34dbaad3022f8c4178498f6451 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sat, 11 Jan 2025 11:19:07 +0000 Subject: Remove undo steps. Tweak final scoring --- rules.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 3e0016f..e26775d 100644 --- a/rules.js +++ b/rules.js @@ -1677,7 +1677,7 @@ states.vp_roll = { } }, take() { - push_undo() + //push_undo() let scoring_card = scoring_cards[countries.indexOf(game.pwr_struggle_in)] permanently_remove(scoring_card) log_gap('Power:') @@ -1686,7 +1686,7 @@ states.vp_roll = { game.phase = 2 }, scoring() { - push_undo() + //push_undo() score_country(game.pwr_struggle_in) resolve_tyrant() }, @@ -1831,7 +1831,7 @@ states.final_scoring_held = { gen_action('bonus') }, bonus() { - push_undo() + //push_undo() const held_countries = game.revolutions.filter(value => value === false).length let vp_gain = 4 * held_countries log(`Communist holds power in ${pluralize(held_countries, 'country', 's')}: -${vp_gain} VP.`) @@ -1844,6 +1844,7 @@ states.final_scoring_held = { Romania: false, Bulgaria: false, } + log_gap('Country scoring:') game.state = 'final_scoring' }, } @@ -2989,7 +2990,10 @@ function retain_power(country) { } function score_country(country) { - log_gap(`Scoring:`) + if (game.state === 'final_scoring') + log_h5(`${country}`) + else + log_gap(`Scoring:`) // Get scoring values let value_presence = get_value(country) @@ -3033,16 +3037,16 @@ function score_country(country) { log_gap('Communist:') if (presence.com_control) { logi(`Control, ${pluralize(presence.com_battlegrounds,' battleground')}`) - com_vp -= value_control - presence.com_battlegrounds + com_vp -= (value_control + presence.com_battlegrounds) } else if (presence.com_domination) { logi(`Domination. ${pluralize(presence.com_battlegrounds,' battleground')}`) - com_vp -= value_domination - presence.com_battlegrounds + com_vp -= (value_domination + presence.com_battlegrounds) } else if (presence.com_spaces) { if (presence.com_battlegrounds > 0) { logi(`Presence. ${pluralize(presence.com_battlegrounds,' battleground')}`) - com_vp -= value_presence - presence.com_battlegrounds + com_vp -= (value_presence + presence.com_battlegrounds) } else { logi(`Presence`) com_vp -= value_presence @@ -3167,6 +3171,13 @@ function score_country(country) { else log_gap('Score is ' + game.vp + ' VP.') */ + + if (game.state === 'final_scoring') { + if (game.vp > 0) + log_gap(`Score is +${game.vp} VP`) + else + log_gap(`Score is +${game.vp} VP`) + } } function get_value(country) { -- cgit v1.2.3