From 0439222c82d0348e44be5e5eb67e9989d9c2d045 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:58:47 +0200 Subject: [PATCH] Add Splattercolor Screen movement speed stat --- app/features/build-analyzer/analyzer-types.ts | 1 + .../build-analyzer/core/ability-values.json | 1 + app/features/build-analyzer/core/stats.ts | 30 +++++++++++++++++++ .../build-analyzer/routes/analyzer.tsx | 11 +++++++ public/locales/en/analyzer.json | 1 + 5 files changed, 44 insertions(+) diff --git a/app/features/build-analyzer/analyzer-types.ts b/app/features/build-analyzer/analyzer-types.ts index 81f302b86..993916e80 100644 --- a/app/features/build-analyzer/analyzer-types.ts +++ b/app/features/build-analyzer/analyzer-types.ts @@ -277,6 +277,7 @@ export interface AnalyzedBuild { specialInkConsumptionPerSecondPercentage?: Stat; specialReticleRadius?: Stat; specialThrowDistance?: Stat; + specialMoveSpeed?: Stat; specialAutoChargeRate?: Stat; specialMaxRadius?: Stat; specialRadiusRange?: Stat; diff --git a/app/features/build-analyzer/core/ability-values.json b/app/features/build-analyzer/core/ability-values.json index 9e7dff132..2f1a54582 100644 --- a/app/features/build-analyzer/core/ability-values.json +++ b/app/features/build-analyzer/core/ability-values.json @@ -41,6 +41,7 @@ "WallJumpChargeFrm": [5.0, 18.0, 45.0], "ReduceJumpSwerveRate": [1.0, 0.75, 0.0], "SpawnSpeedZSpecUp": [0.0, 0.0, 0.0], + "MoveSpeed": [0.0, 0.0, 0.0], "SubSpecUpParam": [0.0, 0.0, 0.0], "PeriodFirst": [0.0, 0.0, 0.0], "PeriodSecond": [0.0, 0.0, 0.0], diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index ce958e2a6..ba2092e81 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -170,6 +170,7 @@ export function buildStats({ specialInkConsumptionPerSecondPercentage(input), specialReticleRadius: specialReticleRadius(input), specialThrowDistance: specialThrowDistance(input), + specialMoveSpeed: specialMoveSpeed(input), specialAutoChargeRate: specialAutoChargeRate(input), specialMaxRadius: specialMaxRadius(input), specialRadiusRange: specialRadiusRange(input), @@ -1654,6 +1655,35 @@ function specialThrowDistance( }; } +function specialMoveSpeed( + args: StatFunctionInput, +): AnalyzedBuild["stats"]["specialMoveSpeed"] { + if ( + !hasEffect({ + key: "MoveSpeed", + weapon: args.specialWeaponParams, + }) + ) { + return; + } + + const SPECIAL_MOVE_SPEED_KEY = "SPU"; + const { baseEffect, effect } = abilityPointsToEffects({ + abilityPoints: apFromMap({ + abilityPoints: args.abilityPoints, + ability: SPECIAL_MOVE_SPEED_KEY, + }), + key: "MoveSpeed", + weapon: args.specialWeaponParams, + }); + + return { + baseValue: roundToNDecimalPlaces(baseEffect, 4), + value: roundToNDecimalPlaces(effect, 4), + modifiedBy: SPECIAL_MOVE_SPEED_KEY, + }; +} + function specialAutoChargeRate( args: StatFunctionInput, ): AnalyzedBuild["stats"]["specialAutoChargeRate"] { diff --git a/app/features/build-analyzer/routes/analyzer.tsx b/app/features/build-analyzer/routes/analyzer.tsx index b0e55cc7a..debdee9c1 100644 --- a/app/features/build-analyzer/routes/analyzer.tsx +++ b/app/features/build-analyzer/routes/analyzer.tsx @@ -594,6 +594,17 @@ export default function BuildAnalyzerPage() { })} /> )} + {analyzed.stats.specialMoveSpeed && ( + + )} {analyzed.stats.specialAutoChargeRate && (