mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +02:00
Fix postsummonphases being shuffled (need to handle speed ties differently here)
This commit is contained in:
parent
78f0b5d853
commit
9b9cd3a522
@ -1,6 +1,7 @@
|
||||
import { PostSummonActivateAbilityPhase } from "#app/phases/post-summon-activate-ability-phase";
|
||||
import type { PostSummonPhase } from "#app/phases/post-summon-phase";
|
||||
import { PokemonPhasePriorityQueue } from "#app/queues/pokemon-phase-priority-queue";
|
||||
import { sortInSpeedOrder } from "#app/utils/speed-order";
|
||||
|
||||
/**
|
||||
* Priority Queue for {@linkcode PostSummonPhase} and {@linkcode PostSummonActivateAbilityPhase}
|
||||
@ -10,7 +11,7 @@ import { PokemonPhasePriorityQueue } from "#app/queues/pokemon-phase-priority-qu
|
||||
|
||||
export class PostSummonPhasePriorityQueue extends PokemonPhasePriorityQueue<PostSummonPhase> {
|
||||
public override reorder(): void {
|
||||
super.reorder();
|
||||
this.queue = sortInSpeedOrder(this.queue, false);
|
||||
this.queue.sort((phaseA: PostSummonPhase, phaseB: PostSummonPhase) => {
|
||||
return phaseB.getPriority() - phaseA.getPriority();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user