Don't apply search range to almost top rolled mods

Co-authored-by: Alexander Drozdov <snosme@gmail.com>
This commit is contained in:
Ivan Hučko
2023-11-19 15:36:50 +02:00
committed by GitHub
co-authored by Alexander Drozdov
parent 7a8fd213f7
commit 18d079b811
@@ -239,6 +239,19 @@ export function calculatedStatToFilter (
}
if (roll && !filter.option) {
if (
item.rarity === ItemRarity.Unique ||
calc.sources.some(({ modifier }) => modifier.info.tier === 1)
) {
const perfectRoll = (
(calc.stat.better === StatBetter.PositiveRoll && roll.value >= roll.max) ||
(calc.stat.better === StatBetter.NegativeRoll && roll.value <= roll.min)
)
if (perfectRoll) {
percent = 0
}
}
const dp =
calc.stat.dp ||
calc.sources.some(s => s.stat.stat.ref === calc.stat.ref && s.stat.roll!.dp)