From 18d079b8119547d4be23dc7de1bc263da4376367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Hu=C4=8Dko?= <56114531+IvanHucko@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:36:50 +0100 Subject: [PATCH] Don't apply search range to almost top rolled mods Co-authored-by: Alexander Drozdov --- .../web/price-check/filters/create-stat-filters.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/renderer/src/web/price-check/filters/create-stat-filters.ts b/renderer/src/web/price-check/filters/create-stat-filters.ts index 4f76f21b..392f308f 100644 --- a/renderer/src/web/price-check/filters/create-stat-filters.ts +++ b/renderer/src/web/price-check/filters/create-stat-filters.ts @@ -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)