mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +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;
|
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) {
|
if (asPhase) {
|
||||||
this.scene.unshiftPhase(new ObtainStatusEffectPhase(this.scene, this.getBattlerIndex(), effect, cureTurn, sourceText, sourcePokemon));
|
this.scene.unshiftPhase(new ObtainStatusEffectPhase(this.scene, this.getBattlerIndex(), effect, cureTurn, sourceText, sourcePokemon));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user