mwg API
    Preparing search index...

    Interface ScoreSubject<T>

    A subject as a score view needs it: the game's own handle, its side, and where it stands.

    interface ScoreSubject<T> {
        can_recruit?: boolean;
        id: T;
        name?: string;
        role?: string;
        side: string;
        type?: string;
        x: number;
        y: number;
    }

    Type Parameters

    • T
    Index
    can_recruit?: boolean

    whether it can recruit, i.e. is a leader; a missing value reads as false

    id: T
    name?: string

    its own name, when it has one

    role?: string

    its role/function, e.g. leader or courier

    side: string

    who it fights for; sides are compared by name, so allies share one

    type?: string

    its unit type, when the game's world has one (a Wesnoth [unit] type=)

    x: number
    y: number