diff --git a/src/data/move.ts b/src/data/move.ts index 6a48e588827..d74feebf8ec 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4161,6 +4161,35 @@ export class FaintCountdownAttr extends AddBattlerTagAttr { } } +/** + * battle tag to exchange pokemon's raw attack stat and raw defense stat + * @extends AddBattlerTagAttr + */ +export class PowerTrickAttr extends AddBattlerTagAttr { + constructor() { + super(BattlerTagType.POWER_TRICK,true); + } + + /** + * add battler tag to swap attack stat and defense stat. + * remove battler tag to reset stat change + * @param user {@linkcode Pokemon} Pokemon that used the move + * @param target {@linkcode Pokemon} N/A + * @param move {@linkcode Move} N/A + * @param args N/A + * @returns true if the function succeeds + */ + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (!super.apply(user, target, move, args)) { + user.removeTag(BattlerTagType.POWER_TRICK); + } + + user.scene.queueMessage(i18next.t("battle:battlerTagsPowerTrickApply", { pokemonNameWithAffix: getPokemonNameWithAffix(user) })); + + return true; + } +} + /** * Attribute used when a move hits a {@linkcode BattlerTagType} for double damage * @extends MoveAttr @@ -6680,7 +6709,7 @@ export function initMoves() { .attr(OpponentHighHpPowerAttr) .makesContact(), new SelfStatusMove(Moves.POWER_TRICK, Type.PSYCHIC, -1, 10, -1, 0, 4) - .unimplemented(), + .attr(PowerTrickAttr), new StatusMove(Moves.GASTRO_ACID, Type.POISON, 100, 10, -1, 0, 4) .attr(SuppressAbilitiesAttr), new StatusMove(Moves.LUCKY_CHANT, Type.NORMAL, -1, 30, -1, 0, 4) diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index f3f1261d799..720c4b333e8 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} wurde eingepökelt!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} wurde durch {{moveName}} verletzt!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} nimmt einen Teil seiner KP und legt einen Fluch auf {{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} wurde durch den Fluch verletzt!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} wurde durch den Fluch verletzt!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 23a1ff3cee0..356d26b0628 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} is being salt cured!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index 16cddaceb83..d10059c031d 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} is being salt cured!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 94eab760857..62c6cf73ea1 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}}\nest couvert de sel !", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} est blessé\npar la capacité {{moveName}} !", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} sacrifie des PV\net lance une malédiction sur {{pokemonName}} !", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} est touché par la malédiction !" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} est touché par la malédiction !", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 901d39cce51..473558ee698 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} è stato messo sotto sale!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} viene colpito da {{moveName}}!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} ha sacrificato metà dei suoi PS per\nlanciare una maledizione su {{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} subisce la maledizione!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} subisce la maledizione!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index a1517402107..ed58a45c67e 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}}[[는]]\n소금에 절여졌다!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}}[[는]] 소금절이의\n데미지를 입고 있다.", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}[[는]]\n자신의 체력을 깎아서\n{{pokemonName}}에게 저주를 걸었다!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}[[는]]\n저주받고 있다!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}[[는]]\n저주받고 있다!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index 2e88e5445de..399fd510416 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} está sendo curado com sal!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} foi ferido pelo {{moveName}}!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index 196ad14221b..c75753ca383 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了盐腌状态!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的伤害!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}削减了自己的体力,并诅咒了{{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到诅咒!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到诅咒!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const; diff --git a/src/locales/zh_TW/battle.ts b/src/locales/zh_TW/battle.ts index 50cf1fa8b9c..b9bdc09a129 100644 --- a/src/locales/zh_TW/battle.ts +++ b/src/locales/zh_TW/battle.ts @@ -127,5 +127,6 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了鹽腌狀態!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的傷害!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}削減了自己的體力,並詛咒了{{pokemonName}}!", - "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!" + "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!", + "battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!" } as const;