From 263bcbbecb7b9f1866e254c19c1d178cb2f2ba57 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:18:11 +0300 Subject: [PATCH] Analyzer Ink Recover Up effect --- app/modules/analyzer/stats.ts | 23 +++++++++++++++++++++++ app/modules/analyzer/types.ts | 1 + app/routes/analyzer.tsx | 7 +++++++ public/locales/en/analyzer.json | 3 +++ 4 files changed, 34 insertions(+) diff --git a/app/modules/analyzer/stats.ts b/app/modules/analyzer/stats.ts index 2cb8a4ce3..e104658a5 100644 --- a/app/modules/analyzer/stats.ts +++ b/app/modules/analyzer/stats.ts @@ -51,6 +51,7 @@ export function buildStats({ specialSavedAfterDeath: specialSavedAfterDeath(input), fullInkTankOptions: fullInkTankOptions(input), subWeaponWhiteInkFrames: subWeaponParams.InkRecoverStop, + squidFormInkRecoverySeconds: squidFormInkRecoverySeconds(input), }, }; } @@ -225,3 +226,25 @@ function inkConsumeTypeToParamsKeys( } } } + +const framesToSeconds = (frames: number) => + effectToRounded(Math.ceil(frames) / 60); +function squidFormInkRecoverySeconds( + args: StatFunctionInput +): AnalyzedBuild["stats"]["squidFormInkRecoverySeconds"] { + const SQUID_FORM_INK_RECOVERY_SECONDS_ABILITY = "IRU"; + const { baseEffect, effect } = abilityPointsToEffects({ + abilityPoints: apFromMap({ + abilityPoints: args.abilityPoints, + ability: SQUID_FORM_INK_RECOVERY_SECONDS_ABILITY, + }), + key: "InkRecoverFrm_Stealth", + weapon: args.mainWeaponParams, + }); + + return { + baseValue: framesToSeconds(baseEffect), + value: framesToSeconds(effect), + modifiedBy: SQUID_FORM_INK_RECOVERY_SECONDS_ABILITY, + }; +} diff --git a/app/modules/analyzer/types.ts b/app/modules/analyzer/types.ts index 2adeab68d..18b6cef65 100644 --- a/app/modules/analyzer/types.ts +++ b/app/modules/analyzer/types.ts @@ -124,5 +124,6 @@ export interface AnalyzedBuild { specialSavedAfterDeath: Stat; subWeaponWhiteInkFrames: number; fullInkTankOptions: Array; + squidFormInkRecoverySeconds: Stat; }; } diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx index 76e802276..302482a0b 100644 --- a/app/routes/analyzer.tsx +++ b/app/routes/analyzer.tsx @@ -75,6 +75,13 @@ export default function BuildAnalyzerPage() { subWeaponId={analyzed.weapon.subWeaponSplId} /> + + + diff --git a/public/locales/en/analyzer.json b/public/locales/en/analyzer.json index 28d25bb44..17074f1be 100644 --- a/public/locales/en/analyzer.json +++ b/public/locales/en/analyzer.json @@ -3,9 +3,11 @@ "stat.category.sub": "Sub weapon", "stat.category.special": "Special weapon", "stat.category.actionsPerInkTank": "Actions per ink tank", + "stat.category.misc": "Miscellaneous", "stat.specialPoints": "Points to special", "stat.specialLost": "Special lost when splatted", "stat.whiteInkFrames": "Frames of no ink recovery after usage", + "stat.squidFormInkRecoverySeconds": "Ink tank full recovery time (squid form)", "stat.consumption.NORMAL": "Shots", "stat.consumption.SWING": "Swings", "stat.consumption.SLOSH": "Sloshes", @@ -16,6 +18,7 @@ "stat.consumption.SPLATLING_CHARGE": "Full charges", "stat.consumption.SHIELD_LAUNCH": "Shield launches", "stat.consumption.DUALIE_ROLL": "Dodge Rolls", + "suffix.seconds": "s", "base": "Base", "value": "Value", "build": "Build",