diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-26 13:21:38 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-26 13:21:38 +0200 |
commit | 4dfb296816fd1c817b9f85db749604c790620b0a (patch) | |
tree | df551f150b1f83293372dfcdf177a2b7b35aae55 | |
parent | d2e024bc100288ac0f52e082fb13679420e7d733 (diff) | |
download | plantagenet-4dfb296816fd1c817b9f85db749604c790620b0a.tar.gz |
fix victory check
-rw-r--r-- | rules.ts | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 } |