Make sure phases occur in the correct order

This commit is contained in:
NightKev 2024-09-07 00:52:09 -07:00
parent 5b8abfd707
commit 6bc489de72

View File

@ -6234,7 +6234,7 @@ export class AfterYouAttr extends MoveEffectAttr {
const nextAttackPhase: MovePhase = target.scene.findPhase((phase: MovePhase) => phase.pokemon === target) as MovePhase;
if (target.scene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) {
target.scene.unshiftPhase(new MovePhase(target.scene, target, [...nextAttackPhase.targets], nextAttackPhase.move));
target.scene.prependToPhase(new MovePhase(target.scene, target, [...nextAttackPhase.targets], nextAttackPhase.move), MovePhase);
}
return true;