fix: determine armor or shield based on sortie boss faction #2787
@ -266,14 +266,15 @@ export const getSortie = (day: number): ISortie => {
 | 
				
			|||||||
    const rng = new SRng(seed);
 | 
					    const rng = new SRng(seed);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const boss = rng.randomElement(sortieBosses)!;
 | 
					    const boss = rng.randomElement(sortieBosses)!;
 | 
				
			||||||
 | 
					    const enemyFaction = sortieBossToFaction[boss];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const nodes: string[] = [];
 | 
					    const nodes: string[] = [];
 | 
				
			||||||
    for (const [key, value] of Object.entries(ExportRegions)) {
 | 
					    for (const [key, value] of Object.entries(ExportRegions)) {
 | 
				
			||||||
        if (
 | 
					        if (
 | 
				
			||||||
            sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) &&
 | 
					            sortieFactionToSystemIndexes[enemyFaction].includes(value.systemIndex) &&
 | 
				
			||||||
            sortieFactionToFactions[sortieBossToFaction[boss]].includes(value.faction!) &&
 | 
					            sortieFactionToFactions[enemyFaction].includes(value.faction!) &&
 | 
				
			||||||
            key in sortieTilesets &&
 | 
					            key in sortieTilesets &&
 | 
				
			||||||
            (key != "SolNode228" || sortieBossToFaction[boss] == "FC_GRINEER") // PoE does not work for non-infested enemies
 | 
					            (key != "SolNode228" || enemyFaction == "FC_GRINEER") // PoE only works for grineer enemies
 | 
				
			||||||
        ) {
 | 
					        ) {
 | 
				
			||||||
            nodes.push(key);
 | 
					            nodes.push(key);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -339,13 +340,7 @@ export const getSortie = (day: number): ISortie => {
 | 
				
			|||||||
            modifiers.push("SORTIE_MODIFIER_HAZARD_RADIATION");
 | 
					            modifiers.push("SORTIE_MODIFIER_HAZARD_RADIATION");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (ExportRegions[node].faction == "FC_GRINEER") {
 | 
					        modifiers.push(enemyFaction == "FC_CORPUS" ? "SORTIE_MODIFIER_SHIELDS" : "SORTIE_MODIFIER_ARMOR");
 | 
				
			||||||
            // Grineer
 | 
					 | 
				
			||||||
            modifiers.push("SORTIE_MODIFIER_ARMOR");
 | 
					 | 
				
			||||||
        } else if (ExportRegions[node].faction == "FC_CORPUS") {
 | 
					 | 
				
			||||||
            // Corpus
 | 
					 | 
				
			||||||
            modifiers.push("SORTIE_MODIFIER_SHIELDS");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const modifierType = rng.randomElement(modifiers)!;
 | 
					        const modifierType = rng.randomElement(modifiers)!;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user