Class ImmutableAttack
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.ImmutableAttack
- All Implemented Interfaces:
ITranslatable
Info and base stats of an attack.
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionImmutableAttack
(Element attackType, int basePower, AttackCategory attackCategory) Initializes a temporary base attack for damage calculation only. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
The attack's base accuracy.The attack's category.Gets the attack's English name.The attack's type.int
The attack's base power.getFlags()
Details about the the attack.boolean
Gets whether the attack ignores ignorable abilities.getJson()
boolean
Gets whether the attack makes contact.int
The attack's maximum PP without any boosts.int
getPPMax()
The attack's maximum PP with PP Ups.int
getPriority
(PixelmonWrapper pixelmon) Gets the base priority of the attack.net.minecraft.resources.ResourceLocation
Details about the the attack's possible targets.Gets the attack's unlocalized key.getZMove
(PixelmonClientData pig, boolean bypassItemRequirement) <T extends EffectBase>
booleanGets whether the attack has a specific type of EffectBaseint
hashCode()
boolean
Checks if the attack has a secondary effect.boolean
boolean
boolean
boolean
isAttack
(RegistryValue<ImmutableAttack> attack) Determines whether the attack's name matches the given name.boolean
isAttack
(ImmutableAttack attack) boolean
isAttack
(Optional<ImmutableAttack> attack) Determines whether the attack's name matches the given name.void
void
setMakesContact
(boolean makesContact) Sets whether the attack makes contact.void
setResourceLocation
(net.minecraft.resources.ResourceLocation resourceLocation) boolean
Convenience method checking if attack targets using the "Many Others" range.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName, getTranslatedName
-
Field Details
-
effects
-
animations
-
z
-
-
Constructor Details
-
ImmutableAttack
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
-
getAttackName
Gets the attack's English name.- Returns:
- The attack's English name.
-
getAttackType
The attack's type. -
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
Details about the the attack's possible targets. -
targetsAllAdjacentFoes
public boolean targetsAllAdjacentFoes()Convenience method checking if attack targets using the "Many Others" range. -
getFlags
Details about the the attack. Mimics PokemonShowdown's flags -
isAttack
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
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
-
getPriority
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
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
-
getZMove
-
hasZMove
-
hasTag
-
is
-
getJson
-
setJson
-
getResourceLocation
public net.minecraft.resources.ResourceLocation getResourceLocation() -
setResourceLocation
public void setResourceLocation(net.minecraft.resources.ResourceLocation resourceLocation) -
getTranslationKey
Gets the attack's unlocalized key.- Specified by:
getTranslationKey
in interfaceITranslatable
- Returns:
- The attack's translation key.
-
getDescriptionKey
-
equals
-
toString
-
hashCode
public int hashCode()
-