PokéRogue
    Preparing search index...

    Interface GenericSerializableBattlerTag<T>

    Interface for a generic serializable battler tag, i.e. one that does not have a dedicated subclass.

    Used to ensure type safety when serializing battler tags, allowing Typescript to properly infer the type of the tag.

    BattlerTagTypeMap

    interface GenericSerializableBattlerTag<T extends BattlerTagType> {
        sourceId?: number;
        sourceMove?: MoveId;
        tagType: T;
        turnCount: number;
        get isBatonPassable(): boolean;
        get lapseTypes(): readonly BattlerTagLapseType[];
        canAdd(_pokemon: Pokemon): boolean;
        getDescriptor(): string;
        getMoveName(): string | null;
        getSourcePokemon(): Pokemon | undefined;
        isSourceLinked(): boolean;
        lapse(_pokemon: Pokemon, _lapseType: BattlerTagLapseType): boolean;
        loadTag<const T extends GenericSerializableBattlerTag<T>>(
            source: BaseBattlerTag & Pick<T, "tagType">,
        ): void;
        onAdd(_pokemon: Pokemon): void;
        onOverlap(_pokemon: Pokemon): void;
        onRemove(_pokemon: Pokemon): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    sourceId?: number

    The PID of the Pokemon that added this tag, or undefined if not set by a Pokemon.

    sourceMove?: MoveId

    The MoveId that created this tag, or undefined if not set by a move.

    tagType: T
    turnCount: number

    The tag's remaining duration.

    Accessors

    Methods