From 5c933441f98477441c4dc07057f7c5911c8b00da Mon Sep 17 00:00:00 2001 From: frutescens Date: Fri, 11 Oct 2024 14:16:33 -0700 Subject: [PATCH] battler tags --- src/data/battler-tags.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 31791702e99..1ed4e8598b5 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -91,6 +91,15 @@ export class BattlerTag { this.sourceMove = source.sourceMove; this.sourceId = source.sourceId; } + + /** + * Helper function that retrieves the source Pokemon object + * @param scene medium to retrieve the source Pokemon + * @returns The source {@linkcode Pokemon} or `null` if none is found + */ + retrieveSource(scene: BattleScene): Pokemon | null { + return this.sourceId ? scene.getPokemonById(this.sourceId) : null; + } } export interface WeatherBattlerTag { @@ -2649,15 +2658,6 @@ export class ImprisonTag extends MoveRestrictionBattlerTag { override interruptedText(pokemon: Pokemon, move: Moves): string { return i18next.t("battle:moveDisabledImprison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: allMoves[move].name }); } - - /** - * Helper function that retrieves the source Pokemon object - * @param scene medium to retrieve the source Pokemon - * @returns The source {@linkcode Pokemon} or `null` if none is found - */ - private retrieveSource(scene: BattleScene): Pokemon | null { - return this.sourceId ? scene.getPokemonById(this.sourceId) : null; - } } /**