ensure FC_OROKIN sortie does not pick a bad mission type
All checks were successful
Build / build (pull_request) Successful in 1m5s
Build / build (push) Successful in 52s

This commit is contained in:
Sainan 2025-04-26 20:12:51 +02:00
parent b981a8fcc9
commit adcd090a54

View File

@ -50,21 +50,21 @@ const sortieBossToFaction: Record<string, string> = {
SORTIE_BOSS_PHORID: "FC_INFESTATION",
SORTIE_BOSS_LEPHANTIS: "FC_INFESTATION",
SORTIE_BOSS_INFALAD: "FC_INFESTATION",
SORTIE_BOSS_CORRUPTED_VOR: "FC_CORRUPTED"
SORTIE_BOSS_CORRUPTED_VOR: "FC_OROKIN"
};
const sortieFactionToSystemIndexes: Record<string, number[]> = {
FC_GRINEER: [0, 2, 3, 5, 6, 9, 11, 18],
FC_CORPUS: [1, 4, 7, 8, 12, 15],
FC_INFESTATION: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15],
FC_CORRUPTED: [14]
FC_OROKIN: [14]
};
const sortieFactionToFactionIndexes: Record<string, number[]> = {
FC_GRINEER: [0],
FC_CORPUS: [1],
FC_INFESTATION: [0, 1, 2],
FC_CORRUPTED: [3]
FC_OROKIN: [3]
};
const sortieBossNode: Record<string, string> = {
@ -282,6 +282,16 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
}
}
if (sortieBossToFaction[boss] == "FC_OROKIN") {
const orokinDisallowedMissionTypes = [1, 2, 5, 9];
for (const missionType of orokinDisallowedMissionTypes) {
const i = availableMissionIndexes.indexOf(missionType);
if (i != -1) {
availableMissionIndexes.splice(i, 1);
}
}
}
const selectedNodes: ISortieMission[] = [];
const missionTypes = new Set();
@ -290,11 +300,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
const node = nodes[randomIndex];
let missionIndex = ExportRegions[node].missionIndex;
if (
!["SolNode404", "SolNode411"].includes(node) && // for some reason the game doesn't like missionType changes for these missions
missionIndex != 28 &&
rng.randomInt(0, 2) == 2
) {
if (missionIndex != 28) {
missionIndex = rng.randomElement(availableMissionIndexes);
}