Class MultiTurnSpecialAttackBase

java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.attacks.specialAttacks.multiTurn.MultiTurnSpecialAttackBase
Direct Known Subclasses:
Bide, MultiTurnCharge, PetalDance, Rollout, SkyDrop, Uproar

public abstract class MultiTurnSpecialAttackBase extends EffectBase
Base class for multi-turn moves.
  • Constructor Details

    • MultiTurnSpecialAttackBase

      public MultiTurnSpecialAttackBase()
      Initializes the multi-turn effect.
  • Method Details

    • getTurnCount

      public int getTurnCount(PixelmonWrapper user)
      Gets the turn count for the user's multi-turn move.
      Parameters:
      user - The move's user.
      Returns:
      The turn count.
    • decrementTurnCount

      public void decrementTurnCount(PixelmonWrapper user)
      Decrements the move's turn count by 1.
      Parameters:
      user - The move's user.
    • setTurnCount

      public void setTurnCount(PixelmonWrapper user, int value)
      Sets the move's turn count.
      Parameters:
      user - The move's user.
      value - The new turn count.
    • doesPersist

      public boolean doesPersist(PixelmonWrapper user)
      Description copied from class: EffectBase
      Returns whether the move lasts multiple turns.
      Overrides:
      doesPersist in class EffectBase
      Parameters:
      user - The move's user.
      Returns:
      Whether the move lasts multiple turns.
    • setPersists

      protected void setPersists(PixelmonWrapper user, boolean value)
      Sets whether the move will continue next turn.
      Parameters:
      user - The move's user.
      value - Whether the move will continue next turn.
    • applyEffectDuring

      public AttackResult applyEffectDuring(PixelmonWrapper user, PixelmonWrapper target)
      Triggers before the move hits the target.
      Parameters:
      user - The move's user.
      target - The move's target.
      Returns:
      The result of them move.
      Throws:
      Exception
    • applyEffect

      public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
      Description copied from class: EffectBase
      Causes various effects during the move.
      Specified by:
      applyEffect in class EffectBase
      Parameters:
      user - The move's user.
      target - The move's target.
    • cantMiss

      public boolean cantMiss(PixelmonWrapper user)
      Description copied from class: EffectBase
      Determines whether a move cannot miss.
      Specified by:
      cantMiss in class EffectBase
      Parameters:
      user - The move's user.
      Returns:
      Whether the move can't miss.
    • applyMissEffect

      public void applyMissEffect(PixelmonWrapper user, PixelmonWrapper target)
      Description copied from class: EffectBase
      Triggers when the move misses.
      Overrides:
      applyMissEffect in class EffectBase
      Parameters:
      user - The move's user.
      target - The move's target.
    • ignoresType

      public boolean ignoresType(PixelmonWrapper user)
      Returns whether the move ignores type immunities.
      Parameters:
      user - The move's user
      Returns:
      Whether the move ignores type immunities
    • removeEffect

      public void removeEffect(PixelmonWrapper user, PixelmonWrapper target)
      Ends the multi-turn move.
      Parameters:
      user - The move's user
      target - The move's target
    • isCharging

      public boolean isCharging(PixelmonWrapper user, PixelmonWrapper target)
      Returns whether the multi-turn move is in a charging turn.
      Parameters:
      user - The move's user
      target - The move's target
      Returns:
      Whether the multi-turn move is in a charging turn
    • shouldNotLosePP

      public boolean shouldNotLosePP(PixelmonWrapper user)
      Returns whether the move should not have PP deducted during the turn.
      Parameters:
      user - The move's user.
      Returns:
      True if the move should not have PP deducted during the turn