From e1c999566e6bdbd0a570ff0621fe3a901d617d1e Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Sun, 13 Jul 2025 08:20:43 +0200 Subject: [PATCH] Update pokemon.ts documentation --- src/field/pokemon.ts | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 690ce75acbd..6243e0b150e 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -242,6 +242,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { public ivs: number[]; public nature: Nature; public moveset: PokemonMove[]; + /** + * This Pokemon's current {@link https://m.bulbapedia.bulbagarden.net/wiki/Status_condition#Non-volatile_status | non-volatile status condition}, + * or `null` if none exist. + * @todo Make private + */ public status: Status | null; public friendship: number; public metLevel: number; @@ -4889,33 +4894,38 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } /** - * Set this Pokemon's {@linkcode status | status condition} to the specified effect. - * Does **NOT** perform any feasibility checks whatsoever; must be checked by the caller. + * Set this Pokemon's {@linkcode status | non-volatile status condition} to the specified effect. * @param effect - The {@linkcode StatusEffect} to set + * @remarks + * ⚠️ This method does **not** check for feasibility; that is the responsibility of the caller. */ doSetStatus(effect: Exclude): void; /** - * Set this Pokemon's {@linkcode status | status condition} to the specified effect. + * Set this Pokemon's {@linkcode status | non-volatile status condition} to the specified effect. * Does **NOT** perform any feasibility checks whatsoever; must be checked by the caller. * @param effect - {@linkcode StatusEffect.SLEEP} * @param sleepTurnsRemaining - The number of turns to inflict sleep for; defaults to a random number between 2 and 4 + * @remarks + * ⚠️ This method does **not** check for feasibility; that is the responsibility of the caller. */ doSetStatus(effect: StatusEffect.SLEEP, sleepTurnsRemaining?: number): void; /** - * Set this Pokemon's {@linkcode status | status condition} to the specified effect. - * Does **NOT** perform any feasibility checks whatsoever; must be checked by the caller. + * Set this Pokemon's {@linkcode status | non-volatile status condition} to the specified effect. * @param effect - The {@linkcode StatusEffect} to set * @param sleepTurnsRemaining - The number of turns to inflict sleep for; defaults to a random number between 2 and 4 * and is unused for all non-sleep Statuses + * @remarks + * ⚠️ This method does **not** check for feasibility; that is the responsibility of the caller. */ doSetStatus(effect: StatusEffect, sleepTurnsRemaining?: number): void; /** - * Set this Pokemon's {@linkcode status | status condition} to the specified effect. - * Does **NOT** perform any feasibility checks whatsoever; must be checked by the caller. + * Set this Pokemon's {@linkcode status | non-volatile status condition} to the specified effect. * @param effect - The {@linkcode StatusEffect} to set * @param sleepTurnsRemaining - The number of turns to inflict sleep for; defaults to a random number between 2 and 4 * and is unused for all non-sleep Statuses - * @todo Make this private and change tests to use a field-based helper or similar + * @remarks + * ⚠️ This method does **not** check for feasibility; that is the responsibility of the caller. + * @todo Make this and all related fields private and change tests to use a field-based helper or similar */ doSetStatus( effect: StatusEffect,