pokemon-rogue-battle
    Preparing search index...

    Class StealEatBerryAttr

    Attribute used for moves that steal and eat a random berry from the target. Used for Moves.PLUCK & Moves.BUG_BITE.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chosenBerry: BerryModifier
    options?: MoveEffectAttrOptions

    A container for this attribute's optional parameters

    MoveEffectAttrOptions for supported params.

    selfTarget: boolean

    Should this Move target the user?

    Accessors

    • get effectChanceOverride(): undefined | number

      If defined, overrides the move's base chance for this secondary effect to trigger.

      Returns undefined | number

    • get firstHitOnly(): boolean

      true if this effect should only trigger on the first hit of multi-hit moves.

      Returns boolean

      false
      
    • get firstTargetOnly(): boolean

      true if this effect should apply only upon hitting a target for the first time when targeting multiple Pokemon.

      Returns boolean

      false
      
    • get lastHitOnly(): boolean

      true if this effect should only trigger on the last hit of multi-hit moves.

      Returns boolean

      false
      

    Methods

    • Internal function to apply berry effects.

      Parameters

      • consumer: default

        The Pokemon eating the berry; assumed to also be owner if berryOwner is omitted

      • berryOwner: default = consumer

        The Pokemon whose berry is being eaten; defaults to consumer if not specified.

      • updateHarvest: boolean = ...

        Whether to prevent harvest from tracking berries; defaults to whether consumer equals berryOwner (i.e. consuming own berry).

      Returns void