Table of Contents

Class HyperbolicDefensePenetrationFnSO

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

Pierces P / (P + K) of the target's defense, where P is the piercing stat and K the piercing that removes half of it. The penetration counterpart of HyperbolicDamageMitigationFnSO.

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

Remarks

K is BaseValue + PerLevel × level, like on the mitigation function, with its own values. Create instances via Assets -> Create -> Astra Health / Def Penetration Functions / Hyperbolic Def Penetration.

Methods

CalculatePiercedDefense(long, long, StatSO, in ReductionContext, bool)

Reduces defense with Defense × K / (P + K).

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

Parameters

piercingStatValue long

The attacker's piercing stat value P.

defensiveStatValue long

The defender's original defense stat value.

defensiveStat StatSO

The defensive stat used to clamp the result. No clamp is applied when it is null.

context ReductionContext

Levels used to evaluate K.

applyClamp bool

Whether to clamp the result to the stat's bounds.

Returns

double

The reduced defense value.

Remarks

If piercingStatValue is zero or negative the defense is returned unchanged.

CalculatePiercedDefense(long, long, StatSO, bool)

Reduces defense with Defense × K / (P + K), evaluating K at level 1 because no entity is known. The gameplay path uses the overload with a ReductionContext.

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

Parameters

piercingStatValue long
defensiveStatValue long
defensiveStat StatSO
applyClamp bool

Returns

double