diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-08-23 11:56:54 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-08-23 11:56:54 +0200 |
commit | 64ce021aa5567937f06ce8df350368b32faacdec (patch) | |
tree | 76b1281ff085718c5caf7c6a5f71a21ce7a4f1bd | |
parent | 7012e86d0baabf06967d4b2fd3ffb6ebd78ca827 (diff) | |
download | friedrich-64ce021aa5567937f06ce8df350368b32faacdec.tar.gz |
fix austrian victory check with OO (incorrect check for saxony objective)
-rw-r--r-- | rules.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -414,6 +414,8 @@ const full_objective = [ set_union(primary_objective[6], secondary_objective[6]), ] +const austrian_saxony_objectives = set_intersect(full_objective[P_AUSTRIA], data.country.Saxony) + function make_protect(power, country) { for (let s of all_objectives) if (set_has(country, s)) @@ -954,7 +956,7 @@ function check_offensive_option_victory() { function check_power_victory(victory, city_list, power) { if (power === P_AUSTRIA && is_offensive_option()) { let n = count_captured_objectives(power) - if (n >= city_list[power].length - 4 && has_conquered_one_of(data.country.Saxony)) + if (n >= city_list[power].length - 4 && has_conquered_one_of(austrian_saxony_objectives)) set_add(victory, power) return } |