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

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

Function: stackShieldResistance()

stackShieldResistance(generator, boosters?): number

Defined in: src/ships/resistances.ts:216

A shield stack's effective resistance to one damage type.

Parameters

generator

number

The shield generator's resistance to this damage type, as a fraction (negative for a weakness).

boosters?

readonly number[] = []

Each powered shield booster's resistance to the same type, as fractions.

Returns

number

The effective resistance, as a fraction — the share of incoming damage of that type the shields remove.

Example

import { stackShieldResistance } from '@elite-dangerous-almanac/core/ships/resistances';

stackShieldResistance(0.4);                 // -> 0.4   (generator alone)
stackShieldResistance(-0.2, [0.1, 0.1]);    // -> a thermal weakness, partly patched
⚠️ **GitHub.com Fallback** ⚠️