summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-12-22 12:56:53 +0100
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:12:55 +0100
commit5121f28c5f483f313d0b5b42cc0cdceca9a9b99d (patch)
tree9088f6faf1db7b8f6b4682cf76692b4d487bb800
parent6fbbb30892744e164b294cc30a48112f2aa3f058 (diff)
downloadrichard-iii-5121f28c5f483f313d0b5b42cc0cdceca9a9b99d.tar.gz
richard: Clarence & Exeter are no longer heirs when converted.
Important for the instant victory check.
-rw-r--r--rules.js5
1 files 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;