Table of Contents

Class LogDefensePenetrationFnSO

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

Applies a logarithmic divisive reduction to defense to provide diminishing returns as piercing increases. Create instances via Assets -> Create -> Astra Health / Def Penetration Functions / Log Def Penetration.

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

Methods

CalculatePiercedDefense(long, long, StatSO, bool)

Reduces defense using a logarithmic divisive formula that provides diminishing returns. Formula: Reduced Defense = Defense * (BaseValue / (BaseValue + Log(1 + PiercingStat * ScaleFactor)))

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

Parameters

piercingStatValue long

The attacker's piercing stat value.

defensiveStatValue long

The defender's original defense stat value.

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)