screeps-api
    Preparing search index...

    Interface StructureTower

    Remotely attacks or heals creeps, or repairs structures. Can be targeted to any object in the room.

    https://docs.screeps.com/api/#StructureTower

    interface StructureTower {
        _id: string;
        _isDisabled: boolean;
        actionLog: {
            attack: Position | null;
            heal: Position | null;
            repair: Position | null;
        };
        effects?: { [index: number]: Effect }
        | null;
        hits: number;
        hitsMax: number;
        name?: string;
        notifyWhenAttacked: boolean;
        room: string;
        store: { energy: number };
        storeCapacityResource: { energy: number | null };
        type: "tower";
        user: string;
        x: number;
        y: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _id: string
    _isDisabled: boolean
    actionLog: {
        attack: Position | null;
        heal: Position | null;
        repair: Position | null;
    }
    effects?: { [index: number]: Effect } | null

    Temporary effects that are active on this object

    hits: number
    hitsMax: number
    name?: string
    notifyWhenAttacked: boolean
    room: string
    store: { energy: number }
    storeCapacityResource: { energy: number | null }

    Capacities should not be null, except on minerals in a lab when another mineral type is already being stored.

    type: "tower"
    user: string

    ID of the user who owns this object.

    Note: NPCs do not have long-form hex ID strings like normal players:

    • Invader: "2"
    • SourceKeeper: "3"
    x: number
    y: number