From 5121f28c5f483f313d0b5b42cc0cdceca9a9b99d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 22 Dec 2021 12:56:53 +0100 Subject: richard: Clarence & Exeter are no longer heirs when converted. Important for the instant victory check. --- rules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index ee604ef..89bac06 100644 --- a/rules.js +++ b/rules.js @@ -931,12 +931,13 @@ function disband(who) { } function check_instant_victory() { - if (is_dead("York") && is_dead("March") && is_dead("Rutland") && is_dead("Clarence") && is_dead("Gloucester")) { + // Check Clarence/Y and Exeter/L specifically (they're not heirs if converted) + if (is_dead("York") && is_dead("March") && is_dead("Rutland") && is_dead("Clarence/Y") && is_dead("Gloucester")) { log("All York heirs are dead!"); game.victory = "Lancaster wins by eliminating all enemy heirs!"; game.result = LANCASTER; } - if (is_dead("Henry VI") && is_dead("Prince Edward") && is_dead("Exeter") && is_dead("Somerset") && is_dead("Richmond")) { + if (is_dead("Henry VI") && is_dead("Prince Edward") && is_dead("Exeter/L") && is_dead("Somerset") && is_dead("Richmond")) { log("All Lancaster heirs are dead!"); game.victory = "York wins by eliminating all enemy heirs!"; game.result = YORK; -- cgit v1.2.3