change target of phase also, check conditions using the bouncer.

pull/468/head
Reldnahc 2024-05-04 16:12:00 -05:00
parent bbbd55e265
commit 9eec2c3e3a
1 changed files with 2 additions and 1 deletions

View File

@ -2415,8 +2415,9 @@ export class MoveEffectPhase extends PokemonPhase {
this.scene.queueMessage(getPokemonMessage(targets[0], '\nbounced the move back!'));
const tempTargets = targets;
targets = [user];
this.targets = [user.getBattlerIndex()];
user = tempTargets[0];
if (!this.move.getMove().applyConditions(targets[0], targets[0], this.move.getMove())) {
if (!this.move.getMove().applyConditions(user, targets[0], this.move.getMove())) {
this.scene.queueMessage(i18next.t('menu:attackFailed'));
return this.end();
}