diff --git a/app/features/build-analyzer/analyzer-types.ts b/app/features/build-analyzer/analyzer-types.ts index f00086071..687778aec 100644 --- a/app/features/build-analyzer/analyzer-types.ts +++ b/app/features/build-analyzer/analyzer-types.ts @@ -280,7 +280,8 @@ export interface AnalyzedBuild { specialMoveSpeed?: Stat; specialAutoChargeRate?: Stat; specialMaxRadius?: Stat; - specialRadiusRange?: Stat; + specialRadiusRangeMin?: Stat; + specialRadiusRangeMax?: Stat; specialPowerUpDuration?: Stat; }; } diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index 33831b5ee..02944c6ae 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -173,7 +173,8 @@ export function buildStats({ specialMoveSpeed: specialMoveSpeed(input), specialAutoChargeRate: specialAutoChargeRate(input), specialMaxRadius: specialMaxRadius(input), - specialRadiusRange: specialRadiusRange(input), + specialRadiusRangeMin: specialRadiusRangeMin(input), + specialRadiusRangeMax: specialRadiusRangeMax(input), specialPowerUpDuration: specialPowerUpDuration(input), }, }; @@ -1742,14 +1743,39 @@ function specialMaxRadius( }; } -function specialRadiusRange( +function specialRadiusRangeMax( args: StatFunctionInput, -): AnalyzedBuild["stats"]["specialRadiusRange"] { +): AnalyzedBuild["stats"]["specialRadiusRangeMax"] { if ( !hasEffect({ key: "RadiusMax", weapon: args.specialWeaponParams, - }) || + }) + ) { + return; + } + + const SPECIAL_RADIUS_RANGE_KEY = "SPU"; + + const radiusMax = abilityPointsToEffects({ + abilityPoints: apFromMap({ + abilityPoints: args.abilityPoints, + ability: SPECIAL_RADIUS_RANGE_KEY, + }), + key: "RadiusMax", + weapon: args.specialWeaponParams, + }); + + return { + baseValue: roundToNDecimalPlaces(radiusMax.baseEffect), + value: roundToNDecimalPlaces(radiusMax.effect), + modifiedBy: SPECIAL_RADIUS_RANGE_KEY, + }; +} +function specialRadiusRangeMin( + args: StatFunctionInput, +): AnalyzedBuild["stats"]["specialRadiusRangeMin"] { + if ( !hasEffect({ key: "RadiusMin", weapon: args.specialWeaponParams, @@ -1768,22 +1794,10 @@ function specialRadiusRange( key: "RadiusMin", weapon: args.specialWeaponParams, }); - const radiusMax = abilityPointsToEffects({ - abilityPoints: apFromMap({ - abilityPoints: args.abilityPoints, - ability: SPECIAL_RADIUS_RANGE_KEY, - }), - key: "RadiusMax", - weapon: args.specialWeaponParams, - }); return { - baseValue: `${roundToNDecimalPlaces( - radiusMin.baseEffect, - )}-${roundToNDecimalPlaces(radiusMax.baseEffect)}`, - value: `${roundToNDecimalPlaces(radiusMin.effect)}-${roundToNDecimalPlaces( - radiusMax.effect, - )}`, + baseValue: roundToNDecimalPlaces(radiusMin.baseEffect), + value: roundToNDecimalPlaces(radiusMin.effect), modifiedBy: SPECIAL_RADIUS_RANGE_KEY, }; } diff --git a/app/features/build-analyzer/routes/analyzer.tsx b/app/features/build-analyzer/routes/analyzer.tsx index 3d215d141..e31dfdcf0 100644 --- a/app/features/build-analyzer/routes/analyzer.tsx +++ b/app/features/build-analyzer/routes/analyzer.tsx @@ -649,11 +649,22 @@ function BuildAnalyzerPage() { popoverInfo={t("analyzer:stat.special.maxRadius.explanation")} /> )} - {analyzed.stats.specialRadiusRange && ( + {analyzed.stats.specialRadiusRangeMin && ( + )} + {analyzed.stats.specialRadiusRangeMax && ( +