mwg API
    Preparing search index...

    Interface Move<TEffect>

    A move, as data: what it costs, what it targets, and its effects - whatever those are. mwg does not interpret effects; a game's own battle loop reads it and decides what happens, the same way mwg/actors' Modifier carries a stat and a number without the framework knowing what "poisoned" means.

    interface Move<TEffect = unknown> {
        cost?: number;
        effects?: TEffect;
        id: string;
        target: string;
        type: string;
    }

    Type Parameters

    • TEffect = unknown
    Index
    cost?: number

    energy, PP, an action point cost - whatever the game's resource is

    effects?: TEffect
    id: string
    target: string

    a game-defined target shape: 'self', 'single-enemy', 'all-allies', anything else

    type: string