java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.ability.AbstractAbility
com.pixelmonmod.pixelmon.api.pokemon.ability.abilities.PreventStatusTeam
All Implemented Interfaces:
Ability, RarityTweak, ITranslatable
Direct Known Subclasses:
PastelVeil

public class PreventStatusTeam extends AbstractAbility
Prevents the Pokémon and allies 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

    • PreventStatusTeam

      public PreventStatusTeam(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.
    • allowsStatusTeammate

      public boolean allowsStatusTeammate(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user)
      Description copied from interface: Ability
      Fires for all teammates when a status attempts to be applied.
      Parameters:
      status - The status being afflicted.
      pokemon - The Pokémon with the Ability.
      target - The Pokémon who is being afflicted with the status.
      user - The Pokémon inflicting the status.
      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.