java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.ability.AbstractAbility
com.pixelmonmod.pixelmon.api.pokemon.ability.abilities.PreventStatus
All Implemented Interfaces:
Ability, RarityTweak, ITranslatable
Direct Known Subclasses:
Immunity, Limber, MagmaArmor, Oblivious, OwnTempo, PreventSleep, WaterVeil

public class PreventStatus extends AbstractAbility
Prevents the Pokémon from being afflicted by certain statuses.
  • Field Details

    • preventedStatuses

      protected StatusType[] preventedStatuses
      The statuses that the Ability grants an immunity to.
    • immuneText

      protected String immuneText
      The lang code for the text to display when the Ability prevents the status.
    • cureText

      protected String cureText
      The lang code for the text to display when the Ability cures the status.
  • Constructor Details

    • PreventStatus

      public PreventStatus(String immuneText, String cureText, StatusType... preventedStatuses)
      Initializes the Ability.
      Parameters:
      immuneText - The lang code for the text to display when the Ability prevents the status.
      cureText - The lang code for the text to display when the Ability cures the status.
      preventedStatuses - The statuses that the Ability grants an immunity to.
  • Method Details

    • allowsStatus

      public boolean allowsStatus(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper user)
      Description copied from interface: Ability
      Fires when a status attempts to apply.
      Parameters:
      status - StatusType.[whatever status] == status is the condition of the if statement.
      pokemon - The victim.
      user - The user.
      Returns:
      Whether the status can be afflicted.
    • onStatusAdded

      public void onStatusAdded(StatusBase status, PixelmonWrapper user, PixelmonWrapper opponent)
      Description copied from interface: Ability
      Triggers when the Pokémon acquires a status.
      Parameters:
      status - The status that was added.
      user - The statused Pokémon.
      opponent - The Pokémon who caused the status.
    • applySwitchInEffect

      public void applySwitchInEffect(PixelmonWrapper pokemon)
      Description copied from interface: Ability
      Triggers after the Pokémon switches in and when the Pokémon gains an Ability.
      Parameters:
      pokemon - The Pokémon switching in.
    • canBeIgnored

      public boolean canBeIgnored()
      Description copied from interface: Ability
      Returns whether the ability can be bypassed by moves that ignore abilities or not. e.g. Moldbreaker or G-Max Drum Solo
      Returns:
      Whether the ability can be ignored.