mwg API
    Preparing search index...

    Interface PathOptions

    interface PathOptions {
        blocked?: ReadonlySet<number>;
        climb?: number;
        heights?: Elevation;
        topology?: 4 | 8;
    }

    Hierarchy (View Summary)

    Index
    blocked?: ReadonlySet<number>

    Cells to treat as blocked beyond the terrain (other creatures, usually).

    Passed per call rather than held, because who is standing where changes every turn and a cached path is a monster walking through its neighbour.

    climb?: number

    how many levels up one step may climb; defaults to 1, the ordinary stair or ramp

    heights?: Elevation

    The map's heights, when climbing matters. A step from one cell to the next is allowed when the destination rises no more than climb above the start; going down is always allowed, the way stepping off a ledge is. Needs heights to mean anything on its own.

    topology?: 4 | 8

    4 for cardinal moves only, 8 to allow diagonals