Table of Contents

Class FlatDamageMitigationFnSO

Namespace
ElectricDrill.AstraHealth.DamageMitigationFunctions
Assembly
com.electricdrill.astra-health.Runtime.dll
public class FlatDamageMitigationFnSO : DamageMitigationFnSO, ITaggable
Inheritance
object
FlatDamageMitigationFnSO
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

amount long

Incoming damage amount.

defensiveStatValue double

Value of the defensive statistic used to reduce damage. This value is multiplied by ElectricDrill.AstraHealth.DamageMitigationFunctions.FlatDamageMitigationFnSO._factor before being subtracted.

roundingMode RoundingMode

Rounding mode applied to the final fractional damage value.

Returns

long

The reduced damage as a non-negative long.