Clear queues for testing

This commit is contained in:
Dean 2025-04-04 16:02:27 -07:00
parent 8c302de379
commit 47c6fbb33e
2 changed files with 8 additions and 0 deletions

View File

@ -2756,6 +2756,7 @@ export default class BattleScene extends SceneBase {
for (const queue of [this.phaseQueue, this.phaseQueuePrepend, this.conditionalQueue, this.nextCommandPhaseQueue]) {
queue.splice(0, queue.length);
}
this.dynamicPhaseQueues.forEach(queue => queue.clear());
this.currentPhase = null;
this.standbyPhase = null;
this.clearPhaseQueueSplice();

View File

@ -35,6 +35,13 @@ export abstract class PhasePriorityQueue {
public push(phase: Phase): void {
this.queue.push(phase);
}
/**
* Removes all phases from the queue
*/
public clear(): void {
this.queue.splice(0, this.queue.length);
}
}
/**