Encore: End if the target no longer knows the move (#9898)

This commit is contained in:
pyuk-bot 2023-11-15 19:55:03 -06:00 committed by GitHub
parent 8e47521d77
commit f1a8a86e57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4746,7 +4746,7 @@ export const Moves: {[moveid: string]: MoveData} = {
},
onResidualOrder: 16,
onResidual(target) {
if (target.moves.includes(this.effectState.move) &&
if (!target.moves.includes(this.effectState.move) ||
target.moveSlots[target.moves.indexOf(this.effectState.move)].pp <= 0) {
// early termination if you run out of PP
target.removeVolatile('encore');