mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-02 22:26:57 -05:00
Trizooka paint and damage radius effect
This commit is contained in:
parent
34a77b6506
commit
64d2a64b5f
|
|
@ -46,5 +46,23 @@
|
|||
"SensorRadius": [0.0, 0.0, 0.0],
|
||||
"ExplosionRadius": [0.0, 0.0, 0.0],
|
||||
"MaxHP": [0.0, 0.0, 0.0],
|
||||
"SpecialDurationFrame": [0.0, 0.0, 0.0]
|
||||
"SpecialDurationFrame": [0.0, 0.0, 0.0],
|
||||
"DistanceDamageDistanceRate": [0.0, 0.0, 0.0],
|
||||
"PaintRadius": [0.0, 0.0, 0.0],
|
||||
"MaxFieldHP": [0.0, 0.0, 0.0],
|
||||
"InkConsume_Hook": [0.0, 0.0, 0.0],
|
||||
"InkConsume_PerSec": [0.0, 0.0, 0.0],
|
||||
"TargetInCircleRadius": [0.0, 0.0, 0.0],
|
||||
"RainyFrame": [0.0, 0.0, 0.0],
|
||||
"ChargeRateAutoPerFrame": [0.0, 0.0, 0.0],
|
||||
"MaxFrame": [0.0, 0.0, 0.0],
|
||||
"MaxRadius": [0.0, 0.0, 0.0],
|
||||
"RadiusMax": [0.0, 0.0, 0.0],
|
||||
"RadiusMin": [0.0, 0.0, 0.0],
|
||||
"LaserFrame": [0.0, 0.0, 0.0],
|
||||
"SplashAroundVelocityMin": [0.0, 0.0, 0.0],
|
||||
"SplashAroundVelocityMax": [0.0, 0.0, 0.0],
|
||||
"SplashAroundPaintRadius": [0.0, 0.0, 0.0],
|
||||
"SpecialTotalFrame": [0.0, 0.0, 0.0],
|
||||
"PowerUpFrame": [0.0, 0.0, 0.0]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ export function buildStats({
|
|||
subDefBombDamageHeavyPercentage: subDefBombDamageHeavyPercentage(input),
|
||||
...subStats(input),
|
||||
specialDurationInSeconds: specialDurationInSeconds(input),
|
||||
specialDamageDistance: specialDamageDistance(input),
|
||||
specialPaintRadius: specialPaintRadius(input),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -949,3 +951,43 @@ function specialDurationInSeconds(
|
|||
modifiedBy: SPECIAL_DURATION_IN_SECONDS_KEY,
|
||||
};
|
||||
}
|
||||
|
||||
function specialDamageDistance(
|
||||
args: StatFunctionInput
|
||||
): AnalyzedBuild["stats"]["specialDamageDistance"] {
|
||||
const SPECIAL_DAMAGE_DISTANCE_KEY = "SPU";
|
||||
const { baseEffect, effect } = abilityPointsToEffects({
|
||||
abilityPoints: apFromMap({
|
||||
abilityPoints: args.abilityPoints,
|
||||
ability: SPECIAL_DAMAGE_DISTANCE_KEY,
|
||||
}),
|
||||
key: "DistanceDamageDistanceRate",
|
||||
weapon: args.specialWeaponParams,
|
||||
});
|
||||
|
||||
return {
|
||||
baseValue: roundToTwoDecimalPlaces(baseEffect),
|
||||
value: roundToTwoDecimalPlaces(effect),
|
||||
modifiedBy: SPECIAL_DAMAGE_DISTANCE_KEY,
|
||||
};
|
||||
}
|
||||
|
||||
function specialPaintRadius(
|
||||
args: StatFunctionInput
|
||||
): AnalyzedBuild["stats"]["specialPaintRadius"] {
|
||||
const SPECIAL_PAINT_RADIUS_KEY = "SPU";
|
||||
const { baseEffect, effect } = abilityPointsToEffects({
|
||||
abilityPoints: apFromMap({
|
||||
abilityPoints: args.abilityPoints,
|
||||
ability: SPECIAL_PAINT_RADIUS_KEY,
|
||||
}),
|
||||
key: "PaintRadius",
|
||||
weapon: args.specialWeaponParams,
|
||||
});
|
||||
|
||||
return {
|
||||
baseValue: roundToTwoDecimalPlaces(baseEffect),
|
||||
value: roundToTwoDecimalPlaces(effect),
|
||||
modifiedBy: SPECIAL_PAINT_RADIUS_KEY,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,16 @@ import type { SPECIAL_EFFECTS } from "./specialEffects";
|
|||
import type weaponParams from "./weapon-params.json";
|
||||
import type abilityValues from "./ability-values.json";
|
||||
|
||||
type Overwrites = Record<
|
||||
string,
|
||||
Partial<Record<"High" | "Mid" | "Low", number>>
|
||||
>;
|
||||
|
||||
export interface MainWeaponParams {
|
||||
subWeaponId: SubWeaponId;
|
||||
specialWeaponId: SpecialWeaponId;
|
||||
/** Replacing default values of the ability json for this specific weapon */
|
||||
overwrites?: Record<string, Partial<Record<"High" | "Mid" | "Low", number>>>;
|
||||
overwrites?: Overwrites;
|
||||
SpecialPoint: number;
|
||||
/** Weapon's weight class. "Light/Heavy weapon" */
|
||||
WeaponSpeedType?: "Slow" | "Fast";
|
||||
|
|
@ -77,7 +82,7 @@ export interface DistanceDamage {
|
|||
}
|
||||
|
||||
export interface SubWeaponParams {
|
||||
overwrites?: Record<string, Partial<Record<"High" | "Mid" | "Low", number>>>;
|
||||
overwrites?: Overwrites;
|
||||
SubInkSaveLv: 0 | 1 | 2 | 3;
|
||||
/** How much ink one usage of the sub consumes */
|
||||
InkConsume: number;
|
||||
|
|
@ -100,7 +105,9 @@ export interface SubWeaponParams {
|
|||
}
|
||||
|
||||
type SpecialWeaponParamsObject = typeof weaponParams["specialWeapons"];
|
||||
export type SpecialWeaponParams = SpecialWeaponParamsObject[SpecialWeaponId];
|
||||
export type SpecialWeaponParams = SpecialWeaponParamsObject[SpecialWeaponId] & {
|
||||
overwrites?: Overwrites;
|
||||
};
|
||||
|
||||
export type ParamsJson = {
|
||||
mainWeapons: Record<MainWeaponId, MainWeaponParams>;
|
||||
|
|
@ -220,6 +227,8 @@ export interface AnalyzedBuild {
|
|||
subHp?: Stat;
|
||||
|
||||
specialDurationInSeconds?: Stat;
|
||||
specialDamageDistance?: Stat;
|
||||
specialPaintRadius?: Stat;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@ function abilityValues({
|
|||
key: keyof typeof abilityValuesJson;
|
||||
weapon: MainWeaponParams | SubWeaponParams | SpecialWeaponParams;
|
||||
}): [number, number, number] {
|
||||
// xxx: before prod
|
||||
// @ts-expect-error should be gone soon
|
||||
const overwrites = weapon.overwrites?.[key];
|
||||
|
||||
const [High, Mid, Low] = abilityValuesJson[key];
|
||||
|
|
|
|||
|
|
@ -266,6 +266,26 @@ export default function BuildAnalyzerPage() {
|
|||
suffix={t("analyzer:suffix.seconds")}
|
||||
/>
|
||||
)}
|
||||
{analyzed.stats.specialDamageDistance && (
|
||||
<StatCard
|
||||
stat={analyzed.stats.specialDamageDistance}
|
||||
title={t("analyzer:stat.special.damageDistance", {
|
||||
weapon: t(
|
||||
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
|
||||
),
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
{analyzed.stats.specialPaintRadius && (
|
||||
<StatCard
|
||||
stat={analyzed.stats.specialPaintRadius}
|
||||
title={t("analyzer:stat.special.paintRadius", {
|
||||
weapon: t(
|
||||
`weapons:SPECIAL_${analyzed.weapon.specialWeaponSplId}`
|
||||
),
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
</StatCategory>
|
||||
<StatCategory title={t("analyzer:stat.category.subDef")}>
|
||||
<StatCard
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@
|
|||
"stat.sub.explosionRadius": "Explosion radius",
|
||||
"stat.sub.hp": "Durability",
|
||||
"stat.special.duration": "{{weapon}} duration",
|
||||
"stat.special.damageDistance": "{{weapon}} damage distance",
|
||||
"stat.special.paintRadius": "{{weapon}} paint radius",
|
||||
"damage.header.type": "Type",
|
||||
"damage.header.damage": "Damage",
|
||||
"damage.header.distance": "Distance",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user