From c1f63032602f4011231baec4e2b587d6524ece2d Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 27 Dec 2024 14:35:48 -0800 Subject: [PATCH] Fix ForceLastAttr to properly respect speed order --- src/data/move.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index cd40e7a6e21..0f7031d9d87 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -7670,7 +7670,7 @@ export class ForceLastAttr extends MoveEffectAttr { const targetMovePhase = target.scene.findPhase((phase) => phase.pokemon === target); if (targetMovePhase && target.scene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) { const prependPhase = target.scene.findPhase((phase) => [ MovePhase, MoveEndPhase ].every(cls => !(phase instanceof cls)) - || (phase instanceof MovePhase) && (phase.isForcedLast() && phase.pokemon.getEffectiveStat(Stat.SPD) < user.getEffectiveStat(Stat.SPD))); + || (phase instanceof MovePhase) && (phase.isForcedLast() && phase.pokemon.getEffectiveStat(Stat.SPD) < target.getEffectiveStat(Stat.SPD))); if (prependPhase) { target.scene.phaseQueue.splice(target.scene.phaseQueue.indexOf(prependPhase), 0, new MovePhase(target.scene, target, [ ...targetMovePhase.targets ], targetMovePhase.move, false, false, true)); }