sendou.ink/app/features/object-damage-calculator/core/objectHitPoints.ts
ash f3397c033b
Add/Fix miscellaneous object damage/build analyzer data (#1550)
* Add object damage data for Triple Splashdown

* Fix Sprinkler's HP + var name typo and add Ink Vac as a Damage Reciever

* Recompile object-dmg.json with Pogo and new Vac data added automatically

* (I forgot about Prettier)

* Add to json creating script

---------

Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
2023-12-06 11:01:48 +02:00

71 lines
1.9 KiB
TypeScript

import invariant from "tiny-invariant";
import {
BIG_BUBBLER_ID,
CRAB_TANK_ID,
SPLASH_WALL_ID,
} from "~/modules/in-game-lists";
import {
specialDeviceHp,
specialFieldHp,
subStats,
hpDivided,
weaponParams,
type AbilityPoints,
type SpecialWeaponParams,
type SubWeaponParams,
} from "~/features/build-analyzer";
import type { HitPoints } from "../calculator-types";
const WAVE_BREAKER_HP = 400;
const SPRINKLER_HP = 120;
const RAINMAKER_HP = 1000;
const SPLAT_BRELLA_SHIELD_HP = 500;
const BOOYAH_BOMB_ARMOR_HP = 470;
const INK_VAC_HP = 800;
const BEAKON_HP = 120;
const TORPEDO_HP = 20;
export const objectHitPoints = (abilityPoints: AbilityPoints): HitPoints => {
const Wsb_Shield = subStats({
abilityPoints,
subWeaponParams: weaponParams.subWeapons[SPLASH_WALL_ID] as SubWeaponParams,
}).subHp?.value;
const GreatBarrier_Barrier = specialFieldHp({
abilityPoints,
specialWeaponParams: weaponParams.specialWeapons[
BIG_BUBBLER_ID
] as SpecialWeaponParams,
})?.value;
const GreatBarrier_WeakPoint = specialDeviceHp({
abilityPoints,
specialWeaponParams: weaponParams.specialWeapons[
BIG_BUBBLER_ID
] as SpecialWeaponParams,
})?.value;
invariant(Wsb_Shield);
invariant(GreatBarrier_Barrier);
invariant(GreatBarrier_WeakPoint);
return {
BulletUmbrellaCanopyNormal: SPLAT_BRELLA_SHIELD_HP,
BulletUmbrellaCanopyWide: hpDivided(
weaponParams.mainWeapons[6010].CanopyHP,
),
BulletUmbrellaCanopyCompact: hpDivided(
weaponParams.mainWeapons[6020].CanopyHP,
),
Wsb_Shield,
Bomb_TorpedoBullet: TORPEDO_HP,
Chariot: hpDivided(weaponParams.specialWeapons[CRAB_TANK_ID].ArmorHP),
Gachihoko_Barrier: RAINMAKER_HP,
GreatBarrier_Barrier,
GreatBarrier_WeakPoint,
NiceBall_Armor: BOOYAH_BOMB_ARMOR_HP, // ??
BlowerInhale: INK_VAC_HP,
ShockSonar: WAVE_BREAKER_HP,
Wsb_Flag: BEAKON_HP,
Wsb_Sprinkler: SPRINKLER_HP,
};
};