mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-20 16:55:22 +00:00
[Bug] Fix multi-hit moves persisting after sleep/freeze (#2712)
This commit is contained in:
parent
6cba5acfd0
commit
d278df8fef
@ -2545,6 +2545,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this Pokemon falls asleep or freezes in the middle of a multi-hit attack,
|
||||
* cancel the attack's subsequent hits.
|
||||
*/
|
||||
if (effect === StatusEffect.SLEEP || effect === StatusEffect.FREEZE) {
|
||||
this.stopMultiHit();
|
||||
}
|
||||
|
||||
if (asPhase) {
|
||||
this.scene.unshiftPhase(new ObtainStatusEffectPhase(this.scene, this.getBattlerIndex(), effect, cureTurn, sourceText, sourcePokemon));
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user