mwg API
    Preparing search index...

    Type Alias EventCommand

    EventCommand:
        | { say: string; speaker?: string }
        | { ask: string; choices: EventChoice[]; speaker?: string; store?: string }
        | { wait: number }
        | { setSwitch: string; value: boolean }
        | { setVariable: string; value: number }
        | { addVariable: string; amount: number }
        | { else?: EventCommand[]; if: EventCondition; then: EventCommand[] }
        | { move: { steps: MoveStep[]; target: string } }
        | { call: (state: EventRunnerState) => void | Promise<void> }

    A map event's script, written as data - the same shape mwg/stage's StageCommand is, but for map events rather than dialogue scenes: switches, variables and branches instead of a backdrop and characters. Kept as its own interpreter because the two run on genuinely different state, not because the "list of commands, awaited as one call" shape needed reinventing.