mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +02:00
Update speed order function
This commit is contained in:
parent
9b9cd3a522
commit
88e447fe7e
@ -12,8 +12,8 @@ export function applyInSpeedOrder<T extends Pokemon>(pokemonList: T[], callback:
|
||||
sortInSpeedOrder(pokemonList).forEach(pokemon => callback(pokemon));
|
||||
}
|
||||
|
||||
export function sortInSpeedOrder<T extends Pokemon | hasPokemon>(pokemonList: T[]): T[] {
|
||||
pokemonList = shuffle(pokemonList);
|
||||
export function sortInSpeedOrder<T extends Pokemon | hasPokemon>(pokemonList: T[], shuffleFirst = true): T[] {
|
||||
pokemonList = shuffleFirst ? shuffle(pokemonList) : pokemonList;
|
||||
sortBySpeed(pokemonList);
|
||||
return pokemonList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user