Table of Contents

Class DamageTypeSO

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

Scriptable asset that describes a damage category (for example: Physical, Fire, Poison). A DamageType declares which stat reduces this damage, which mitigation/penetration functions to use, whether a stat pierces its defensive stats and whether it ignores barriers. Create instances via Assets -> Create -> Astra Health / DamageType.

public class DamageTypeSO : ScriptableObject, ITaggable
Inheritance
object
DamageTypeSO
Implements
ITaggable

Properties

DamageMitigationFn

The mitigation function used to compute how the damage amount is modified by the reducing stat (see DefensiveStat). This may implement flat, percentage, logarithmic, or custom mitigation behaviour.

public DamageMitigationFnSO DamageMitigationFn { get; }

Property Value

DamageMitigationFnSO

DefensePenetrationFn

The penetration function used to compute how the piercing stat modifies the defensive stat that reduces damage for this DamageTypeSO. This may implement flat, percentage, logarithmic, or custom penetration behaviour.

public DefensePenetrationFnSO DefensePenetrationFn { get; }

Property Value

DefensePenetrationFnSO

DefensiveStat

The defensive stat that reduces the raw damage amount for this DamageTypeSO. For example "Physical" damage may be reduced by an "Armor" stat.

public StatSO DefensiveStat { get; }

Property Value

StatSO

DefensiveStatPiercedBy

The stat that pierces the defensive stat for this damage type (for example an "Armor Penetration" stat pierces the "Armor" stat). May be null.

public StatSO DefensiveStatPiercedBy { get; }

Property Value

StatSO

FlatDamageModificationStat

The stat representing the flat damage accumulator for this type. This stat serves as an accumulator for multiple flat modifiers (positive or negative) that affect damage of this type linearly.

public StatSO FlatDamageModificationStat { get; }

Property Value

StatSO

IgnoreGenericFlatDamageModifiers

If true, this damage type ignores generic flat damage modifiers. Useful for "true damage" mechanics that bypass flat reductions/increments.

public bool IgnoreGenericFlatDamageModifiers { get; protected set; }

Property Value

bool

IgnoreGenericPercentageDamageModifiers

If true, this damage type ignores generic percentage damage modifiers. Useful for "true damage" mechanics that bypass resistances/weaknesses.

public bool IgnoreGenericPercentageDamageModifiers { get; protected set; }

Property Value

bool

IgnoresBarrier

If true, this damage type bypasses barrier mechanic and applies directly to underlying health. Typical use: certain elemental or pure damage types.

public bool IgnoresBarrier { get; protected set; }

Property Value

bool

Lifesteal

Lifesteal configuration specific to this damage type. When the LifestealStat is set, entities that deal damage of this type will steal a percentage of the damage as health, on top of any generic lifesteal configured in IAstraHealthConfig.

public LifestealStatConfig Lifesteal { get; }

Property Value

LifestealStatConfig

PercentageDamageModificationStat

The stat representing the percentage damage accumulator for this type. This stat serves as an accumulator for multiple percentage modifiers (positive or negative) that affect damage of this type.

public StatSO PercentageDamageModificationStat { get; }

Property Value

StatSO

Tags

The tags associated with this object.

public GameTagSet Tags { get; }

Property Value

GameTagSet

Methods

ToString()

Returns the asset name of this damage type.

public override string ToString()

Returns

string