Skip to content

Commit

Permalink
[Bug] Fix multi-hit moves persisting after sleep/freeze (pagefaultgam…
Browse files Browse the repository at this point in the history
  • Loading branch information
innerthunder authored Jun 29, 2024
1 parent 6cba5ac commit d278df8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d278df8

Please sign in to comment.