Table of Contents

Class PercentageDefensePenetrationFnSO

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

Reduces defense by subtracting a percentage of the pierced defense equal to the piercing stat percentage. Example: piercingStatValue = 20 -> reduces defense by 20%. Create isntances via Assets -> Create -> Astra Health / Def Mitigation Functions / Log Def Mitigation.

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

Methods

CalculatePiercedDefense(long, long, StatSO, bool)

Apply percentage-based penetration to the pierced defense and optionally clamp the result to the stat's bounds.

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

Parameters

piercingStatValue long

Percentage to reduce (e.g. 25 means 25%).

defensiveStatValue long

Original defense stat.

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).