mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-12 22:26:12 -05:00
Fix hp showed wrong for Crab Tank/brellas
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
SpecialWeaponParams,
|
||||
SubWeaponParams,
|
||||
} from "./types";
|
||||
import { hpDivided } from "./utils";
|
||||
import weaponParams from "./weapon-params.json";
|
||||
|
||||
const PLACEHOLDER_HP = 1000;
|
||||
@@ -35,11 +36,15 @@ export const objectHitPoints = (abilityPoints: AbilityPoints): HitPoints => {
|
||||
|
||||
return {
|
||||
BulletUmbrellaCanopyNormal: PLACEHOLDER_HP, // ?? needs defaults
|
||||
BulletUmbrellaCanopyWide: weaponParams.mainWeapons[6010].CanopyHP,
|
||||
BulletUmbrellaCanopyCompact: weaponParams.mainWeapons[6020].CanopyHP,
|
||||
BulletUmbrellaCanopyWide: hpDivided(
|
||||
weaponParams.mainWeapons[6010].CanopyHP
|
||||
),
|
||||
BulletUmbrellaCanopyCompact: hpDivided(
|
||||
weaponParams.mainWeapons[6020].CanopyHP
|
||||
),
|
||||
Wsb_Shield,
|
||||
Bomb_TorpedoBullet: PLACEHOLDER_HP, // ??
|
||||
Chariot: weaponParams.specialWeapons[CRAB_TANK_ID].ArmorHP,
|
||||
Chariot: hpDivided(weaponParams.specialWeapons[CRAB_TANK_ID].ArmorHP),
|
||||
Gachihoko_Barrier: PLACEHOLDER_HP, // ??
|
||||
GreatBarrier_Barrier,
|
||||
GreatBarrier_WeakPoint,
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
abilityPointsToEffects,
|
||||
apFromMap,
|
||||
hasEffect,
|
||||
hpDivided,
|
||||
weaponParams,
|
||||
} from "./utils";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
@@ -789,7 +790,7 @@ export function subStats(
|
||||
case "NO_CHANGE":
|
||||
return roundToTwoDecimalPlaces(effect);
|
||||
case "HP":
|
||||
return roundToTwoDecimalPlaces(effect / 10);
|
||||
return roundToTwoDecimalPlaces(hpDivided(effect));
|
||||
case "TIME":
|
||||
return framesToSeconds(effect);
|
||||
default:
|
||||
@@ -1170,8 +1171,8 @@ export function specialDeviceHp(
|
||||
});
|
||||
|
||||
return {
|
||||
baseValue: Math.round(baseEffect / 10),
|
||||
value: Math.round(effect / 10),
|
||||
baseValue: Math.round(hpDivided(baseEffect)),
|
||||
value: Math.round(hpDivided(effect)),
|
||||
modifiedBy: SPECIAL_DEVICE_HP_KEY,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -165,3 +165,5 @@ export function validatedWeaponIdFromSearchParams(
|
||||
|
||||
return weaponCategories[0].weaponIds[0];
|
||||
}
|
||||
|
||||
export const hpDivided = (hp: number) => hp / 10;
|
||||
|
||||
Reference in New Issue
Block a user