Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
map(([crafterStatsPacket, classInfo, soulCrystal]) => {
return {
craftsmanship: crafterStatsPacket.craftsmanship,
control: crafterStatsPacket.control,
cp: crafterStatsPacket.cp,
clvl: Tables.LEVEL_TABLE[classInfo.level] || classInfo.level,
specialist: soulCrystal.catalogId === classInfo.classId + 10329
};
})
);
matches(simulationResult: SimulationResult): boolean {
const simulation = simulationResult.simulation.clone();
const clvl = Tables.LEVEL_TABLE[simulation.crafterStats.level] || simulation.crafterStats.level;
const byregotsIndex = simulation.actions.findIndex(a => a.is(ByregotsBlessing) || a.is(ByregotsMiracle));
return !simulation.actions
.slice(byregotsIndex - 5, byregotsIndex)
.some(a => a.is(Ingenuity) || a.is(Ingenuity))
&& simulation.actions
.slice(byregotsIndex)
.some(a => a.is(Ingenuity) || a.is(Ingenuity))
&& simulationResult.hqPercent < 100
&& clvl < simulation.recipe.rlvl;
}