mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32: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();
|
user.updateInfo();
|
||||||
|
|
||||||
if (this.stats.length === 7) {
|
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) {
|
} else if (this.stats.length === 2) {
|
||||||
target.scene.queueMessage(i18next.t("moveTriggers:switchedTwoStatChanges", {
|
user.scene.queueMessage(i18next.t("moveTriggers:switchedTwoStatChanges", {
|
||||||
pokemonName: getPokemonNameWithAffix(user),
|
pokemonName: getPokemonNameWithAffix(user),
|
||||||
firstStat: i18next.t(getStatKey(this.stats[0])),
|
firstStat: i18next.t(getStatKey(this.stats[0])),
|
||||||
secondStat: i18next.t(getStatKey(this.stats[1]))
|
secondStat: i18next.t(getStatKey(this.stats[1]))
|
||||||
@ -5888,16 +5888,24 @@ export class SwapStatAttr extends MoveEffectAttr {
|
|||||||
* temporarily.
|
* temporarily.
|
||||||
* @param user the {@linkcode Pokemon} that used the move
|
* @param user the {@linkcode Pokemon} that used the move
|
||||||
* @param target the {@linkcode Pokemon} that the move was used on
|
* @param target the {@linkcode Pokemon} that the move was used on
|
||||||
* @param _move N/A
|
* @param move N/A
|
||||||
* @param _args N/A
|
* @param args N/A
|
||||||
* @returns true if attribute application succeeds
|
* @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 {
|
||||||
const temp = user.getStat(this.stat, false);
|
if (super.apply(user, target, move, args)) {
|
||||||
user.setStat(this.stat, target.getStat(this.stat, false), false);
|
const temp = user.getStat(this.stat, false);
|
||||||
target.setStat(this.stat, temp, 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ export const moveTriggers: SimpleTranslationEntries = {
|
|||||||
"absorbedElectricity": "{{pokemonName}} absorbed electricity!",
|
"absorbedElectricity": "{{pokemonName}} absorbed electricity!",
|
||||||
"switchedStatChanges": "{{pokemonName}} switched stat changes with the target!",
|
"switchedStatChanges": "{{pokemonName}} switched stat changes with the target!",
|
||||||
"switchedTwoStatChanges": "{{pokemonName}} switched all changes to its {{firstStat}}\nand {{secondStat}} with its 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!",
|
"goingAllOutForAttack": "{{pokemonName}} is going all out for this attack!",
|
||||||
"regainedHealth": "{{pokemonName}} regained\nhealth!",
|
"regainedHealth": "{{pokemonName}} regained\nhealth!",
|
||||||
"keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!",
|
"keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!",
|
||||||
|
Loading…
Reference in New Issue
Block a user