Skip to content

Commit

Permalink
Ending Cutscene Logic Fixes
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
DARwins1 committed Jul 28, 2024
1 parent ac84c0d commit 9825032
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions script/campaign/kingdomprogression.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9825032

Please sign in to comment.