diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 3bd2f0e568d..dc954586629 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1998,16 +1998,24 @@ export class TarShotTag extends BattlerTag { * @param pokemon the pokemon to which the tag is added * @returns whether the tag is applied */ - canAdd(pokemon: Pokemon): boolean { + override canAdd(pokemon: Pokemon): boolean { return !pokemon.isTerastallized(); } - onAdd(pokemon: Pokemon): void { + override onAdd(pokemon: Pokemon): void { pokemon.scene.queueMessage(i18next.t("battlerTags:tarShotOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); } } - +/** + * Retrieves a BattlerTag based on the provided tag type, turn count, source move, and source ID. + * + * @param {BattlerTagType} tagType - The type of the BattlerTag. + * @param {number} turnCount - The turn count. + * @param {Moves} sourceMove - The source move. + * @param {number} sourceId - The source ID. + * @returns {BattlerTag} The corresponding BattlerTag object. + */ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, sourceMove: Moves, sourceId: number): BattlerTag { switch (tagType) { case BattlerTagType.RECHARGING: diff --git a/src/test/moves/tar_shot.test.ts b/src/test/moves/tar_shot.test.ts index 38869bfa118..15667122a37 100644 --- a/src/test/moves/tar_shot.test.ts +++ b/src/test/moves/tar_shot.test.ts @@ -1,8 +1,8 @@ -import { BattlerIndex } from "#app/battle.js"; -import { Type } from "#app/data/type.js"; -import { Moves } from "#app/enums/moves.js"; -import { Species } from "#app/enums/species.js"; -import { Stat } from "#app/enums/stat.js"; +import { BattlerIndex } from "#app/battle"; +import { Type } from "#app/data/type"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Stat } from "#app/enums/stat"; import { Abilities } from "#enums/abilities"; import GameManager from "#test/utils/gameManager"; import { SPLASH_ONLY } from "#test/utils/testUtils";