fix an issue with seed 41449 (SORTIE_BOSS_KRIL)
This commit is contained in:
parent
adcd090a54
commit
1abc74cab3
@ -67,6 +67,12 @@ const sortieFactionToFactionIndexes: Record<string, number[]> = {
|
|||||||
FC_OROKIN: [3]
|
FC_OROKIN: [3]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const sortieFactionToSpecialMissionTileset: Record<string, string> = {
|
||||||
|
FC_GRINEER: "GrineerGalleonTileset",
|
||||||
|
FC_CORPUS: "CorpusShipTileset",
|
||||||
|
FC_INFESTATION: "CorpusShipTileset"
|
||||||
|
};
|
||||||
|
|
||||||
const sortieBossNode: Record<string, string> = {
|
const sortieBossNode: Record<string, string> = {
|
||||||
SORTIE_BOSS_HYENA: "SolNode127",
|
SORTIE_BOSS_HYENA: "SolNode127",
|
||||||
SORTIE_BOSS_KELA: "SolNode193",
|
SORTIE_BOSS_KELA: "SolNode193",
|
||||||
@ -282,9 +288,9 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sortieBossToFaction[boss] == "FC_OROKIN") {
|
const specialMissionTypes = [1, 3, 5, 9];
|
||||||
const orokinDisallowedMissionTypes = [1, 2, 5, 9];
|
if (!(sortieBossToFaction[boss] in sortieFactionToSpecialMissionTileset)) {
|
||||||
for (const missionType of orokinDisallowedMissionTypes) {
|
for (const missionType of specialMissionTypes) {
|
||||||
const i = availableMissionIndexes.indexOf(missionType);
|
const i = availableMissionIndexes.indexOf(missionType);
|
||||||
if (i != -1) {
|
if (i != -1) {
|
||||||
availableMissionIndexes.splice(i, 1);
|
availableMissionIndexes.splice(i, 1);
|
||||||
@ -296,13 +302,22 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
|
|||||||
const missionTypes = new Set();
|
const missionTypes = new Set();
|
||||||
|
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
const randomIndex = rng.randomInt(0, nodes.length - 1);
|
let randomIndex;
|
||||||
const node = nodes[randomIndex];
|
let node;
|
||||||
let missionIndex = ExportRegions[node].missionIndex;
|
let missionIndex;
|
||||||
|
do {
|
||||||
|
randomIndex = rng.randomInt(0, nodes.length - 1);
|
||||||
|
node = nodes[randomIndex];
|
||||||
|
|
||||||
|
missionIndex = ExportRegions[node].missionIndex;
|
||||||
if (missionIndex != 28) {
|
if (missionIndex != 28) {
|
||||||
missionIndex = rng.randomElement(availableMissionIndexes);
|
missionIndex = rng.randomElement(availableMissionIndexes);
|
||||||
}
|
}
|
||||||
|
} while (
|
||||||
|
specialMissionTypes.indexOf(missionIndex) != -1 &&
|
||||||
|
sortieTilesets[node as keyof typeof sortieTilesets] !=
|
||||||
|
sortieFactionToSpecialMissionTileset[sortieBossToFaction[boss]]
|
||||||
|
);
|
||||||
|
|
||||||
if (i == 2 && rng.randomInt(0, 2) == 2) {
|
if (i == 2 && rng.randomInt(0, 2) == 2) {
|
||||||
const filteredModifiers = modifiers.filter(mod => mod !== "SORTIE_MODIFIER_MELEE_ONLY");
|
const filteredModifiers = modifiers.filter(mod => mod !== "SORTIE_MODIFIER_MELEE_ONLY");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user