java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.abilities.Abilities

public class Abilities extends Object
Represents all the abilities and hidden abilities a Species's form can have. Abilities represented by Ability
  • Constructor Details

    • Abilities

      public Abilities(Ability[] abilities, Ability[] hiddenAbilities)
      Default constructor
      Parameters:
      abilities - All abilities
      hiddenAbilities - All hidden abilities
  • Method Details

    • getAbilities

      public Ability[] getAbilities()
      An array of all the form's potential abilities
      Returns:
      All abilities the form can have
    • getHiddenAbilities

      public Ability[] getHiddenAbilities()
      An array of all the form's potential hidden abilities Currently will only have a maximum of one per pokemon. However, if GameFreak ever add multiple then this will be where the others reside
      Returns:
      All hidden abilities the form can have
    • hasHiddenAbilities

      public boolean hasHiddenAbilities()
    • getAll

      public Ability[] getAll()
      Gets the hidden abilities and normal abilities combined
      Returns:
      All the abilities
    • getRandomAbility

      public Ability getRandomAbility()
      Gets a random ability from the form's set of abilities
      Returns:
      A random ability
    • getRandomAbilityExcluding

      public Ability getRandomAbilityExcluding(Ability... excluding)
      Gets a random ability from the form's set of abilities excluding those provided
      Parameters:
      excluding - The ones to ignore
      Returns:
      A random ability
    • getRandomHiddenAbility

      public Ability getRandomHiddenAbility()
      Gets a random ability from the form's set of hidden abilities
      Returns:
      A random hidden ability
    • getRandomHiddenAbilityExcluding

      public Ability getRandomHiddenAbilityExcluding(Ability... excluding)
      Gets a random ability from the form's set of hidden abilities excluding those provided
      Parameters:
      excluding - The ones to ignore
      Returns:
      A random hidden ability
    • getAbilitySlot

      public int getAbilitySlot(Ability check)
      Gets the slot of the ability
      Parameters:
      check - Ability searching for
      Returns:
      -1 if not found
    • getHiddenAbilitySlot

      public int getHiddenAbilitySlot(Ability check)
      Gets the slot of the ability
      Parameters:
      check - Ability searching for
      Returns:
      -1 if not found
    • resolveAbility

      public Ability resolveAbility(int slot, boolean hidden)
    • resolveFromOldStyleSlot

      public Ability resolveFromOldStyleSlot(int slot)
    • isAbility

      public boolean isAbility(Ability... abilities)
    • isHiddenAbility

      public boolean isHiddenAbility(Ability... abilities)
    • transferAbility

      public Ability transferAbility(Stats form, Ability ability)
    • getAbilityByName

      public Ability getAbilityByName(String name)