Skip to content

effectTargets beta ​

Function of @v12-engine/engine

ts
export declare function effectTargets(context: EffectContext, effect: EffectDef, fallback: 'enemies' | 'allies'): Entity[];

Who an effect applies to: the caster (on: 'caster'), the target or the caster (no radius), or who is within its radius of where it landed, as affects (fallback when it says nothing), layers, kinds, tags, ifBuff, only and what keeps out of the ability's way (avoids) say, the unit it went off from aside (EffectContext.origin); and of those, who the game lets it reach (beforeEffect, mayReach). A handler of a game's own effect calls it as the engine's do: who it gives is told to effectLanded once the handler is done