From 6114bb216fced42d305f9dc1ea16702e802baf01 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:26:45 -0700 Subject: [PATCH] Apply suggestions from code review --- src/data/arena-tag.ts | 8 ++++---- src/data/battler-tags.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index a36cfcb1447..3b20a79ea03 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -77,16 +77,16 @@ export abstract class ArenaTag { * @param scene medium to retrieve the source Pokemon * @returns The source {@linkcode Pokemon} or `null` if none is found */ - retrieveSource(scene: BattleScene): Pokemon | null { + public retrieveSource(scene: BattleScene): Pokemon | null { return this.sourceId ? scene.getPokemonById(this.sourceId) : null; } /** * Helper function that retrieves the Pokemon affected - * @param {BattleScene} scene medium to retrieve the involved Pokemon + * @param scene - medium to retrieve the involved Pokemon * @returns list of PlayerPokemon or EnemyPokemon on the field */ - retrieveField(scene: BattleScene): Pokemon[] { + public retrieveField(scene: BattleScene): Pokemon[] { switch (this.side) { case ArenaTagSide.PLAYER: return scene.getPlayerField() ?? []; @@ -1015,7 +1015,7 @@ class ImprisonTag extends ArenaTrapTag { const source = this.retrieveSource(scene); if (source) { const party = this.retrieveField(scene); - party?.forEach((p: Pokemon ) => { + party?.forEach((p: Pokemon) => { if (p.isAllowedInBattle()) { p.addTag(BattlerTagType.IMPRISON, 1, Moves.IMPRISON, this.sourceId); } diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 1ed4e8598b5..f37ac77087a 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -97,7 +97,7 @@ export class BattlerTag { * @param scene medium to retrieve the source Pokemon * @returns The source {@linkcode Pokemon} or `null` if none is found */ - retrieveSource(scene: BattleScene): Pokemon | null { + public retrieveSource(scene: BattleScene): Pokemon | null { return this.sourceId ? scene.getPokemonById(this.sourceId) : null; } } @@ -146,9 +146,9 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag { /** * Gets whether this tag is restricting a move. * - * @param {Moves} move {@linkcode Moves} ID to check restriction for. - * @param {Pokemon} user {@linkcode Pokemon} the Pokemon involved - * @returns {boolean} `true` if the move is restricted by this tag, otherwise `false`. + * @param move - {@linkcode Moves} ID to check restriction for. + * @param user - The {@linkcode Pokemon} involved + * @returns `true` if the move is restricted by this tag, otherwise `false`. */ public abstract isMoveRestricted(move: Moves, user?: Pokemon): boolean;