UI system that plays board-level visual effects. Receives BoardVfx events dispatched by the scene and routes them to the appropriate animation.
One-shot effects (SPAWN, MOVE, ATTACK, DAMAGE, DEATH, REGEN) resolve as promises when their animation finishes. Persistent effects (DAZED, BURNING) attach particle emitters to an entity and run until remove() is called. All persistent emitters are cleaned up automatically on scene shutdown.
Plays a one-shot effect or attaches a persistent effect for the given BoardVfx event. One-shot effects return a promise that resolves on completion. Persistent effects (DAZED, BURNING) return immediately.
Stops and destroys a persistent effect on the given entity. No-ops if the effect is not currently active on that entity.
Enqueues a floating text notification above the entity. If no queue exists for the entity the item is added and the drain starts immediately. Otherwise it is appended and the active drain picks it up in turn.
Shifts the next item off the entity's queue and renders it as a floating text. Schedules itself again after a delay if more items remain, otherwise removes the queue entry.
Drops all pending notifications for the entity. Called on death to prevent floating text firing after the entity has been removed.
Routes to the appropriate attack animation based on damage type and range. Falls back to a no-op promise for unimplemented combinations.
Plays the death animation — emits a pixel particle burst at the target's position then fades the target to alpha 0 over the configured duration. Destroys the particle emitter on completion.
Tweens the target to the given world position. Uses the default move duration but accepts an override for cases where a unit travels across multiple tiles and each step needs a proportionally shorter duration. Resolves when the tween completes.
Fades the target in from alpha 0 to 1 over the configured spawn duration. Resolves when the tween completes.
Attaches three star particle emitters above the entity to indicate a dazed state. No-ops if the entity already has an active dazed effect.
Attaches five burning particle emitters across the entity to simulate a spreading fire. No-ops if the entity already has an active burning effect.
Destroys all dazed emitters on the given entity and removes it from the dazed tracking map.
Destroys all burning emitters on the given entity and removes it from the burning tracking map.
Destroys all active persistent emitters (burning and dazed) and clears their tracking maps. Called automatically on scene shutdown.