Table of Contents

Namespace ElectricDrill.AstraHealth.GameActions.Actions

Classes

CounterDamageGameActionSO<TContext>

Abstract base game action that reacts to a resolved damage event by inflicting damage in return. Works with any context implementing ElectricDrill.AstraRpgFramework.Contexts.IHasTarget, ElectricDrill.AstraRpgFramework.Contexts.IHasPerformer and IHasAmount: compatible with DamageResolutionContext, EntityDiedContext, and others.

This class implements ElectricDrill.AstraRpgFramework.Contexts.IEffectInstigator so it can be passed as the instigator of the counter-damage it produces. Listeners can then check ctx.Instigator == thisActionSO to identify and filter self-triggered cycles.

DealDamageGameActionSO<TContext>

Abstract base game action that inflicts configured damage on the entity carried by the incoming context. Works with any context implementing ElectricDrill.AstraRpgFramework.Contexts.IHasEntity: the context entity is the damage target by default, while the dealer is resolved from the embedded PreDamageContextConfig (None → system damage, any context role → self-inflicted damage from that same entity).

Unlike CounterDamageGameActionSO<TContext> — which reacts to a resolved damage event — this action is meant to be a deliberate, first-order damage application (e.g. a periodic tick, an on-death explosion, an ability payload). By default the produced PreDamageContext is reactable so downstream reactive systems can respond to it; disable ElectricDrill.AstraHealth.GameActions.Actions.DealDamageGameActionSO<TContext>._isReactable when the damage is itself a secondary effect that should not spawn further reactions.

This class implements ElectricDrill.AstraRpgFramework.Contexts.IEffectInstigator so it can be passed as the instigator of the damage it produces. Listeners can then check ctx.Instigator == thisActionSO to identify and filter self-triggered cycles.

When TContext also implements IHasAmount, the carried amount is forwarded to the config so DamageFromContext keeps working; otherwise that mode falls back to 0 with a warning.

ResurrectEntityGameActionSO<TContext>

Base generic game action for resurrecting entities with EntityHealth components. Can be configured to resurrect with either a percentage of max HP or a flat HP amount. Uses the default resurrection source from config and no healer entity (system action).

Connect to any GameEventListener whose payload implements ElectricDrill.AstraRpgFramework.Contexts.IHasEntity, such as EntityDiedGameEventListener, DamageResolutionGameEventListener, or directly from an EntityHealth reference.

SetEntityOverrideOnDeathGameActionSO<TContext>

Base generic game action that assigns (or clears) the OverrideOnDeathGameAction field. Useful for one-shot mechanics such as "resurrect on first death": configure a CompositeAction that resurrects the entity and then executes this action with ElectricDrill.AstraHealth.GameActions.Actions.SetEntityOverrideOnDeathGameActionSO<TContext>._newOverrideGameAction set to null, so the override is cleared and subsequent deaths use the default config action.

Connect to any GameEventListener whose payload implements ElectricDrill.AstraRpgFramework.Contexts.IHasEntity, such as EntityDiedGameEventListener, DamageResolutionGameEventListener, or directly from an EntityHealth reference.

SetEntityOverrideOnResurrectionGameActionSO<TContext>

Base generic game action that assigns (or clears) the OverrideOnResurrectionGameAction field.

Connect to any GameEventListener whose payload implements ElectricDrill.AstraRpgFramework.Contexts.IHasEntity, such as EntityDiedGameEventListener, EntityResurrectedGameEventListener, or directly from an EntityHealth reference.