summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-26 13:21:38 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-26 13:21:38 +0200
commit4dfb296816fd1c817b9f85db749604c790620b0a (patch)
treedf551f150b1f83293372dfcdf177a2b7b35aae55
parentd2e024bc100288ac0f52e082fb13679420e7d733 (diff)
downloadplantagenet-4dfb296816fd1c817b9f85db749604c790620b0a.tar.gz
fix victory check
-rw-r--r--rules.ts16
1 files changed, 10 insertions, 6 deletions
diff --git a/rules.ts b/rules.ts
index e1fa407..b13b336 100644
--- a/rules.ts
+++ b/rules.ts
@@ -8896,12 +8896,12 @@ function is_waste_turn() {
}
function goto_victory_check() {
- if (check_scenario_end_victory())
- return
if (check_campaign_victory())
return
if (check_threshold_victory())
return
+ if (check_scenario_end_victory())
+ return
if (is_grow_turn())
do_grow()
@@ -9000,21 +9000,25 @@ function end_reset() {
// === 5.1 CAMPAIGN VICTORY ===
function check_campaign_victory_york() {
+ let next_turn = current_turn() + 1
for (let lord of all_lancaster_lords) {
if (is_lord_on_map(lord))
return false
- if (is_lord_in_exile(lord) && get_lord_calendar(lord) === current_turn() + 1)
- return false
+ if (next_turn <= 15)
+ if (is_lord_in_exile(lord) && get_lord_calendar(lord) === next_turn)
+ return false
}
return true
}
function check_campaign_victory_lancaster() {
+ let next_turn = current_turn() + 1
for (let lord of all_york_lords) {
if (is_lord_on_map(lord))
return false
- if (is_lord_in_exile(lord) && get_lord_calendar(lord) === current_turn() + 1)
- return false
+ if (next_turn <= 15)
+ if (is_lord_in_exile(lord) && get_lord_calendar(lord) === next_turn)
+ return false
}
return true
}