mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-18 21:39:28 +02:00
Update src/field/pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
313ce835ae
commit
9258e973c0
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user