mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 14:52:19 +02:00
Mirror Move now respects the uncallable moves list
This commit is contained in:
parent
05fa3d79a0
commit
d6fd7c8af3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user