ships.Function.shieldCapacitorMetrics - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / shieldCapacitorMetrics

Function: shieldCapacitorMetrics()

shieldCapacitorMetrics(input): ShieldCapacitorMetrics

Defined in: src/ships/shield-capacitor.ts:144

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

Parameters

input

ShieldCapacitorInput

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

Returns

ShieldCapacitorMetrics

The ShieldCapacitorMetrics. At no pips systemsResistance and rechargeRate are 0 and the effective figures equal the bare ones that went in.

Throws

If systemsPips is outside [0, 4], if a strength, capacity or recharge is negative or non-finite, or if a resistance is not a finite number. The pips are checked first, so a bad allocation is reported before the shield.

Throws

If resistances is not an object carrying the four damage types.

Example

import { shieldMetrics } from '@elite-dangerous-almanac/core/ships/shields';
import { shieldCapacitorMetrics } from '@elite-dangerous-almanac/core/ships/shield-capacitor';

// The bare shield, then what four pips to SYS make of it.
const shields = shieldMetrics({
  hullMass: 400,
  baseShieldStrength: 350,
  generator: {
    minMass: 270, optMass: 540, maxMass: 1350,
    minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
    kineticResistance: 0.4,
  },
});
const sys = shieldCapacitorMetrics({
  ...shields,
  systemsCapacity: 41,
  systemsRecharge: 3.9,
  systemsPips: 4,
});
Number(sys.systemsResistance.toFixed(2));            // -> 0.6
Number(sys.effectiveResistances.kinetic.toFixed(2)); // -> 0.76
sys.effectiveHitPoints.kinetic > shields.effectiveHitPoints.kinetic; // -> true
⚠️ **GitHub.com Fallback** ⚠️