diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 466b3804004..fe6661a7801 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -2124,7 +2124,10 @@ export class TarShotTag extends BattlerTag { pokemon.scene.queueMessage(i18next.t("battlerTags:tarShotOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); } } - +/** + * Tag that swaps the user's base ATK stat with its base DEF stat. + * @extends BattlerTag + */ export class PowerTrickTag extends BattlerTag { constructor(sourceMove: Moves, sourceId: number) { super(BattlerTagType.POWER_TRICK, BattlerTagLapseType.CUSTOM, 0, sourceMove, sourceId, true); @@ -2140,10 +2143,18 @@ export class PowerTrickTag extends BattlerTag { pokemon.scene.queueMessage(i18next.t("battlerTags:powerTrickActive", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); } + /** + * Removes the Power Trick tag and reverts any stat changes if the tag is already applied. + * @param {Pokemon} pokemon The {@linkcode Pokemon} that already has the Power Trick tag. + */ onOverlap(pokemon: Pokemon): void { pokemon.removeTag(this.tagType); } + /** + * Swaps the user's base ATK stat with its base DEF stat. + * @param {Pokemon} pokemon The {@linkcode Pokemon} whose stats will be swapped. + */ swapStat(pokemon: Pokemon): void { const temp = pokemon.getStat(Stat.ATK, false); pokemon.setStat(Stat.ATK, pokemon.getStat(Stat.DEF, false), false);