Special damages: Ultra Stamp

This commit is contained in:
Kalle
2023-06-18 14:56:46 +03:00
parent 85032293d0
commit 9c0fdf0dfe
8 changed files with 64 additions and 4 deletions

View File

@@ -31,6 +31,9 @@ export const DAMAGE_TYPE = [
"ROLL_OVER",
"SPECIAL_MAX_CHARGE",
"SPECIAL_MIN_CHARGE",
"SPECIAL_THROW_DIRECT",
"SPECIAL_THROW",
"SPECIAL_SWING",
] as const;
export const damageTypeToWeaponType: Record<
@@ -64,6 +67,9 @@ export const damageTypeToWeaponType: Record<
WAVE: "SPECIAL",
SPECIAL_MAX_CHARGE: "SPECIAL",
SPECIAL_MIN_CHARGE: "SPECIAL",
SPECIAL_SWING: "SPECIAL",
SPECIAL_THROW: "SPECIAL",
SPECIAL_THROW_DIRECT: "SPECIAL",
};
export const multiShot: Partial<Record<MainWeaponId, number>> = {

View File

@@ -127,6 +127,9 @@ export type SpecialWeaponParams = SpecialWeaponParamsObject[SpecialWeaponId] & {
WaveDamage?: number;
ExhaleBlastParamMaxChargeDistanceDamage?: Array<DistanceDamage>;
ExhaleBlastParamMinChargeDistanceDamage?: Array<DistanceDamage>;
SwingDamage?: Array<DistanceDamage>;
ThrowDamage?: Array<DistanceDamage>;
ThrowDirectDamage?: number;
};
export type ParamsJson = {

View File

@@ -425,6 +425,9 @@ const damageTypeToParamsKey: Record<
WAVE: "WaveDamage",
SPECIAL_MAX_CHARGE: "ExhaleBlastParamMaxChargeDistanceDamage",
SPECIAL_MIN_CHARGE: "ExhaleBlastParamMinChargeDistanceDamage",
SPECIAL_SWING: "SwingDamage",
SPECIAL_THROW: "ThrowDamage",
SPECIAL_THROW_DIRECT: "ThrowDirectDamage",
};
function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] {

View File

@@ -1879,7 +1879,28 @@
"Low": 450,
"Mid": 570
}
}
},
"SwingDamage": [
{
"Damage": 1000,
"Distance": 0
},
{
"Damage": 400,
"Distance": 4
}
],
"ThrowDamage": [
{
"Damage": 600,
"Distance": 4
},
{
"Damage": 300,
"Distance": 8
}
],
"ThrowDirectDamage": 2200
},
"12": {
"ArmorHP": 5000,

View File

@@ -158,9 +158,9 @@ export const objectDamageJsonKeyPriority: Record<
SuperLanding: null,
TripleTornado: null,
UltraShot: ["BOMB_NORMAL", "BOMB_DIRECT"],
UltraStamp_Swing: null,
UltraStamp_Throw_BombCore: null,
UltraStamp_Throw: null,
UltraStamp_Swing: ["SPECIAL_SWING"],
UltraStamp_Throw_BombCore: ["SPECIAL_THROW_DIRECT"],
UltraStamp_Throw: ["SPECIAL_THROW"],
};
export const damageTypesToCombine: Partial<

View File

@@ -127,6 +127,9 @@ export const damageTypePriorityList = [
"ROLL_OVER",
"SPECIAL_MAX_CHARGE",
"SPECIAL_MIN_CHARGE",
"SPECIAL_THROW_DIRECT",
"SPECIAL_THROW",
"SPECIAL_SWING",
] as const;
assertType<
(typeof damageTypePriorityList)[number],

View File

@@ -113,6 +113,9 @@
"damage.WAVE": "Wave",
"damage.SPECIAL_MAX_CHARGE": "Maximum charge",
"damage.SPECIAL_MIN_CHARGE": "Minimum charge",
"damage.SPECIAL_THROW_DIRECT": "Throw (Direct)",
"damage.SPECIAL_THROW": "Throw",
"damage.SPECIAL_SWING": "Swing",
"suffix.seconds": "s",
"suffix.hp": "hp",
"suffix.specialPointsShort": "p",

View File

@@ -410,6 +410,8 @@ function parametersToSubWeaponResult(
};
}
// some specials lack damage values in the params
// so they are instead hardcoded here as a workaround
function parametersToSpecialWeaponResult(params: any) {
const result: any = {};
@@ -458,6 +460,22 @@ function parametersToSpecialWeaponResult(params: any) {
resultUnwrapped["SplashAroundPaintRadius"] = undefined;
}
const isUltraStamp = () => !!params["SwingBigBlastParam"];
const SwingDamage = () => {
if (!isUltraStamp()) return;
return [
{ Damage: 1000, Distance: 0 },
...params["SwingBigBlastParam"]["DistanceDamage"],
];
};
const ThrowDamage = () => {
if (!isUltraStamp()) return;
return params["ThrowBlastParam"]["DistanceDamage"];
};
return {
ArmorHP: params["WeaponSpChariotParam"]?.["ArmorHP"],
overwrites: resultUnwrapped,
@@ -479,6 +497,9 @@ function parametersToSpecialWeaponResult(params: any) {
params["ExhaleBlastParamMinCharge"]?.["DistanceDamage"],
ExhaleBlastParamMaxChargeDistanceDamage:
params["ExhaleBlastParamMaxCharge"]?.["DistanceDamage"],
SwingDamage: SwingDamage(),
ThrowDamage: ThrowDamage(),
ThrowDirectDamage: params["ThrowMoveParam"]?.["DirectDamageValue"],
};
}