Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
schmidtc1 2024-12-29 10:04:34 -05:00 committed by GitHub
parent 313ce835ae
commit 9258e973c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {