mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-27 21:55:15 -05:00
Ink Vac SPU effect
This commit is contained in:
@@ -120,6 +120,7 @@ export function buildStats({
|
||||
specialThrowDistance: specialThrowDistance(input),
|
||||
specialAutoChargeRate: specialAutoChargeRate(input),
|
||||
specialMaxRadius: specialMaxRadius(input),
|
||||
specialRadiusRange: specialRadiusRange(input),
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1245,3 +1246,49 @@ function specialMaxRadius(
|
||||
modifiedBy: SPECIAL_MAX_RADIUS_KEY,
|
||||
};
|
||||
}
|
||||
|
||||
function specialRadiusRange(
|
||||
args: StatFunctionInput
|
||||
): AnalyzedBuild["stats"]["specialRadiusRange"] {
|
||||
if (
|
||||
!hasEffect({
|
||||
key: "RadiusMax",
|
||||
weapon: args.specialWeaponParams,
|
||||
}) ||
|
||||
!hasEffect({
|
||||
key: "RadiusMin",
|
||||
weapon: args.specialWeaponParams,
|
||||
})
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
const SPECIAL_RADIUS_RANGE_KEY = "SPU";
|
||||
|
||||
const radiusMin = abilityPointsToEffects({
|
||||
abilityPoints: apFromMap({
|
||||
abilityPoints: args.abilityPoints,
|
||||
ability: SPECIAL_RADIUS_RANGE_KEY,
|
||||
}),
|
||||
key: "RadiusMin",
|
||||
weapon: args.specialWeaponParams,
|
||||
});
|
||||
const radiusMax = abilityPointsToEffects({
|
||||
abilityPoints: apFromMap({
|
||||
abilityPoints: args.abilityPoints,
|
||||
ability: SPECIAL_RADIUS_RANGE_KEY,
|
||||
}),
|
||||
key: "RadiusMax",
|
||||
weapon: args.specialWeaponParams,
|
||||
});
|
||||
|
||||
return {
|
||||
baseValue: `${roundToTwoDecimalPlaces(
|
||||
radiusMin.baseEffect
|
||||
)}-${roundToTwoDecimalPlaces(radiusMax.baseEffect)}`,
|
||||
value: `${roundToTwoDecimalPlaces(
|
||||
radiusMin.effect
|
||||
)}-${roundToTwoDecimalPlaces(radiusMax.effect)}`,
|
||||
modifiedBy: SPECIAL_RADIUS_RANGE_KEY,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -115,9 +115,9 @@ export type ParamsJson = {
|
||||
specialWeapons: SpecialWeaponParamsObject;
|
||||
};
|
||||
|
||||
export interface Stat {
|
||||
value: number;
|
||||
baseValue: number;
|
||||
export interface Stat<T = number> {
|
||||
value: T;
|
||||
baseValue: T;
|
||||
modifiedBy: Ability | Array<Ability>;
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ export interface AnalyzedBuild {
|
||||
specialThrowDistance?: Stat;
|
||||
specialAutoChargeRate?: Stat;
|
||||
specialMaxRadius?: Stat;
|
||||
specialRadiusRange?: Stat<string>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -379,6 +379,16 @@ export default function BuildAnalyzerPage() {
|
||||
popoverInfo={t("analyzer:stat.special.maxRadius.explanation")}
|
||||
/>
|
||||
)}
|
||||
{analyzed.stats.specialRadiusRange && (
|
||||
<StatCard
|
||||
stat={analyzed.stats.specialRadiusRange}
|
||||
title={t("analyzer:stat.special.radiusRange", {
|
||||
weapon: t(
|
||||
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
|
||||
),
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
</StatCategory>
|
||||
<StatCategory title={t("analyzer:stat.category.subDef")}>
|
||||
<StatCard
|
||||
@@ -691,7 +701,7 @@ function StatCard({
|
||||
popoverInfo,
|
||||
}: {
|
||||
title: string;
|
||||
stat: Stat | number;
|
||||
stat: Stat | Stat<string> | number;
|
||||
suffix?: string;
|
||||
popoverInfo?: string;
|
||||
}) {
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"stat.special.autoChargeRate": "{{weapon}} auto charge rate",
|
||||
"stat.special.maxRadius": "{{weapon}} wave max radius",
|
||||
"stat.special.maxRadius.explanation": "Travel speed of the wave is always the same despite the increased radius.",
|
||||
"stat.special.radiusRange": "{{weapon}} sucking radius",
|
||||
"damage.header.type": "Type",
|
||||
"damage.header.damage": "Damage",
|
||||
"damage.header.distance": "Distance",
|
||||
|
||||
Reference in New Issue
Block a user