Table of Contents

Interface IAstraHealthConfig

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

Read-only view of the health system configuration used by runtime components. Consumers should read through this interface; mutation is reserved for the concrete AstraHealthConfigSO asset (edited in the Inspector or by package-internal code via its internal setters).

public interface IAstraHealthConfig

Properties

DefaultDamageCalculationCalculationStrategy

Gets the default strategy used for calculating net damage when none is explicitly specified in the target entity.

DamageCalculationStrategySO DefaultDamageCalculationCalculationStrategy { get; }

Property Value

DamageCalculationStrategySO

DefaultExpCollectionStrategy

Gets the default strategy used for determining when and how experience is collected from kills. Individual ExpCollector components can override this with a custom strategy.

ExpCollectionStrategySO DefaultExpCollectionStrategy { get; }

Property Value

ExpCollectionStrategySO

DefaultOnDeathGameAction

Gets the default ElectricDrill.AstraRpgFramework.GameActions.GameAction<TContext> to execute when an entity dies, if no specific strategy is defined in the dying entity.

GameAction<IHasEntity> DefaultOnDeathGameAction { get; }

Property Value

GameAction<IHasEntity>

DefaultOnResurrectionGameAction

Gets the default ElectricDrill.AstraRpgFramework.GameActions.GameAction<TContext> to execute when an entity is resurrected, if no specific strategy is defined in the resurrected entity.

GameAction<IHasEntity> DefaultOnResurrectionGameAction { get; }

Property Value

GameAction<IHasEntity>

DefaultResurrectionSource

Gets the heal source used for resurrections heals.

HealSourceSO DefaultResurrectionSource { get; }

Property Value

HealSourceSO

GenericFlatDamageModificationStat

Gets the stat that provides flat damage modification, regardless of type or source. Applied after percentage modifications. Stacks additively with other flat modifications.

StatSO GenericFlatDamageModificationStat { get; }

Property Value

StatSO

GenericFlatHealAmountModifierStat

Gets the stat that provides a flat heal amount modification, applied before percentage modifiers.

StatSO GenericFlatHealAmountModifierStat { get; }

Property Value

StatSO

GenericLifesteal

Gets the generic lifesteal configuration applied regardless of damage type. When the LifestealStat is set, all damage dealt by an entity triggers lifesteal based on this config, stacking with any type-specific lifesteal from the DamageTypeSO.

LifestealStatConfig GenericLifesteal { get; }

Property Value

LifestealStatConfig

GenericPercentageDamageModificationStat

Gets the stat that modifies any damage received with percentage, regardless of type or source. Stacks additively with other percentage damage modifications.

StatSO GenericPercentageDamageModificationStat { get; }

Property Value

StatSO

GenericPercentageHealAmountModifierStat

Gets the stat that modifies the amount of health healed with a percentage (e.g., 25 for +25% healing). Percentage heal modifiers are applied after flat heal modifications.

StatSO GenericPercentageHealAmountModifierStat { get; }

Property Value

StatSO

GlobalDamageResolutionEvent

Gets the global event raised after damage is fully resolved for any entity (whether applied or prevented). This event is required: all EntityHealth instances use it as the primary damage-resolution channel, and it drives lifesteal calculations.

DamageResolutionGameEvent GlobalDamageResolutionEvent { get; }

Property Value

DamageResolutionGameEvent

GlobalEntityDiedEvent

Gets the global event raised when any entity dies. This event is required: all EntityHealth instances use it as the primary death-notification channel.

EntityDiedGameEvent GlobalEntityDiedEvent { get; }

Property Value

EntityDiedGameEvent

GlobalEntityHealedEvent

Gets the global event raised after a heal is successfully applied to any entity. Optional — leave null to skip this notification.

EntityHealedGameEvent GlobalEntityHealedEvent { get; }

Property Value

EntityHealedGameEvent

GlobalEntityResurrectedEvent

Gets the global event raised when any entity is resurrected. Optional — leave null to skip this notification.

EntityResurrectedGameEvent GlobalEntityResurrectedEvent { get; }

Property Value

EntityResurrectedGameEvent

GlobalHealthChangedEvent

Gets the global event raised when any entity's health changes (gained or lost). Optional — leave null to skip this notification.

EntityHealthChangedGameEvent GlobalHealthChangedEvent { get; }

Property Value

EntityHealthChangedGameEvent

GlobalHealthRatioChangedEvent

Gets the global event raised whenever any entity's HP/MaxHP ratio changes (fires on both HP changes and MaxHP changes, providing a single reliable signal for HP-ratio-based conditions). Optional — leave null to skip this notification.

HealthRatioChangedGameEvent GlobalHealthRatioChangedEvent { get; }

Property Value

HealthRatioChangedGameEvent

GlobalMaxHealthChangedEvent

Gets the global event raised when any entity's maximum health changes. Optional — leave null to skip this notification.

EntityMaxHealthChangedGameEvent GlobalMaxHealthChangedEvent { get; }

Property Value

EntityMaxHealthChangedGameEvent

GlobalPreDamageInfoEvent

Gets the global event raised before damage is applied to any entity, allowing listeners to inspect or react to incoming damage before resolution. This event is required: all EntityHealth instances use it as the primary pre-damage channel.

PreDamageGameEvent GlobalPreDamageInfoEvent { get; }

Property Value

PreDamageGameEvent

GlobalPreHealEvent

Gets the global event raised before a heal is applied to any entity. Optional — leave null to skip this notification.

PreHealGameEvent GlobalPreHealEvent { get; }

Property Value

PreHealGameEvent

HealthAttributesScaling

Gets the attributes scaling component that determines how health scales based on attributes.

AttributesScalingComponentSO HealthAttributesScaling { get; }

Property Value

AttributesScalingComponentSO

HealthRegenerationSource

Gets the heal source used for health regeneration effects.

HealSourceSO HealthRegenerationSource { get; }

Property Value

HealSourceSO

ManualHealthRegenerationStat

Gets the stat that determines manual health regeneration amount. Use the API to trigger manual regeneration ticks programmatically. Useful for turn-based systems.

StatSO ManualHealthRegenerationStat { get; }

Property Value

StatSO

PassiveHealthRegenerationInterval

Gets the interval (in seconds) between passive health regeneration ticks. Regenerated health is calculated based on the Passive Health Regeneration Stat.

float PassiveHealthRegenerationInterval { get; }

Property Value

float

PassiveHealthRegenerationStat

Gets the stat that determines passive health regeneration amount. Stat value represents health regenerated per 10 seconds.

StatSO PassiveHealthRegenerationStat { get; }

Property Value

StatSO

RoundingSettings

Gets the rounding policy used by fractional damage, mitigation, critical and lifesteal calculations.

HealthRoundingSettings RoundingSettings { get; }

Property Value

HealthRoundingSettings

SuppressLifestealEvents

Gets whether to suppress PreHeal and ReceivedHeal events for lifesteal healing. When true, lifesteal will not raise heal events, improving performance when many entities deal repeatedly damage with lifesteal. Default is false (events are raised).

bool SuppressLifestealEvents { get; }

Property Value

bool

SuppressManualRegenerationEvents

Gets whether to suppress PreHeal and ReceivedHeal events for manual health regeneration. When true, manual regeneration will not raise heal events, improving performance in case of frequent calls. Default is false (events are raised).

bool SuppressManualRegenerationEvents { get; }

Property Value

bool

SuppressPassiveRegenerationEvents

Gets whether to suppress PreHeal and ReceivedHeal events for passive health regeneration. When true, passive regeneration will not raise heal events, improving performance for frequent regeneration ticks. Default is false (events are raised).

bool SuppressPassiveRegenerationEvents { get; }

Property Value

bool

UnifyLifestealHeals

When true, generic and type-specific lifesteal amounts are summed into a single heal. The HealSource of the damage type takes precedence over the generic one (falls back to the generic source if only generic lifesteal is active or type has no source set). When false (default), each configured lifesteal fires an independent heal with its own HealSource.

bool UnifyLifestealHeals { get; }

Property Value

bool