Class BattlePriorityHelper

java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.BattlePriorityHelper

public class BattlePriorityHelper extends Object
Calculates turn order in battles.
  • Field Details

  • Constructor Details

    • BattlePriorityHelper

      public BattlePriorityHelper()
  • Method Details

    • checkMoveSpeed

      public static void checkMoveSpeed(BattleController bc)
      Calculates turn order.
      Parameters:
      bc - The battle to calculate turn order in.
    • recalculateMoveSpeed

      public static void recalculateMoveSpeed(BattleController bc, int turn)
      Recalculates turn order for Pokémon that have not yet moved in the turn.
      Parameters:
      bc - The battle to calculate turn order in.
      turn - The current turn in the battle turn.
    • getTurnOrder

      public static List<PixelmonWrapper> getTurnOrder(List<PixelmonWrapper> pokemon)
      Gets the turn order of Pokémon without accounting for priority.
      Parameters:
      pokemon - The Pokémon to get turn order for.
      Returns:
      The turn order of Pokémon without accounting for priority.
    • getRedirectOrder

      public static List<PixelmonWrapper> getRedirectOrder(List<PixelmonWrapper> pokemon)
      Gets the turn order of Pokémon without accounting for priority.
      Parameters:
      pokemon - The Pokémon to get turn order for.
      Returns:
      The turn order of Pokémon without accounting for priority.
    • getTargetOrder

      public static List<PixelmonWrapper> getTargetOrder(PixelmonWrapper user, List<PixelmonWrapper> pokemon)
      Gets the target order of Pokémon.
      Parameters:
      user - The Pokémon attacking.
      pokemon - The Pokémon to get target order for.
      Returns:
      The target order of Pokémon.
    • calculatePriority

      public static float calculatePriority(PixelmonWrapper p)
      Calculates the priority a Pokémon has for the turn.
      Parameters:
      p - The Pokémon to calculate priority for.
      Returns:
      The priority the Pokémon has for the turn.