Table of Contents

Class FlatDefensePenetrationFnSO

Namespace
ElectricDrill.AstraHealth.DefensePenetrationFunctions
Assembly
com.electricdrill.astra-health.Runtime.dll

Reduces defense by subtracting a scaled amount of the piercing stat from the pierced defense. The result is clamped to the stat's min/max bounds. Create instances via Assets -> Create -> Astra Health / Def Penetration Functions / Flat Def Penetration.

public class FlatDefensePenetrationFnSO : DefensePenetrationFnSO, ITaggable
Inheritance
object
FlatDefensePenetrationFnSO
Implements
ITaggable
Inherited Members

Methods

CalculatePiercedDefense(long, long, StatSO, bool)

Subtracts (piercingStatValue * factor) from the pierced defense and optionally clamps the result to the stat's bounds.

public override double CalculatePiercedDefense(long piercingStatValue, long defensiveStatValue, StatSO defensiveStat, bool applyClamp = true)

Parameters

piercingStatValue long

The attacker's piercing stat value used to reduce defense.

defensiveStatValue long

The defender's original defense stat value to be reduced.

defensiveStat StatSO

The defensive stat object used to clamp the result.

applyClamp bool

Whether to apply stat clamping to the result.

Returns

double

The reduced defense value (clamped to stat's min/max bounds if applyClamp is true).