Class FlatDefensePenetrationFnSO
- 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
-
objectFlatDefensePenetrationFnSO
- 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
piercingStatValuelongThe attacker's piercing stat value used to reduce defense.
defensiveStatValuelongThe defender's original defense stat value to be reduced.
defensiveStatStatSOThe defensive stat object used to clamp the result.
applyClampboolWhether to apply stat clamping to the result.
Returns
- double
The reduced defense value (clamped to stat's min/max bounds if applyClamp is true).