From cabdbd1da429a6595a89a2dcb72de360e46aa082 Mon Sep 17 00:00:00 2001
From: Kalle <38327916+Sendouc@users.noreply.github.com>
Date: Sun, 18 Sep 2022 20:37:11 +0300
Subject: [PATCH] Tenta Missiles SPU effect
---
app/modules/analyzer/stats.ts | 30 ++++++++++++++++++++++++++++++
app/modules/analyzer/types.ts | 1 +
app/routes/analyzer.tsx | 10 ++++++++++
public/locales/en/analyzer.json | 1 +
4 files changed, 42 insertions(+)
diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts
index 56342adb5..cc1d6209c 100644
--- a/app/modules/analyzer/stats.ts
+++ b/app/modules/analyzer/stats.ts
@@ -116,6 +116,7 @@ export function buildStats({
specialHookInkConsumptionPercentage(input),
specialInkConsumptionPerSecondPercentage:
specialInkConsumptionPerSecondPercentage(input),
+ specialReticleRadius: specialReticleRadius(input),
},
};
}
@@ -1125,3 +1126,32 @@ function specialInkConsumptionPerSecondPercentage(
modifiedBy: SPECIAL_INK_CONSUMPTION_PER_SECOND_PERCENTAGE_KEY,
};
}
+
+function specialReticleRadius(
+ args: StatFunctionInput
+): AnalyzedBuild["stats"]["specialReticleRadius"] {
+ if (
+ !hasEffect({
+ key: "TargetInCircleRadius",
+ weapon: args.specialWeaponParams,
+ })
+ ) {
+ return;
+ }
+
+ const SPECIAL_RETICLE_RADIUS_KEY = "SPU";
+ const { baseEffect, effect } = abilityPointsToEffects({
+ abilityPoints: apFromMap({
+ abilityPoints: args.abilityPoints,
+ ability: SPECIAL_RETICLE_RADIUS_KEY,
+ }),
+ key: "TargetInCircleRadius",
+ weapon: args.specialWeaponParams,
+ });
+
+ return {
+ baseValue: roundToTwoDecimalPlaces(baseEffect),
+ value: roundToTwoDecimalPlaces(effect),
+ modifiedBy: SPECIAL_RETICLE_RADIUS_KEY,
+ };
+}
diff --git a/app/modules/analyzer/types.ts b/app/modules/analyzer/types.ts
index d753c1f57..cc3302e6a 100644
--- a/app/modules/analyzer/types.ts
+++ b/app/modules/analyzer/types.ts
@@ -233,6 +233,7 @@ export interface AnalyzedBuild {
specialDeviceHp?: Stat;
specialHookInkConsumptionPercentage?: Stat;
specialInkConsumptionPerSecondPercentage?: Stat;
+ specialReticleRadius?: Stat;
};
}
diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx
index 96914c189..0356f2c21 100644
--- a/app/routes/analyzer.tsx
+++ b/app/routes/analyzer.tsx
@@ -330,6 +330,16 @@ export default function BuildAnalyzerPage() {
suffix="%"
/>
)}
+ {analyzed.stats.specialReticleRadius && (
+
+ )}