Class SpeedPriorityComparator

java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.SpeedComparator
com.pixelmonmod.pixelmon.battles.controller.SpeedPriorityComparator
All Implemented Interfaces:
Comparator<PixelmonWrapper>

public class SpeedPriorityComparator extends SpeedComparator
Compares Pokémon by move priority and battle speed.
  • Constructor Details

    • SpeedPriorityComparator

      public SpeedPriorityComparator()
  • Method Details

    • doesGoFirst

      protected boolean doesGoFirst(PixelmonWrapper p, PixelmonWrapper foe)
      Description copied from class: SpeedComparator
      Calculates whether one Pokémon moves before another.
      Overrides:
      doesGoFirst in class SpeedComparator
      Parameters:
      p - The Pokémon to check for moving first.
      foe - The Pokémon opposing p.
      Returns:
      Whether p moves first.
    • doesModifiedOrderGoFirst

      protected boolean doesModifiedOrderGoFirst(PixelmonWrapper p, PixelmonWrapper foe)
      Calculates whether one Pokémon moves before another based on individual status.
      Parameters:
      p - The Pokémon to check for moving first.
      foe - The Pokémon opposing p.
      Returns:
      Whether p moves first.