Booyah Bomb SPU effect

This commit is contained in:
Kalle
2022-09-18 21:26:59 +03:00
parent 2be14cda3b
commit 5b64515976
4 changed files with 42 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ export function buildStats({
specialInkConsumptionPerSecondPercentage(input),
specialReticleRadius: specialReticleRadius(input),
specialThrowDistance: specialThrowDistance(input),
specialAutoChargeRate: specialAutoChargeRate(input),
},
};
}
@@ -1185,3 +1186,32 @@ function specialThrowDistance(
modifiedBy: SPECIAL_THROW_DISTANCE_KEY,
};
}
function specialAutoChargeRate(
args: StatFunctionInput
): AnalyzedBuild["stats"]["specialAutoChargeRate"] {
if (
!hasEffect({
key: "ChargeRateAutoPerFrame",
weapon: args.specialWeaponParams,
})
) {
return;
}
const SPECIAL_AUTO_CHARGE_RATE_KEY = "SPU";
const { baseEffect, effect } = abilityPointsToEffects({
abilityPoints: apFromMap({
abilityPoints: args.abilityPoints,
ability: SPECIAL_AUTO_CHARGE_RATE_KEY,
}),
key: "ChargeRateAutoPerFrame",
weapon: args.specialWeaponParams,
});
return {
baseValue: roundToTwoDecimalPlaces(baseEffect * 100),
value: roundToTwoDecimalPlaces(effect * 100),
modifiedBy: SPECIAL_AUTO_CHARGE_RATE_KEY,
};
}

View File

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

View File

@@ -358,6 +358,16 @@ export default function BuildAnalyzerPage() {
})}
/>
)}
{analyzed.stats.specialAutoChargeRate && (
<StatCard
stat={analyzed.stats.specialAutoChargeRate}
title={t("analyzer:stat.special.autoChargeRate", {
weapon: t(
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
),
})}
/>
)}
</StatCategory>
<StatCategory title={t("analyzer:stat.category.subDef")}>
<StatCard

View File

@@ -61,6 +61,7 @@
"stat.special.inkConsumptionPerSecond": "{{weapon}} ink consumption per sec",
"stat.special.reticleRadius": "{{weapon}} reticle radius",
"stat.special.throwDistance": "{{weapon}} throw distance",
"stat.special.autoChargeRate": "{{weapon}} auto charge rate",
"damage.header.type": "Type",
"damage.header.damage": "Damage",
"damage.header.distance": "Distance",