Analyzer: Add sub weapon ink consumption stat

This commit is contained in:
Kalle 2022-12-05 16:17:26 +02:00
parent 34ca290bdd
commit a9701f874f
4 changed files with 17 additions and 0 deletions

View File

@ -84,6 +84,8 @@ export function buildStats({
? framesToSeconds(mainWeaponParams.InkRecoverStop)
: undefined,
subWeaponWhiteInkSeconds: framesToSeconds(subWeaponParams.InkRecoverStop),
subWeaponInkConsumptionPercentage:
subWeaponInkConsumptionPercentage(input),
squidFormInkRecoverySeconds: squidFormInkRecoverySeconds(input),
runSpeed: runSpeed(input),
shootingRunSpeed: shootingRunSpeed(input, "MoveSpeed"),
@ -209,6 +211,14 @@ function specialLost(
};
}
function subWeaponInkConsumptionPercentage(args: StatFunctionInput) {
return {
modifiedBy: "ISS" as const,
baseValue: roundToNDecimalPlaces(args.subWeaponParams.InkConsume * 100),
value: roundToNDecimalPlaces(subWeaponConsume(args).inkConsume * 100),
};
}
function fullInkTankOptions(
args: StatFunctionInput
): AnalyzedBuild["stats"]["fullInkTankOptions"] {

View File

@ -196,6 +196,7 @@ export interface AnalyzedBuild {
specialLostSplattedByRP: Stat;
mainWeaponWhiteInkSeconds?: number;
subWeaponWhiteInkSeconds: number;
subWeaponInkConsumptionPercentage: Stat;
fullInkTankOptions: Array<FullInkTankOption & { id: string }>;
damages: Array<Damage & { id: string }>;
squidFormInkRecoverySeconds: Stat;

View File

@ -207,6 +207,11 @@ export default function BuildAnalyzerPage() {
)}
<StatCategory title={t("analyzer:stat.category.sub")}>
<StatCard
stat={analyzed.stats.subWeaponInkConsumptionPercentage}
title={t("analyzer:stat.subWeaponInkConsumptionPercentage")}
suffix="%"
/>
<StatCard
stat={analyzed.stats.subWeaponWhiteInkSeconds}
title={t("analyzer:stat.whiteInk")}

View File

@ -19,6 +19,7 @@
"stat.specialLost": "Special lost when splatted",
"stat.specialLostSplattedByRP": "Special lost when splatted by RP user",
"stat.whiteInk": "No ink recovery time after usage",
"stat.subWeaponInkConsumptionPercentage": "Ink tank consumption",
"stat.squidFormInkRecoverySeconds": "Ink tank full recovery time (squid form)",
"stat.quickRespawnTime": "Quick respawn time",
"stat.quickRespawnTimeSplattedByRP": "Quick Respawn time (splatted by RP user)",