diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-11 11:19:07 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-11 11:19:07 +0000 |
commit | 0090455a8d211a34dbaad3022f8c4178498f6451 (patch) | |
tree | 6b12f3e94193064cf0327041e41fe6cf74146dea /rules.js | |
parent | 217254a4f59baf3352139b3cf95bdd398347c94f (diff) | |
download | 1989-dawn-of-freedom-0090455a8d211a34dbaad3022f8c4178498f6451.tar.gz |
Remove undo steps. Tweak final scoring
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -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) { |