Interface IHasInstigator
- Namespace
- ElectricDrill.AstraRpgFramework.Contexts
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Contract for contexts that carry a reference to the specific cause of the effect.
This complements IEffectInstigator (which identifies the responsible entity) by identifying the specific thing — such as an ability, modifier, passive skill, or game system — that produced the effect.
Instigator is nullable: not every effect has a meaningful specific cause beyond its source entity and category (IEffectInstigator + DamageSourceSO / HealSourceSO).
Typical usage:
// Prevent infinite loops: ignore effects caused by this modifier itself
if (ctx.Instigator == this.Definition) return;
// React only to effects from a specific source type
if (ctx.Instigator is AbilityDefinitionSO ability && ability.IsUltimate)
ApplyStrengthBuff(ctx.Target);
public interface IHasInstigator
Properties
Instigator
The specific thing that caused this effect, or null if unspecified.
IEffectInstigator Instigator { get; }