properly bounce multi targeted attacks
parent
9eec2c3e3a
commit
1e28f95453
|
|
@ -2414,8 +2414,13 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||||
if (isBounced) {
|
if (isBounced) {
|
||||||
this.scene.queueMessage(getPokemonMessage(targets[0], '\nbounced the move back!'));
|
this.scene.queueMessage(getPokemonMessage(targets[0], '\nbounced the move back!'));
|
||||||
const tempTargets = targets;
|
const tempTargets = targets;
|
||||||
targets = [user];
|
this.targets = getMoveTargets(tempTargets[0], this.move.moveId).targets;
|
||||||
this.targets = [user.getBattlerIndex()];
|
targets = [];
|
||||||
|
for (let index of this.targets){
|
||||||
|
const target = this.scene.getField()[index];
|
||||||
|
if (target)
|
||||||
|
targets.push(target);
|
||||||
|
}
|
||||||
user = tempTargets[0];
|
user = tempTargets[0];
|
||||||
if (!this.move.getMove().applyConditions(user, targets[0], this.move.getMove())) {
|
if (!this.move.getMove().applyConditions(user, targets[0], this.move.getMove())) {
|
||||||
this.scene.queueMessage(i18next.t('menu:attackFailed'));
|
this.scene.queueMessage(i18next.t('menu:attackFailed'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue