Zipcaster SPU effects

This commit is contained in:
Kalle
2022-09-18 16:53:26 +03:00
parent 6ef1b0c55b
commit 502240ad23
4 changed files with 88 additions and 0 deletions

View File

@@ -112,6 +112,10 @@ export function buildStats({
specialPaintRadius: specialPaintRadius(input),
specialFieldHp: specialFieldHp(input),
specialDeviceHp: specialDeviceHp(input),
specialHookInkConsumptionPercentage:
specialHookInkConsumptionPercentage(input),
specialInkConsumptionPerSecondPercentage:
specialInkConsumptionPerSecondPercentage(input),
},
};
}
@@ -1063,3 +1067,61 @@ function specialDeviceHp(
modifiedBy: SPECIAL_DEVICE_HP_KEY,
};
}
function specialHookInkConsumptionPercentage(
args: StatFunctionInput
): AnalyzedBuild["stats"]["specialHookInkConsumptionPercentage"] {
if (
!hasEffect({
key: "InkConsume_Hook",
weapon: args.specialWeaponParams,
})
) {
return;
}
const SPECIAL_HOOK_INK_CONSUMPTION_PERCENTAGE_KEY = "SPU";
const { baseEffect, effect } = abilityPointsToEffects({
abilityPoints: apFromMap({
abilityPoints: args.abilityPoints,
ability: SPECIAL_HOOK_INK_CONSUMPTION_PERCENTAGE_KEY,
}),
key: "InkConsume_Hook",
weapon: args.specialWeaponParams,
});
return {
baseValue: roundToTwoDecimalPlaces(baseEffect * 100),
value: roundToTwoDecimalPlaces(effect * 100),
modifiedBy: SPECIAL_HOOK_INK_CONSUMPTION_PERCENTAGE_KEY,
};
}
function specialInkConsumptionPerSecondPercentage(
args: StatFunctionInput
): AnalyzedBuild["stats"]["specialInkConsumptionPerSecondPercentage"] {
if (
!hasEffect({
key: "InkConsume_PerSec",
weapon: args.specialWeaponParams,
})
) {
return;
}
const SPECIAL_INK_CONSUMPTION_PER_SECOND_PERCENTAGE_KEY = "SPU";
const { baseEffect, effect } = abilityPointsToEffects({
abilityPoints: apFromMap({
abilityPoints: args.abilityPoints,
ability: SPECIAL_INK_CONSUMPTION_PER_SECOND_PERCENTAGE_KEY,
}),
key: "InkConsume_PerSec",
weapon: args.specialWeaponParams,
});
return {
baseValue: roundToTwoDecimalPlaces(baseEffect * 100),
value: roundToTwoDecimalPlaces(effect * 100),
modifiedBy: SPECIAL_INK_CONSUMPTION_PER_SECOND_PERCENTAGE_KEY,
};
}

View File

@@ -231,6 +231,8 @@ export interface AnalyzedBuild {
specialPaintRadius?: Stat;
specialFieldHp?: Stat;
specialDeviceHp?: Stat;
specialHookInkConsumptionPercentage?: Stat;
specialInkConsumptionPerSecondPercentage?: Stat;
};
}

View File

@@ -308,6 +308,28 @@ export default function BuildAnalyzerPage() {
suffix={t("analyzer:suffix.hp")}
/>
)}
{analyzed.stats.specialHookInkConsumptionPercentage && (
<StatCard
stat={analyzed.stats.specialHookInkConsumptionPercentage}
title={t("analyzer:stat.special.inkConsumptionHook", {
weapon: t(
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
),
})}
suffix="%"
/>
)}
{analyzed.stats.specialInkConsumptionPerSecondPercentage && (
<StatCard
stat={analyzed.stats.specialInkConsumptionPerSecondPercentage}
title={t("analyzer:stat.special.inkConsumptionPerSecond", {
weapon: t(
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
),
})}
suffix="%"
/>
)}
</StatCategory>
<StatCategory title={t("analyzer:stat.category.subDef")}>
<StatCard

View File

@@ -56,6 +56,8 @@
"stat.special.paintRadius": "{{weapon}} paint radius",
"stat.special.shieldHp": "{{weapon}} shield durability",
"stat.special.deviceHp": "{{weapon}} device durability",
"stat.special.inkConsumptionHook": "{{weapon}} hook ink consumption",
"stat.special.inkConsumptionPerSecond": "{{weapon}} ink consumption per sec",
"damage.header.type": "Type",
"damage.header.damage": "Damage",
"damage.header.distance": "Distance",