implement PowerTrickAttr

This commit is contained in:
cadi 2024-06-27 18:58:17 +09:00
parent a3cae3832c
commit b387f3c401
10 changed files with 48 additions and 10 deletions

View File

@ -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 * Attribute used when a move hits a {@linkcode BattlerTagType} for double damage
* @extends MoveAttr * @extends MoveAttr
@ -6680,7 +6709,7 @@ export function initMoves() {
.attr(OpponentHighHpPowerAttr) .attr(OpponentHighHpPowerAttr)
.makesContact(), .makesContact(),
new SelfStatusMove(Moves.POWER_TRICK, Type.PSYCHIC, -1, 10, -1, 0, 4) 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) new StatusMove(Moves.GASTRO_ACID, Type.POISON, 100, 10, -1, 0, 4)
.attr(SuppressAbilitiesAttr), .attr(SuppressAbilitiesAttr),
new StatusMove(Moves.LUCKY_CHANT, Type.NORMAL, -1, 30, -1, 0, 4) new StatusMove(Moves.LUCKY_CHANT, Type.NORMAL, -1, 30, -1, 0, 4)

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} wurde eingepökelt!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} wurde eingepökelt!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} wurde durch {{moveName}} verletzt!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} wurde durch {{moveName}} verletzt!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} nimmt einen Teil seiner KP und legt einen Fluch auf {{pokemonName}}!", "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; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} is being salt cured!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} is being salt cured!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!", "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; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} is being salt cured!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} is being salt cured!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!", "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; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}}\nest couvert de sel !", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}}\nest couvert de sel !",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} est blessé\npar la capacité {{moveName}} !", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} est blessé\npar la capacité {{moveName}} !",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} sacrifie des PV\net lance une malédiction sur {{pokemonName}} !", "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; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} è stato messo sotto sale!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} è stato messo sotto sale!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} viene colpito da {{moveName}}!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} viene colpito da {{moveName}}!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} ha sacrificato metà dei suoi PS per\nlanciare una maledizione su {{pokemonName}}!", "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; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}}[[는]]\n소금에 절여졌다!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}}[[는]]\n소금에 절여졌다!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}}[[는]] 소금절이의\n데미지를 입고 있다.", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}}[[는]] 소금절이의\n데미지를 입고 있다.",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}[[는]]\n자신의 체력을 깎아서\n{{pokemonName}}에게 저주를 걸었다!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}[[는]]\n자신의 체력을 깎아서\n{{pokemonName}}에게 저주를 걸었다!",
"battlerTagsCursedLapse": "{{pokemonNameWithAffix}}[[는]]\n저주받고 있다!" "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}[[는]]\n저주받고 있다!",
"battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!"
} as const; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} está sendo curado com sal!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} está sendo curado com sal!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} foi ferido pelo {{moveName}}!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} foi ferido pelo {{moveName}}!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!", "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; } as const;

View File

@ -130,5 +130,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了盐腌状态!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了盐腌状态!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的伤害!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的伤害!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}削减了自己的体力,并诅咒了{{pokemonName}}", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}削减了自己的体力,并诅咒了{{pokemonName}}",
"battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到诅咒!" "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到诅咒!",
"battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!"
} as const; } as const;

View File

@ -127,5 +127,6 @@ export const battle: SimpleTranslationEntries = {
"battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了鹽腌狀態!", "battlerTagsSaltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了鹽腌狀態!",
"battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的傷害!", "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的傷害!",
"battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}削減了自己的體力,並詛咒了{{pokemonName}}", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}}削減了自己的體力,並詛咒了{{pokemonName}}",
"battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!" "battlerTagsCursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!",
"battlerTagsPowerTrickApply": "{{pokemonNameWithAffix}} switched its Attack and Defense!"
} as const; } as const;