public class StatsEffectTeam extends StatsEffect
An effect that lowers or raises stats of an entire side of battle.
  • Constructor Details

    • StatsEffectTeam

      public StatsEffectTeam()
    • StatsEffectTeam

      public StatsEffectTeam(BattleStatsType type, int value, boolean isUser)
      Initializes a stat effect.
      Parameters:
      type - The stat affected by the effect.
      value - The amount to raise or lower the stat by.
      isUser - Whether the effect affects the move user's allies.
  • Method Details

    • applyStatEffect

      public AttackResult applyStatEffect(PixelmonWrapper user, PixelmonWrapper target, ImmutableAttack a)
      Executes the stat effect.
      Overrides:
      applyStatEffect in class StatsEffect
      Parameters:
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The result of the attack.
      Throws:
      Exception
    • addStatChangeAnimation

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

      public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
      Description copied from class: EffectBase
      Causes various effects during the move.
      Overrides:
      applyEffect in class StatsEffect
      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.
      Overrides:
      cantMiss in class StatsEffect
      Parameters:
      user - The move's user.
      Returns:
      Whether the move can't miss.
    • getStatsType

      public BattleStatsType getStatsType()
      Returns the type of stat modification.
      Overrides:
      getStatsType in class StatsEffect
      Returns:
      The type of stat modification.
    • getUser

      public boolean getUser()
      Returns whether the stat effect affects the user.
      Overrides:
      getUser in class StatsEffect
      Returns:
      Whether the stat effect affects the user.
    • 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 StatsEffect
      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.