From 812b8ee71f9664866b4bf335143cb660d23be8f1 Mon Sep 17 00:00:00 2001 From: Sbug98 Date: Mon, 13 May 2024 18:22:01 +0200 Subject: [PATCH] Added more docs to the class --- src/data/ability.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) 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