summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-01 20:28:51 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-01 20:28:51 +0100
commit065ac069ed8109ba67c10ea6874fd442ec0b4ab9 (patch)
tree78b7aa73a5a79af16ef925ac1c91ae787ffca9b5 /rules.js
parentc6203fe6c2b81e075671405b97bec8f6a93db515 (diff)
downloadmaria-065ac069ed8109ba67c10ea6874fd442ec0b4ab9.tar.gz
fix victory pool display (missed elector majority)
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js20
1 files changed, 10 insertions, 10 deletions
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))