Metronome doesn't select unimplemented moves

This commit is contained in:
Flashfyre committed 2024-03-07 20:13:31 -05:00
1 parent 9ad932e018
commit da492cfac7
1 file changed
+1 -1
+1 -1
View File
@@ -1951,7 +1951,7 @@ export class RandomMovesetMoveAttr extends OverrideMoveEffectAttr {
export class RandomMoveAttr extends OverrideMoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
return new Promise(resolve => {
const moveIds = Utils.getEnumValues(Moves).filter(m => !allMoves[m].hasFlag(MoveFlags.IGNORE_VIRTUAL));
const moveIds = Utils.getEnumValues(Moves).filter(m => !allMoves[m].hasFlag(MoveFlags.IGNORE_VIRTUAL) && !allMoves[m].name.endsWith(' (N)'));
const moveId = moveIds[user.randSeedInt(moveIds.length)];
const moveTargets = getMoveTargets(user, moveId);