Class FlatDamageMitigationFnSO
- Assembly
- com.electricdrill.astra-health.Runtime.dll
public class FlatDamageMitigationFnSO : DamageMitigationFnSO, ITaggable
- Inheritance
-
objectFlatDamageMitigationFnSO
- Implements
-
ITaggable
- Inherited Members
Methods
CalculateMitigatedDamage(long, double, RoundingMode)
Subtracts defensiveStatValue * _factor from the incoming amount.
The result is clamped to a minimum of 0 and rounded to the nearest whole number.
public override long CalculateMitigatedDamage(long amount, double defensiveStatValue, RoundingMode roundingMode)
Parameters
amountlongIncoming damage amount.
defensiveStatValuedoubleValue of the defensive statistic used to reduce damage. This value is multiplied by ElectricDrill.AstraHealth.DamageMitigationFunctions.FlatDamageMitigationFnSO._factor before being subtracted.
roundingModeRoundingModeRounding mode applied to the final fractional damage value.
Returns
- long
The reduced damage as a non-negative long.