From 9825032b69e7209ece9c8d7e10e2028db72d8b3a Mon Sep 17 00:00:00 2001 From: Dylan <28832631+DARwins1@users.noreply.github.com> Date: Sat, 27 Jul 2024 22:44:08 -0700 Subject: [PATCH] Ending Cutscene Logic Fixes - Fixed an edge-case where the Resistance isn't properly acknowledged as eradicated if the Coalition is attacked but not eradicated. - Fixed the special-case isolationist cutscenes showing the wrong Resistance affiliation. --- script/campaign/kingdomprogression.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/script/campaign/kingdomprogression.js b/script/campaign/kingdomprogression.js index e4612cd..09df448 100644 --- a/script/campaign/kingdomprogression.js +++ b/script/campaign/kingdomprogression.js @@ -2851,7 +2851,8 @@ function endCountdown() // Play ending cutscenes let msgName; const RESISTANCE_ALLIED = gameState.resistance.allianceState === "ALLIED"; - const RESISTANCE_ERADICATED = gameState.resistance.allianceState === "ERADICATED"; + // Different check here for the Resistance, since they can be later set to "HOSTILE" if their base is eradicated + const RESISTANCE_ERADICATED = gameState.resistance.allianceState !== "ALLIED"; const AMPHOS_ALLIED = gameState.amphos.allianceState === "ALLIED"; const AMPHOS_ERADICATED = gameState.amphos.allianceState === "ERADICATED"; const HELLRAISERS_ALLIED = gameState.hellraisers.allianceState === "ALLIED"; @@ -2881,15 +2882,15 @@ function endCountdown() { msgName = "OUTMSGALLE"; } - // Check if all ignored (without Resistance) + // Check if all ignored (with Resistance) else if (RESISTANCE_ALLIED && numAllied === 1 && numEradic === 0) { - msgName = "OUTMSGALLI"; + msgName = "OUTMSGALLIR"; } - // Check if all ignored (with Resistance) + // Check if all ignored (without Resistance) else if (!RESISTANCE_ALLIED && numAllied === 0 && numEradic === 1) { - msgName = "OUTMSGALLIR"; + msgName = "OUTMSGALLI"; } // General endings else