Mirror Move now respects the uncallable moves list

This commit is contained in:
NightKev 2025-03-22 13:31:38 -07:00
parent 05fa3d79a0
commit d6fd7c8af3

View File

@ -6966,7 +6966,8 @@ export class CopyMoveAttr extends CallMoveAttr {
getCondition(): MoveConditionFunc {
return (user, target, move) => {
if (this.mirrorMove) {
return target.getMoveHistory().length !== 0;
const lastMove = target.getLastXMoves()[0]?.move;
return !!lastMove && !this.invalidMoves.has(lastMove);
} else {
const lastMove = globalScene.currentBattle.lastMove;
return lastMove !== undefined && !this.invalidMoves.has(lastMove);