DotNet.Ships.Class.ShieldCapacitor - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Ships / ShieldCapacitor

Class: ShieldCapacitor

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ShieldCapacitor.cs:81

The SYS capacitor: what pips to SYS buy a raised shield, and what the shield is worth once they are folded in.

Remarks

SYS does two things at once. It resists: the allocation adds a flat resistance to every damage type, which multiplies with the shield's own stack rather than adding to it. And it recharges: the capacitor's energy is what the generator spends putting the shield back up, on the same non-linear pip curve the other two capacitors follow.

The bare shield those effective figures are built from is Shields.Metrics, which is pip-free. What the recharge reported here buys, in seconds from collapse back to a raised shield, is ShieldRecovery.Metrics, which takes the same allocation and the generator's regeneration rates.

Reference implementation: EDCD/Coriolis, src/app/shipyard/Calculations.js. The algorithm is ported as fact rather than as code. See ATTRIBUTIONS.md for credit and licence terms.

Methods

Metrics()

static Metrics(input, systemsPips?): ShieldCapacitorMetrics

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ShieldCapacitor.cs:103

Calculates what a SYS-pip allocation gives a raised shield.

Parameters

input

ShieldCapacitorInput

The bare shield's strength and stacked resistances, and the distributor's SYS capacity and rated four-pip recharge.

systemsPips

double = 4

The pips assigned to SYS, from zero through four. Fractional pips are accepted.

Returns

ShieldCapacitorMetrics

What the allocation is worth. At no pips the resistance and the recharge rate are zero, and the effective figures equal the bare ones that went in.

Remarks

The pips are checked before the shield, so a bad allocation is reported first.

Exceptions

ArgumentNullException

input is null.

ArgumentOutOfRangeException

The allocation is outside zero through four, a strength, capacity or recharge rate is negative or not finite, or a resistance is not a finite number.

⚠️ **GitHub.com Fallback** ⚠️