mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
Add Move Effect Message to Speed Swap
This commit is contained in:
parent
e97e965085
commit
dc0f90d4d5
@ -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,17 +5888,25 @@ 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 {
|
||||
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);
|
||||
|
||||
user.scene.queueMessage(i18next.t("moveTriggers:swappedStat", {
|
||||
pokemonName: getPokemonNameWithAffix(user),
|
||||
stat: i18next.t(getStatKey(this.stat)),
|
||||
}));
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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!",
|
||||
|
Loading…
Reference in New Issue
Block a user