[BUG] Fixes bug with Metronome freezing the game (#2819)
* Tests MovePhase with new PokemonMove instead of moveset search * Accounts for metronome call on charging moves * Update comment in ChargeAttr to be clearer
This commit is contained in:
parent
b215de1628
commit
4261ab37ab
|
@ -2280,7 +2280,11 @@ export class ChargeAttr extends OverrideMoveEffectAttr {
|
|||
user.pushMoveHistory({ move: move.id, targets: [ target.getBattlerIndex() ], result: MoveResult.OTHER });
|
||||
user.getMoveQueue().push({ move: move.id, targets: [ target.getBattlerIndex() ], ignorePP: true });
|
||||
if (this.sameTurn) {
|
||||
user.scene.pushMovePhase(new MovePhase(user.scene, user, [ target.getBattlerIndex() ], user.moveset.find(m => m.moveId === move.id), true), this.followUpPriority);
|
||||
let movesetMove = user.moveset.find(m => m.moveId === move.id);
|
||||
if (!movesetMove) { // account for any move that calls a ChargeAttr move when the ChargeAttr move does not exist in moveset
|
||||
movesetMove = new PokemonMove(move.id, 0, 0, true);
|
||||
}
|
||||
user.scene.pushMovePhase(new MovePhase(user.scene, user, [ target.getBattlerIndex() ], movesetMove, true), this.followUpPriority);
|
||||
}
|
||||
user.addTag(BattlerTagType.CHARGING, 1, move.id, user.id);
|
||||
resolve(true);
|
||||
|
|
Loading…
Reference in New Issue