返回提交历史
Modified
src/services/worldStateService.ts
+5
-10
XFEstudio/XFESpaceNinjaServer
fix: determine armor or shield based on sortie boss faction (#2787)
Closes #2785 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2787 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
c47c60fd
代码差异
1 个文件
+5
-10
@@ -266,14 +266,15 @@ export const getSortie = (day: number): ISortie => {
266
266
const rng = new SRng(seed);
267
267
268
268
const boss = rng.randomElement(sortieBosses)!;
269
const enemyFaction = sortieBossToFaction[boss];
269
270
270
271
const nodes: string[] = [];
271
272
for (const [key, value] of Object.entries(ExportRegions)) {
272
273
if (
273
sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) &&
274
sortieFactionToFactions[sortieBossToFaction[boss]].includes(value.faction!) &&
274
sortieFactionToSystemIndexes[enemyFaction].includes(value.systemIndex) &&
275
sortieFactionToFactions[enemyFaction].includes(value.faction!) &&
275
276
key in sortieTilesets &&
276
(key != "SolNode228" || sortieBossToFaction[boss] == "FC_GRINEER") // PoE does not work for non-infested enemies
277
(key != "SolNode228" || enemyFaction == "FC_GRINEER") // PoE only works for grineer enemies
277
278
) {
278
279
nodes.push(key);
279
280
}
@@ -339,13 +340,7 @@ export const getSortie = (day: number): ISortie => {
339
340
modifiers.push("SORTIE_MODIFIER_HAZARD_RADIATION");
340
341
}
341
342
342
if (ExportRegions[node].faction == "FC_GRINEER") {
343
// Grineer
344
modifiers.push("SORTIE_MODIFIER_ARMOR");
345
} else if (ExportRegions[node].faction == "FC_CORPUS") {
346
// Corpus
347
modifiers.push("SORTIE_MODIFIER_SHIELDS");
348
}
343
modifiers.push(enemyFaction == "FC_CORPUS" ? "SORTIE_MODIFIER_SHIELDS" : "SORTIE_MODIFIER_ARMOR");
349
344
350
345
const modifierType = rng.randomElement(modifiers)!;
351
346