diff --git a/src/data/move.ts b/src/data/move.ts index 2377c3200ff..53b14e2591c 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2831,9 +2831,9 @@ export class SwapStatStagesAttr extends MoveEffectAttr { user.updateInfo(); if (this.stats.length === 7) { - target.scene.queueMessage(i18next.t("moveTriggers:switchedStatChanges", { pokemonName: getPokemonNameWithAffix(user) })); + user.scene.queueMessage(i18next.t("moveTriggers:switchedStatChanges", { pokemonName: getPokemonNameWithAffix(user) })); } else if (this.stats.length === 2) { - target.scene.queueMessage(i18next.t("moveTriggers:switchedTwoStatChanges", { + user.scene.queueMessage(i18next.t("moveTriggers:switchedTwoStatChanges", { pokemonName: getPokemonNameWithAffix(user), firstStat: i18next.t(getStatKey(this.stats[0])), secondStat: i18next.t(getStatKey(this.stats[1])) @@ -5888,16 +5888,24 @@ export class SwapStatAttr extends MoveEffectAttr { * temporarily. * @param user the {@linkcode Pokemon} that used the move * @param target the {@linkcode Pokemon} that the move was used on - * @param _move N/A - * @param _args N/A + * @param move N/A + * @param args N/A * @returns true if attribute application succeeds */ - apply(user: Pokemon, target: Pokemon, _move: Move, _args: any[]): boolean { - const temp = user.getStat(this.stat, false); - user.setStat(this.stat, target.getStat(this.stat, false), false); - target.setStat(this.stat, temp, false); + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (super.apply(user, target, move, args)) { + const temp = user.getStat(this.stat, false); + user.setStat(this.stat, target.getStat(this.stat, false), false); + target.setStat(this.stat, temp, false); - return true; + user.scene.queueMessage(i18next.t("moveTriggers:swappedStat", { + pokemonName: getPokemonNameWithAffix(user), + stat: i18next.t(getStatKey(this.stat)), + })); + + return true; + } + return false; } } diff --git a/src/locales/en/move-trigger.ts b/src/locales/en/move-trigger.ts index fe46773970d..925d3f11d59 100644 --- a/src/locales/en/move-trigger.ts +++ b/src/locales/en/move-trigger.ts @@ -6,6 +6,7 @@ export const moveTriggers: SimpleTranslationEntries = { "absorbedElectricity": "{{pokemonName}} absorbed electricity!", "switchedStatChanges": "{{pokemonName}} switched stat changes with the target!", "switchedTwoStatChanges": "{{pokemonName}} switched all changes to its {{firstStat}}\nand {{secondStat}} with its target!", + "swappedStat": "{{pokemonName}} switched {{stat}} with its target!", "goingAllOutForAttack": "{{pokemonName}} is going all out for this attack!", "regainedHealth": "{{pokemonName}} regained\nhealth!", "keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!",