Class SpeedPriorityComparator
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.SpeedComparator
com.pixelmonmod.pixelmon.battles.controller.SpeedPriorityComparator
- All Implemented Interfaces:
Comparator<PixelmonWrapper>
Compares Pokémon by move priority and battle speed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Calculates whether one Pokémon moves before another.protected boolean
Calculates whether one Pokémon moves before another based on individual status.Methods inherited from class com.pixelmonmod.pixelmon.battles.controller.SpeedComparator
compare
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
SpeedPriorityComparator
public SpeedPriorityComparator()
-
-
Method Details
-
doesGoFirst
Description copied from class:SpeedComparator
Calculates whether one Pokémon moves before another.- Overrides:
doesGoFirst
in classSpeedComparator
- Parameters:
p
- The Pokémon to check for moving first.foe
- The Pokémon opposing p.- Returns:
- Whether p moves first.
-
doesModifiedOrderGoFirst
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.
-