diff --git a/src/data/ability.ts b/src/data/ability.ts index e6461582f..d2e9241b2 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2107,11 +2107,11 @@ export class PostTurnFormChangeAbAttr extends PostTurnAbAttr { } export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { - + applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise { let hadEffect: boolean = false; for(let oppo of pokemon.getOpponents()) { - if(oppo.status.effect == StatusEffect.SLEEP) { + if(oppo.status !== undefined && oppo.status.effect == StatusEffect.SLEEP) { oppo.damageAndUpdate(Math.ceil(oppo.getMaxHp() * (1 / 8)), HitResult.OTHER); pokemon.scene.queueMessage(getPokemonMessage(oppo, ' is tormeted!')); hadEffect = true;