lowerChain beta
Function of @v12-engine/engine
ts
export declare function lowerChain(effects: readonly EffectDef[], orphan?: (index: number, effect: EffectDef) => void): EffectDef[];A list of effects as it runs (EffectCommon.when): every effect that waits for a moment taken out of the list and put at the end of the list of the nearest one before it that comes to that moment (a missile's effects for hit, its onEnd for end), copied; what waits on what waits itself goes in there. The list itself when nothing in it waits, so the nested shape ({ type: 'missile', effects: [...] }) and a chain are one thing by the time they run. One with nothing to wait on is dropped, and orphan told of it by its index in the list