import Status from "./Status"; interface EventState { waiting: boolean; hpStart: number; hpEnd: number; duration: number; object: any; playerId?: string; opponentId?: string; } interface Event { init?: (() => void) | ((state: EventState) => void); done?: ((tick: number, state: EventState) => boolean); next?: Event; last?: Event; } declare type DeepEvent = (() => void) | Event | DeepEvent[] | undefined; declare namespace Events { function append(event: Event, next?: Event): void; function flatten(script: DeepEvent): Event; function wait(frames: number): Event; function changeHealth(status: Status, hpEnd: number, skipAnimation?: boolean): Event; } declare class EventDriver { private current?; private ticks; private readonly state; constructor(); update(): void; setEvent(event?: Event): void; append(event?: Event): void; running(): boolean; force(event: Event): void; } export { EventDriver, EventState, Event, DeepEvent, Events };