fixes targeting
parent
669bc367e5
commit
be9d07ab1a
|
@ -2790,7 +2790,7 @@ export class NaturePowerAttr extends OverrideMoveEffectAttr {
|
||||||
moveId = Moves.ICE_BEAM;
|
moveId = Moves.ICE_BEAM;
|
||||||
break;
|
break;
|
||||||
case Biome.VOLCANO:
|
case Biome.VOLCANO:
|
||||||
moveId = Moves.LAVA_PLUME;
|
moveId = Moves.FLAMETHROWER;
|
||||||
break;
|
break;
|
||||||
case Biome.GRAVEYARD
|
case Biome.GRAVEYARD
|
||||||
|| Biome.RUINS
|
|| Biome.RUINS
|
||||||
|
@ -2828,18 +2828,8 @@ export class NaturePowerAttr extends OverrideMoveEffectAttr {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const moveTargets = getMoveTargets(user, moveId);
|
user.getMoveQueue().push({ move: moveId, targets: [target.getBattlerIndex()], ignorePP: true });
|
||||||
if (!moveTargets.targets.length) {
|
user.scene.unshiftPhase(new MovePhase(user.scene, user, [target.getBattlerIndex()], new PokemonMove(moveId, 0, 0, true), true));
|
||||||
resolve(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const targets = moveTargets.multiple || moveTargets.targets.length === 1
|
|
||||||
? moveTargets.targets
|
|
||||||
: moveTargets.targets.indexOf(target.getBattlerIndex()) > -1
|
|
||||||
? [ target.getBattlerIndex() ]
|
|
||||||
: [ moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ];
|
|
||||||
user.getMoveQueue().push({ move: moveId, targets: targets, ignorePP: true });
|
|
||||||
user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, new PokemonMove(moveId, 0, 0, true), true));
|
|
||||||
initMoveAnim(moveId).then(() => {
|
initMoveAnim(moveId).then(() => {
|
||||||
loadMoveAnimAssets(user.scene, [ moveId ], true)
|
loadMoveAnimAssets(user.scene, [ moveId ], true)
|
||||||
.then(() => resolve(true));
|
.then(() => resolve(true));
|
||||||
|
|
Loading…
Reference in New Issue