mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
[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:
parent
405b1d389d
commit
207808f37d
44
src/@types/damage-params.ts
Normal file
44
src/@types/damage-params.ts
Normal 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
Loading…
Reference in New Issue
Block a user