Added more docs to the class

pull/633/head
Sbug98 2024-05-13 18:22:01 +02:00
parent 1b2e39d0d2
commit 812b8ee71f
1 changed files with 10 additions and 0 deletions

View File

@ -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<boolean> {
let hadEffect: boolean = false;
//cycle on each opponent