Metronome doesn't select unimplemented moves
This commit is contained in:
parent
9ad932e018
commit
da492cfac7
|
@ -1951,7 +1951,7 @@ export class RandomMovesetMoveAttr extends OverrideMoveEffectAttr {
|
||||||
export class RandomMoveAttr extends OverrideMoveEffectAttr {
|
export class RandomMoveAttr extends OverrideMoveEffectAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
||||||
return new Promise(resolve => {
|
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 moveId = moveIds[user.randSeedInt(moveIds.length)];
|
||||||
|
|
||||||
const moveTargets = getMoveTargets(user, moveId);
|
const moveTargets = getMoveTargets(user, moveId);
|
||||||
|
|
Loading…
Reference in New Issue