mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
Fix hanging when move has no effect
This commit is contained in:
parent
c1e048e9af
commit
77b3f136dd
@ -907,8 +907,8 @@ abstract class MoveEffectPhase extends PokemonPhase {
|
|||||||
// Charge attribute with charge effect takes all effect attributes and applies them to charge stage, so ignore them if this is present
|
// Charge attribute with charge effect takes all effect attributes and applies them to charge stage, so ignore them if this is present
|
||||||
if (!isProtected && target.hp && !this.move.getMove().getAttrs(ChargeAttr).filter(ca => (ca as ChargeAttr).chargeEffect).length)
|
if (!isProtected && target.hp && !this.move.getMove().getAttrs(ChargeAttr).filter(ca => (ca as ChargeAttr).chargeEffect).length)
|
||||||
applyMoveAttrs(MoveHitEffectAttr, user, target, this.move.getMove());
|
applyMoveAttrs(MoveHitEffectAttr, user, target, this.move.getMove());
|
||||||
this.end();
|
|
||||||
}
|
}
|
||||||
|
this.end();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -791,7 +791,7 @@ export default class BattleScene extends Phaser.Scene {
|
|||||||
if (player === undefined)
|
if (player === undefined)
|
||||||
player = true;
|
player = true;
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const modifiers = player ? this.modifiers : this.enemyModifiers;
|
const modifiers = player ? this.modifiers : this.enemyModifiers as PersistentModifier[];
|
||||||
for (let modifier of modifiers) {
|
for (let modifier of modifiers) {
|
||||||
if (modifier instanceof PersistentModifier)
|
if (modifier instanceof PersistentModifier)
|
||||||
(modifier as PersistentModifier).virtualStackCount = 0;
|
(modifier as PersistentModifier).virtualStackCount = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user