import type { BuildupProc } from "./breakMeters.js"; /** A single damage-over-time instance: how hard, how often, and for how long. */ export interface DotSpec { /** Damage dealt at each interval. */ damagePerTick: number; /** Milliseconds between damage ticks; clamped to a positive minimum. */ intervalMs: number; /** Total lifetime in milliseconds; the DoT expires once its age reaches this. */ durationMs: number; /** Label echoed on each emitted tick (bleed, poison, burn); defaults to the apply key. */ status?: string; } /** One damage event (or expiry marker) emitted by `DotField.tick` for the game to route through its effects. */ export interface DotTick { /** The key the DoT was applied under. */ id: string; /** The DoT's `status` label, or its key when none was given. */ status: string; /** Damage to route through the game's effect pipeline this frame; 0 on a bare expiry marker. */ damage: number; /** True on the entry that ends the DoT — remove any HUD icon on it. */ expired: boolean; } /** * A pool of timed damage-over-time instances keyed by string (`bleed`, `poison`, `burn`) — the * recurring-damage counterpart to `breakMeters`' one-shot buildup procs (#536.4). `tick` advances * every active DoT and returns the damage due this frame, one entry per interval crossed, so the game * routes each through its own effect pipeline; a pure scheduler that never applies damage itself. */ export interface DotField { /** Start or refresh a DoT under `id`; reapplying the same key restarts its age and lifetime. */ apply(id: string, spec: DotSpec): void; /** Bridge a `breakMeters` buildup proc into recurring damage under `id`. */ applyProc(id: string, proc: BuildupProc, damagePerTick: number, intervalMs: number): void; active(id: string): boolean; cancel(id: string): void; clear(): void; count(): number; /** Advance every active DoT; returns the damage due this frame plus an `expired` marker per finished DoT. */ tick(dtSeconds: number): DotTick[]; } /** * Builds an empty {@link DotField}; `apply` DoTs onto it and drain damage each frame with `tick`. * * @capability dot-field track stacking damage-over-time effects and drain damage each frame */ export declare function createDotField(): DotField;