Skip to content

ships.Function.armourPiercingFactor

github-actions[bot] edited this page Aug 26, 2026 · 73 revisions

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

Function: armourPiercingFactor()

armourPiercingFactor(armourPiercing, hardness): number

Defined in: src/ships/weapons.ts:466

How much of a weapon's damage a hull's hardness lets through.

Parameters

armourPiercing

number

The weapon's piercing rating.

hardness

number

The target hull's finite, non-negative Ship.hardness. Pass 0 when the hardness is unknown, which disables hardness scaling.

Returns

number

A factor in [0, 1]: 1 when the weapon out-pierces the hull, otherwise armourPiercing / hardness. A zero piercing rating returns 0 when hardness is positive; zero hardness always returns 1 because it disables hardness scaling. Applies to hull damage only — shields do not care.

Throws

If either argument is not a finite non-negative number.

Example

import { armourPiercingFactor } from '@elite-dangerous-almanac/core/ships/weapons';

armourPiercingFactor(22, 65); // -> 0.338…  a small multi-cannon against an Anaconda
armourPiercingFactor(100, 65); // -> 1      a rail gun goes straight through

API

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (16)
Type Aliases (3)
Variables (11)
Functions (37)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (6)
Type Aliases (8)
Variables (3)
Functions (10)
Subpath modules (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (17)
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
Functions (9)
ships
Classes (3)
BuildMetrics

Methods

LoadoutEditError

Constructors

Properties

Methods

ShipLoadout

Accessors

Methods

Interfaces (125)
Type Aliases (44)
Variables (10)
Functions (85)
Subpath modules (8)

Clone this wiki locally