pokemon-rogue-battle
    Preparing search index...

    Class StockpilingTagSealed

    Battler tag enabling the Stockpile mechanic. This tag handles:

    • Stack tracking, including max limit enforcement (which is replicated in Stockpile for redundancy).

    • Stat changes on adding a stack. Adding a stockpile stack attempts to raise the pokemon's DEF and SPDEF by +1.

    • Stat changes on removal of (all) stacks.

      • Removing stacks decreases DEF and SPDEF, independently, by one stage for each stack that successfully changed the stat when added.

    Hierarchy (View Summary)

    Index

    Constructors

    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

    statChangeCounts: { "2": number; "4": number } = ...
    stockpiledCount: number = 0
    tagType: STOCKPILING = BattlerTagType.STOCKPILING
    turnCount: number

    The tag's remaining duration

    Accessors

    Methods

    • Load the data for a given BattlerTag or JSON representation thereof. Should be inherited from by any battler tag with custom attributes.

      Parameters

      • source: BaseBattlerTag & Pick<
            StockpilingTag,
            "tagType"
            | "stockpiledCount"
            | "statChangeCounts",
        >

        An object containing the fields needed to reconstruct this tag.

      Returns void

    • Adds a stockpile stack to a pokemon, up to a maximum of 3 stacks. Note that onOverlap defers to this method.

      If a stack is added, a message is displayed and the pokemon's DEF and SPDEF are increased by 1. For each stat, an internal counter is incremented (by 1) if the stat was successfully changed.

      Parameters

      Returns void