From 065ac069ed8109ba67c10ea6874fd442ec0b4ab9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 1 Nov 2024 20:28:51 +0100 Subject: fix victory pool display (missed elector majority) --- rules.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 19fc50d..7b24f13 100644 --- a/rules.js +++ b/rules.js @@ -3116,7 +3116,7 @@ function goto_winter_turn() { // record winter scores for (let pow of all_major_powers) - game.score[pow].push(count_vp_markers_in_pool(pow)) + game.score[pow].push(count_victory_markers_in_pool(pow)) if (is_intro()) { if (game.turn === 10) { @@ -4107,7 +4107,7 @@ function elector_majority() { return -1 } -function count_vp_markers(pow) { +function count_victory_markers(pow) { let n = game.vp[pow] if (pow === P_PRUSSIA) { n += game.vp[SET_ASIDE_PRUSSIA] @@ -4132,8 +4132,8 @@ function count_vp_markers(pow) { return n } -function count_vp_markers_in_pool(pow) { - return Math.max(0, power_victory_target[pow] - count_vp_markers(pow)) +function count_victory_markers_in_pool(pow) { + return Math.max(0, power_victory_target[pow] - count_victory_markers(pow)) } function count_victory_markers_in_country(pow, country) { @@ -4174,10 +4174,10 @@ function check_instant_victory() { return check_instant_victory_intro() let margin = [ - count_vp_markers(P_FRANCE) - 11, - count_vp_markers(P_PRUSSIA) - 13, - count_vp_markers(P_PRAGMATIC) - 8, - count_vp_markers(P_AUSTRIA) - 8, + count_victory_markers(P_FRANCE) - 11, + count_victory_markers(P_PRUSSIA) - 13, + count_victory_markers(P_PRAGMATIC) - 8, + count_victory_markers(P_AUSTRIA) - 8, ] let best = 0 @@ -5419,7 +5419,7 @@ states.silesia_done = { function goto_france_reduces_military_objectives() { if ( !(game.flags & F_FRANCE_REDUCED) && - count_french_vp_markers_in_core_austria() > 0 && + count_french_victory_markers_in_core_austria() > 0 && france_has_no_generals_in_core_austria() ) game.state = "france_reduces_military_objectives" @@ -5427,7 +5427,7 @@ function goto_france_reduces_military_objectives() { next_sequence_of_play() } -function count_french_vp_markers_in_core_austria() { +function count_french_victory_markers_in_core_austria() { let n = 0 map_for_each(game.victory, (s, pow) => { if (pow === P_FRANCE && set_has(all_core_austria_cities, s)) -- cgit v1.2.3