[Docs] Cleanup docs in pokemon.ts (#6543)

* [Docs] Cleanup docs in pokemon.ts

* Apply suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>

* chore: apply biome

* revert changes to docstrings that will conflict
This commit is contained in:
Sirz Benjie 2025-09-20 17:15:57 -05:00 committed by GitHub
parent 405b1d389d
commit 207808f37d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 505 additions and 262 deletions

View File

@ -0,0 +1,44 @@
import type { MoveCategory } from "#enums/move-category";
import type { Pokemon } from "#field/pokemon";
import type { Move } from "#types/move-types";
/**
* Collection of types for methods like {@linkcode Pokemon#getBaseDamage} and {@linkcode Pokemon#getAttackDamage}.
* @module
*/
/** Base type for damage parameter methods, used for DRY */
export interface damageParams {
/** The attacking {@linkcode Pokemon} */
source: Pokemon;
/** The move used in the attack */
move: Move;
/** The move's {@linkcode MoveCategory} after variable-category effects are applied */
moveCategory: MoveCategory;
/** If `true`, ignores this Pokemon's defensive ability effects */
ignoreAbility?: boolean;
/** If `true`, ignores the attacking Pokemon's ability effects */
ignoreSourceAbility?: boolean;
/** If `true`, ignores the ally Pokemon's ability effects */
ignoreAllyAbility?: boolean;
/** If `true`, ignores the ability effects of the attacking pokemon's ally */
ignoreSourceAllyAbility?: boolean;
/** If `true`, calculates damage for a critical hit */
isCritical?: boolean;
/** If `true`, suppresses changes to game state during the calculation */
simulated?: boolean;
/** If defined, used in place of calculated effectiveness values */
effectiveness?: number;
}
/**
* Type for the parameters of {@linkcode Pokemon#getBaseDamage | getBaseDamage}
* @interface
*/
export type getBaseDamageParams = Omit<damageParams, "effectiveness">;
/**
* Type for the parameters of {@linkcode Pokemon#getAttackDamage | getAttackDamage}
* @interface
*/
export type getAttackDamageParams = Omit<damageParams, "moveCategory">;

File diff suppressed because it is too large Load Diff