java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.attacks.specialAttacks.StatsEffectPost

public class StatsEffectPost extends EffectBase
An effect that lowers or raises the user's stats once for a multi-target attack.
  • Field Details

    • type

      public BattleStatsType type
      The stat affected by the effect.
    • amount

      public int amount
      The amount to change the stat by.
  • Constructor Details

    • StatsEffectPost

      public StatsEffectPost()
    • StatsEffectPost

      public StatsEffectPost(BattleStatsType type, int value)
      Initializes a stat effect.
      Parameters:
      type - The stat affected by the effect.
      value - The amount to raise or lower the stat by.
  • Method Details

    • 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.
    • isUser

      public boolean isUser()
      Description copied from class: EffectBase
      Determines whether the move only affects the user.
      Overrides:
      isUser in class EffectBase
      Returns:
      Whether the move only affects the user.
    • applyEffectAfterAllTargets

      public void applyEffectAfterAllTargets(PixelmonWrapper user)
      Executes the stat effect after all hits of the attack have been completed.
      Overrides:
      applyEffectAfterAllTargets in class EffectBase
      Parameters:
      user - The attack's user.
    • addStatChangeAnimation

      public static void addStatChangeAnimation(PixelmonWrapper user, PixelmonWrapper target, BattleStatsType stat, int stages)
    • getStatsType

      public BattleStatsType getStatsType()
      Returns the type of stat modification.
      Returns:
      The type of stat modification.
    • weightEffect

      public void weightEffect(PixelmonWrapper pw, MoveChoice userChoice, List<MoveChoice> userChoices, List<MoveChoice> bestUserChoices, List<MoveChoice> opponentChoices, List<MoveChoice> bestOpponentChoices)
      Description copied from class: EffectBase
      Determines a weight for the move that has this effect. Used for battle AI.
      Overrides:
      weightEffect in class EffectBase
      Parameters:
      pw - The Pokémon using the move.
      userChoice - The move with this effect.
      userChoices - All choices the Pokémon has for the turn.
      bestUserChoices - The best offensive choices the Pokémon has for the turn.
      opponentChoices - All choices the opponent has for the turn.
      bestOpponentChoices - The best choices the opponent has for the turn.