From 059d7383402120f435cdc72e77ee61531ab91afd Mon Sep 17 00:00:00 2001
From: Kalle <38327916+Sendouc@users.noreply.github.com>
Date: Mon, 19 Sep 2022 17:58:38 +0300
Subject: [PATCH] Wave Breaker SPU effect
---
app/modules/analyzer/stats.ts | 30 ++++++++++++++++++++++++++++++
app/modules/analyzer/types.ts | 1 +
app/routes/analyzer.tsx | 11 +++++++++++
public/locales/en/analyzer.json | 2 ++
4 files changed, 44 insertions(+)
diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts
index 706a55f93..9eeb48d36 100644
--- a/app/modules/analyzer/stats.ts
+++ b/app/modules/analyzer/stats.ts
@@ -119,6 +119,7 @@ export function buildStats({
specialReticleRadius: specialReticleRadius(input),
specialThrowDistance: specialThrowDistance(input),
specialAutoChargeRate: specialAutoChargeRate(input),
+ specialMaxRadius: specialMaxRadius(input),
},
};
}
@@ -1215,3 +1216,32 @@ function specialAutoChargeRate(
modifiedBy: SPECIAL_AUTO_CHARGE_RATE_KEY,
};
}
+
+function specialMaxRadius(
+ args: StatFunctionInput
+): AnalyzedBuild["stats"]["specialMaxRadius"] {
+ if (
+ !hasEffect({
+ key: "MaxRadius",
+ weapon: args.specialWeaponParams,
+ })
+ ) {
+ return;
+ }
+
+ const SPECIAL_MAX_RADIUS_KEY = "SPU";
+ const { baseEffect, effect } = abilityPointsToEffects({
+ abilityPoints: apFromMap({
+ abilityPoints: args.abilityPoints,
+ ability: SPECIAL_MAX_RADIUS_KEY,
+ }),
+ key: "MaxRadius",
+ weapon: args.specialWeaponParams,
+ });
+
+ return {
+ baseValue: roundToTwoDecimalPlaces(baseEffect),
+ value: roundToTwoDecimalPlaces(effect),
+ modifiedBy: SPECIAL_MAX_RADIUS_KEY,
+ };
+}
diff --git a/app/modules/analyzer/types.ts b/app/modules/analyzer/types.ts
index 875a67654..a85a9b29b 100644
--- a/app/modules/analyzer/types.ts
+++ b/app/modules/analyzer/types.ts
@@ -236,6 +236,7 @@ export interface AnalyzedBuild {
specialReticleRadius?: Stat;
specialThrowDistance?: Stat;
specialAutoChargeRate?: Stat;
+ specialMaxRadius?: Stat;
};
}
diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx
index 05a890b31..630597338 100644
--- a/app/routes/analyzer.tsx
+++ b/app/routes/analyzer.tsx
@@ -368,6 +368,17 @@ export default function BuildAnalyzerPage() {
})}
/>
)}
+ {analyzed.stats.specialMaxRadius && (
+
+ )}