diff --git a/src/data/ability.ts b/src/data/ability.ts index bea660b93db..58862100a14 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2106,8 +2106,18 @@ export class PostTurnFormChangeAbAttr extends PostTurnAbAttr { } } +/** + * Attribute used for abilities (Nightmare) that damages the opponents for being asleep + */ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { + /** + * Deals damage to all sleeping opponents equal to 1/8 of their max hp (min 1) + * @param {Pokemon} pokemon Pokemon that has this ability + * @param {boolean} passive N/A + * @param {any[]} args N/A + * @returns {boolean} true if any opponents are sleeping + */ applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise { let hadEffect: boolean = false; //cycle on each opponent