ships.Function.effectiveHitPoints - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / ships / effectiveHitPoints
effectiveHitPoints(
total,resistances):DamageTypeValues
Defined in: src/ships/resistances.ts:165
How much raw damage of each type a pool of hit points can soak — total / (1 − resistance).
number
The pool, in whatever unit it is measured: hull points for armour, megajoules for shields.
The effective resistances the pool sits behind, already stacked.
The effective hit points per damage type, in the same unit as total, and
Infinity at or above 100% — nothing of that type gets through, and a resistance past
the documented (-∞, 1] range never reports a negative pool.
A negative resistance is a weakness and reports fewer effective hit points than the pool holds, which is the point: lightweight alloy soaks less kinetic damage than its hull points suggest.
import { effectiveHitPoints } from '@elite-dangerous-almanac/core/ships/resistances';
// 945 hull points behind lightweight alloy's -20% kinetic
effectiveHitPoints(945, { kinetic: -0.2, thermal: 0, explosive: -0.4, caustic: 0 })
.kinetic; // -> 787.5