From 9258e973c013c3e629f511ecc6306c25d89e8cf6 Mon Sep 17 00:00:00 2001 From: schmidtc1 <62030095+schmidtc1@users.noreply.github.com> Date: Sun, 29 Dec 2024 10:04:34 -0500 Subject: [PATCH] Update src/field/pokemon.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/field/pokemon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 4a7a7d7f6ad..9dec69745be 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4807,7 +4807,7 @@ export class EnemyPokemon extends Pokemon { if (moveQueue.length !== 0) { const queuedMove = moveQueue[0]; if (queuedMove) { - const moveIndex = this.getMoveset().findIndex(m => m?.moveId === moveQueue[0].move); + const moveIndex = this.getMoveset().findIndex(m => m?.moveId === queuedMove.move); if ((moveIndex > -1 && this.getMoveset()[moveIndex]!.isUsable(this, queuedMove.ignorePP)) || queuedMove.virtual) { return queuedMove; } else {