DotNet.Ships.Class.Resistances - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
EliteDangerousAlmanac / Ships / Resistances
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Resistances.cs:86
How a build's shield and hull resistances stack, including the diminishing returns the game applies once they get high.
A resistance is the fraction of incoming damage removed, and its complement is the damage multiplier, which is what stacking actually multiplies. Sources stack multiplicatively on that multiplier, so two twenty percent resisters leave sixty-four percent of the damage rather than sixty. The game then bends the result so that stacking cannot run away.
On shields, once the boosters push the multiplier below seventy percent of what the generator alone gives, the remaining gain is halved. On a hull, once the stack drops the multiplier below the best single source, capped at seventy percent, the range is squeezed the same way; and where the squeeze would raise the multiplier, the plain product stands.
This type holds no data: fractions go in and fractions come out. The reference implementation is EDCD coriolis, and the algorithm is ported as fact rather than as code; see ATTRIBUTIONS.md for credit and licence terms.
staticEffectiveHitPoints(total,resistances):DamageTypeValues
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Resistances.cs:118
How much raw damage of each type a pool of hit points can soak.
double
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 the pool, and infinity at or above a full resistance: nothing of that type gets through.
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.
ArgumentNullException
resistances is null.
staticMapDamageTypes(value):DamageTypeValues
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Resistances.cs:92
Builds one figure per damage type.
Func<DamageType, double>
Called with each damage type in turn, and answers that type's figure.
The four figures in one record.
ArgumentNullException
value is null.
staticStackArmourResistance(bulkhead,reinforcements?):double
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Resistances.cs:151
A hull stack's effective resistance to one damage type.
double
The fitted armour's resistance to this damage type, as a fraction. Lightweight alloy is a kinetic weakness rather than a resistance.
IReadOnlyList<double>? = null
Each fitted hull reinforcement package's resistance to the same type.
double
The effective resistance, as a fraction.
staticStackShieldResistance(generator,boosters?):double
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Resistances.cs:139
A shield stack's effective resistance to one damage type.
double
The shield generator's resistance to this damage type, as a fraction. A negative figure is a weakness.
IReadOnlyList<double>? = null
Each powered shield booster's resistance to the same type.
double
The effective resistance, as a fraction: the share of incoming damage of that type the shields remove.
staticSystemsResistance(pips):double
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Resistances.cs:172
The extra shield resistance that pips to the systems capacitor buy, on top of the generator and the boosters.
double
Pips to the systems capacitor, from zero through four. A fractional allocation is allowed, because the game's own curve is continuous.
double
The resistance the pips add, as a fraction, rising to sixty percent at four pips.
It applies to every damage type, absolute included, and multiplies with the shield's own resistance rather than adding to it.
ArgumentOutOfRangeException
pips is not a finite number from zero through four.