mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-15 03:49:33 +02:00
Fix merge issues
This commit is contained in:
parent
02828eb878
commit
dae3545482
@ -6491,10 +6491,10 @@ class CallMoveAttr extends OverrideMoveEffectAttr {
|
|||||||
? moveTargets.targets
|
? moveTargets.targets
|
||||||
: [ this.hasTarget ? target.getBattlerIndex() : moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ]; // account for Mirror Move having a target already
|
: [ this.hasTarget ? target.getBattlerIndex() : moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ]; // account for Mirror Move having a target already
|
||||||
user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true });
|
user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true });
|
||||||
user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, new PokemonMove(move.id, 0, 0, true), true, true));
|
globalScene.unshiftPhase(new MovePhase(user, targets, new PokemonMove(move.id, 0, 0, true), true, true));
|
||||||
|
|
||||||
await Promise.resolve(initMoveAnim(user.scene, move.id).then(() => {
|
await Promise.resolve(initMoveAnim(move.id).then(() => {
|
||||||
loadMoveAnimAssets(user.scene, [ move.id ], true);
|
loadMoveAnimAssets([ move.id ], true);
|
||||||
}));
|
}));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -6574,7 +6574,7 @@ export class RandomMovesetMoveAttr extends CallMoveAttr {
|
|||||||
// includeParty will be true for Assist, false for Sleep Talk
|
// includeParty will be true for Assist, false for Sleep Talk
|
||||||
let allies: Pokemon[];
|
let allies: Pokemon[];
|
||||||
if (this.includeParty) {
|
if (this.includeParty) {
|
||||||
allies = user.isPlayer() ? user.scene.getPlayerParty().filter(p => p !== user) : user.scene.getEnemyParty().filter(p => p !== user);
|
allies = user.isPlayer() ? globalScene.getPlayerParty().filter(p => p !== user) : globalScene.getEnemyParty().filter(p => p !== user);
|
||||||
} else {
|
} else {
|
||||||
allies = [ user ];
|
allies = [ user ];
|
||||||
}
|
}
|
||||||
@ -7025,7 +7025,7 @@ export class CopyMoveAttr extends CallMoveAttr {
|
|||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
||||||
this.hasTarget = this.mirrorMove;
|
this.hasTarget = this.mirrorMove;
|
||||||
const lastMove = this.mirrorMove ? target.getLastXMoves()[0].move : user.scene.currentBattle.lastMove;
|
const lastMove = this.mirrorMove ? target.getLastXMoves()[0].move : globalScene.currentBattle.lastMove;
|
||||||
return super.apply(user, target, allMoves[lastMove], args);
|
return super.apply(user, target, allMoves[lastMove], args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7034,7 +7034,7 @@ export class CopyMoveAttr extends CallMoveAttr {
|
|||||||
if (this.mirrorMove) {
|
if (this.mirrorMove) {
|
||||||
return target.getMoveHistory().length !== 0;
|
return target.getMoveHistory().length !== 0;
|
||||||
} else {
|
} else {
|
||||||
const lastMove = user.scene.currentBattle.lastMove;
|
const lastMove = globalScene.currentBattle.lastMove;
|
||||||
return lastMove !== undefined && !this.invalidMoves.includes(lastMove);
|
return lastMove !== undefined && !this.invalidMoves.includes(lastMove);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -323,7 +323,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
if (!allMoves[this.move.moveId].hasAttr(CopyMoveAttr)) {
|
if (!allMoves[this.move.moveId].hasAttr(CopyMoveAttr)) {
|
||||||
// The last move used is unaffected by moves that fail
|
// The last move used is unaffected by moves that fail
|
||||||
if (success) {
|
if (success) {
|
||||||
this.scene.currentBattle.lastMove = this.move.moveId;
|
globalScene.currentBattle.lastMove = this.move.moveId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user