Class ImmutableAttack

java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.ImmutableAttack
All Implemented Interfaces:
ITranslatable

public class ImmutableAttack extends Object implements ITranslatable
Info and base stats of an attack.
  • Field Details

  • Constructor Details

    • ImmutableAttack

      public ImmutableAttack(Element attackType, int basePower, AttackCategory attackCategory)
      Initializes a temporary base attack for damage calculation only.
      Parameters:
      attackType - The attack's type.
      basePower - The attack's base power.
      attackCategory - The attack's attack category.
  • Method Details

    • ofMutable

      public Attack ofMutable()
    • getAttackName

      public String getAttackName()
      Gets the attack's English name.
      Returns:
      The attack's English name.
    • getAttackType

      public Element getAttackType()
      The attack's type.
    • getAttackCategory

      public AttackCategory getAttackCategory()
      The attack's category.
    • getBasePower

      public int getBasePower()
      The attack's base power.
    • getPPBase

      public int getPPBase()
      The attack's maximum PP without any boosts.
    • getPPMax

      public int getPPMax()
      The attack's maximum PP with PP Ups.
    • getAccuracy

      public int getAccuracy()
      The attack's base accuracy.
    • getMakesContact

      public boolean getMakesContact()
      Gets whether the attack makes contact.
      Returns:
      Whether the attack makes contact.
    • setMakesContact

      public void setMakesContact(boolean makesContact)
      Sets whether the attack makes contact.
    • getIgnoresAbilities

      public boolean getIgnoresAbilities()
      Gets whether the attack ignores ignorable abilities.
      Returns:
      Whether the attack ignores ignorable abilities.
    • getTargetingInfo

      public TargetingInfo getTargetingInfo()
      Details about the the attack's possible targets.
    • getFlags

      public MoveFlags getFlags()
      Details about the the attack. Mimics PokemonShowdown's flags
    • isAttack

      public boolean isAttack(Optional<ImmutableAttack> attack)
      Determines whether the attack's name matches the given name.
      Parameters:
      attack - The attack to check.
      Returns:
      Whether the attack matches the given attack.
    • isAttack

      public boolean isAttack(RegistryValue<ImmutableAttack> attack)
      Determines whether the attack's name matches the given name.
      Parameters:
      attack - The attack to check.
      Returns:
      Whether the attack matches the given attack.
    • isAttack

      public boolean isAttack(ImmutableAttack attack)
    • getPriority

      public int getPriority(PixelmonWrapper pixelmon)
      Gets the base priority of the attack.
      Returns:
      The base priority of the attack.
    • hasSecondaryEffect

      public boolean hasSecondaryEffect()
      Checks if the attack has a secondary effect.
      Returns:
      Whether the attack has a secondary effect.
    • hasEffect

      public <T extends EffectBase> boolean hasEffect(Class<T> clazz)
      Gets whether the attack has a specific type of EffectBase
      Parameters:
      clazz - - The class needed in the effect list
      Returns:
      - False if the effects do not contain an EffectBase of this type
    • getZMove

      public ZMove getZMove(Pokemon pokemon, boolean bypassItemRequirement)
    • getZMove

      public ZMove getZMove(PixelmonClientData pig, boolean bypassItemRequirement)
    • hasZMove

      public boolean hasZMove(Pokemon pokemon)
    • hasTag

      public boolean hasTag(String... tags)
    • is

      public boolean is(String... tags)
    • getJson

      public String getJson()
    • setJson

      public void setJson(String json)
    • getResourceLocation

      public net.minecraft.resources.ResourceLocation getResourceLocation()
    • setResourceLocation

      public void setResourceLocation(net.minecraft.resources.ResourceLocation resourceLocation)
    • getTranslationKey

      public String getTranslationKey()
      Gets the attack's unlocalized key.
      Specified by:
      getTranslationKey in interface ITranslatable
      Returns:
      The attack's translation key.
    • getDescriptionKey

      public String getDescriptionKey()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object