mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42:18 +02:00
Make sure phases occur in the correct order
This commit is contained in:
parent
5b8abfd707
commit
6bc489de72
@ -6234,7 +6234,7 @@ export class AfterYouAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
const nextAttackPhase: MovePhase = target.scene.findPhase((phase: MovePhase) => phase.pokemon === target) as MovePhase;
|
const nextAttackPhase: MovePhase = target.scene.findPhase((phase: MovePhase) => phase.pokemon === target) as MovePhase;
|
||||||
if (target.scene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) {
|
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;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user