Ink Storm SPU effect

This commit is contained in:
Kalle 2022-09-18 21:14:28 +03:00
parent cabdbd1da4
commit 2be14cda3b
6 changed files with 62 additions and 6 deletions

View File

@ -117,6 +117,7 @@ export function buildStats({
specialInkConsumptionPerSecondPercentage:
specialInkConsumptionPerSecondPercentage(input),
specialReticleRadius: specialReticleRadius(input),
specialThrowDistance: specialThrowDistance(input),
},
};
}
@ -1155,3 +1156,32 @@ function specialReticleRadius(
modifiedBy: SPECIAL_RETICLE_RADIUS_KEY,
};
}
function specialThrowDistance(
args: StatFunctionInput
): AnalyzedBuild["stats"]["specialThrowDistance"] {
if (
!hasEffect({
key: "SpawnSpeedZSpecUp",
weapon: args.specialWeaponParams,
})
) {
return;
}
const SPECIAL_THROW_DISTANCE_KEY = "SPU";
const { baseEffect, effect } = abilityPointsToEffects({
abilityPoints: apFromMap({
abilityPoints: args.abilityPoints,
ability: SPECIAL_THROW_DISTANCE_KEY,
}),
key: "SpawnSpeedZSpecUp",
weapon: args.specialWeaponParams,
});
return {
baseValue: roundToTwoDecimalPlaces(baseEffect),
value: roundToTwoDecimalPlaces(effect),
modifiedBy: SPECIAL_THROW_DISTANCE_KEY,
};
}

View File

@ -234,6 +234,7 @@ export interface AnalyzedBuild {
specialHookInkConsumptionPercentage?: Stat;
specialInkConsumptionPerSecondPercentage?: Stat;
specialReticleRadius?: Stat;
specialThrowDistance?: Stat;
};
}

View File

@ -1082,15 +1082,15 @@
},
"5": {
"overwrites": {
"RainyFrame": {
"High": 600,
"Low": 480,
"Mid": 540
},
"SpawnSpeedZSpecUp": {
"High": 1.68,
"Low": 1.12,
"Mid": 1.4
},
"SpecialDurationFrame": {
"High": 600,
"Low": 480,
"Mid": 540
}
}
},

View File

@ -22,7 +22,10 @@ import type {
SpecialEffectType,
} from "~/modules/analyzer/types";
import { useUser } from "~/modules/auth";
import type { BuildAbilitiesTupleWithUnknown } from "~/modules/in-game-lists";
import {
type BuildAbilitiesTupleWithUnknown,
INK_STORM_ID,
} from "~/modules/in-game-lists";
import {
SPLASH_WALL_ID,
SPRINKLER_ID,
@ -264,6 +267,11 @@ export default function BuildAnalyzerPage() {
),
})}
suffix={t("analyzer:suffix.seconds")}
popoverInfo={
analyzed.weapon.specialWeaponSplId === INK_STORM_ID
? t("analyzer:stat.special.duration.inkStormExplanation")
: undefined
}
/>
)}
{analyzed.stats.specialDamageDistance && (
@ -340,6 +348,16 @@ export default function BuildAnalyzerPage() {
})}
/>
)}
{analyzed.stats.specialThrowDistance && (
<StatCard
stat={analyzed.stats.specialThrowDistance}
title={t("analyzer:stat.special.throwDistance", {
weapon: t(
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
),
})}
/>
)}
</StatCategory>
<StatCategory title={t("analyzer:stat.category.subDef")}>
<StatCard

View File

@ -52,6 +52,7 @@
"stat.sub.explosionRadius": "Explosion radius",
"stat.sub.hp": "Durability",
"stat.special.duration": "{{weapon}} duration",
"stat.special.duration.inkStormExplanation": "Increases distance painted but not the amount of ink.",
"stat.special.damageDistance": "{{weapon}} damage distance",
"stat.special.paintRadius": "{{weapon}} paint radius",
"stat.special.shieldHp": "{{weapon}} shield durability",
@ -59,6 +60,7 @@
"stat.special.inkConsumptionHook": "{{weapon}} hook ink consumption",
"stat.special.inkConsumptionPerSecond": "{{weapon}} ink consumption per sec",
"stat.special.reticleRadius": "{{weapon}} reticle radius",
"stat.special.throwDistance": "{{weapon}} throw distance",
"damage.header.type": "Type",
"damage.header.damage": "Damage",
"damage.header.distance": "Distance",

View File

@ -276,6 +276,11 @@ function parametersToSpecialWeaponResult(params: any) {
}
}
if (result["RainyFrame"]) {
result["SpecialDurationFrame"] = result["RainyFrame"];
result["RainyFrame"] = undefined;
}
return { overwrites: unwrapSubSpecialSpecUpList(result) };
}