From adcd090a5412a440556894f00c3b46d14f4dae70 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:12:51 +0200 Subject: [PATCH] ensure FC_OROKIN sortie does not pick a bad mission type --- src/services/worldStateService.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 9184d494..f3da8c92 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -50,21 +50,21 @@ const sortieBossToFaction: Record = { 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 = { 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 = { FC_GRINEER: [0], FC_CORPUS: [1], FC_INFESTATION: [0, 1, 2], - FC_CORRUPTED: [3] + FC_OROKIN: [3] }; const sortieBossNode: Record = { @@ -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); }