mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Moves copied by Dancer should not consume PP
This commit is contained in:
parent
d61c8f2870
commit
b1b0ab5dc7
@ -3368,10 +3368,10 @@ export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr {
|
||||
// If the move is an AttackMove or a StatusMove the Dancer must replicate the move on the source of the Dance
|
||||
if (move.getMove() instanceof AttackMove || move.getMove() instanceof StatusMove) {
|
||||
const target = this.getTarget(dancer, source, targets);
|
||||
dancer.scene.unshiftPhase(new MovePhase(dancer.scene, dancer, target, move, true));
|
||||
dancer.scene.unshiftPhase(new MovePhase(dancer.scene, dancer, target, move, true, true));
|
||||
} else if (move.getMove() instanceof SelfStatusMove) {
|
||||
// If the move is a SelfStatusMove (ie. Swords Dance) the Dancer should replicate it on itself
|
||||
dancer.scene.unshiftPhase(new MovePhase(dancer.scene, dancer, [dancer.getBattlerIndex()], move, true));
|
||||
dancer.scene.unshiftPhase(new MovePhase(dancer.scene, dancer, [dancer.getBattlerIndex()], move, true, true));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -2680,8 +2680,8 @@ export class MovePhase extends BattlePhase {
|
||||
this.pokemon = pokemon;
|
||||
this.targets = targets;
|
||||
this.move = move;
|
||||
this.followUp = !!followUp;
|
||||
this.ignorePp = !!ignorePp;
|
||||
this.followUp = followUp ?? false;
|
||||
this.ignorePp = ignorePp ?? false;
|
||||
this.failed = false;
|
||||
this.cancelled = false;
|
||||
}
|
||||
@ -2836,7 +2836,7 @@ export class MovePhase extends BattlePhase {
|
||||
return this.end();
|
||||
}
|
||||
|
||||
if (!moveQueue.length || !moveQueue.shift()?.ignorePP) { // using .shift here clears out two turn moves once they've been used
|
||||
if ((!moveQueue.length || !moveQueue.shift()?.ignorePP) && !this.ignorePp) { // using .shift here clears out two turn moves once they've been used
|
||||
this.move.usePp(ppUsed);
|
||||
this.scene.eventTarget.dispatchEvent(new MoveUsedEvent(this.pokemon?.id, this.move.getMove(), this.move.ppUsed));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user