Skip to content

runEffects beta ​

Function of @v12-engine/engine

ts
runEffects: (context: EffectContext, effects: readonly EffectDef[] | undefined) => void

Runs a list of effects as the engine runs every list (EffectDef[]): each by its handler, in the order of its chain (EffectCommon.when lowered into what it waits on). What a game's own effect does with the effects it holds (defineEffect({ type: 'orb', run: (context, effect) => runEffects(context, effect.effects) })), and a hook or a system with a context it puts together (EffectContext: the caster whose they are, the ability, the place, an origin they go off from). Nothing is told: landEffects is for where something arrives