mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
the actual base stats are swapped by Power Trick
This commit is contained in:
parent
86d3a4179c
commit
8becfdfc4e
@ -1,7 +1,7 @@
|
||||
import { ChargeAnim, MoveChargeAnim, initMoveAnim, loadMoveAnimAssets } from "./battle-anims";
|
||||
import { BattleEndPhase, MoveEffectPhase, MovePhase, NewBattlePhase, PartyStatusCurePhase, PokemonHealPhase, StatChangePhase, SwitchSummonPhase } from "../phases";
|
||||
import { BattleStat, getBattleStatName } from "./battle-stat";
|
||||
import { EncoreTag, PowerTrickTag, SemiInvulnerableTag } from "./battler-tags";
|
||||
import { EncoreTag, SemiInvulnerableTag } from "./battler-tags";
|
||||
import { getPokemonMessage, getPokemonNameWithAffix } from "../messages";
|
||||
import Pokemon, { AttackMoveResult, EnemyPokemon, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../field/pokemon";
|
||||
import { StatusEffect, getStatusEffectHealText, isNonVolatileStatusEffect, getNonVolatileStatusEffects} from "./status-effect";
|
||||
@ -4173,7 +4173,7 @@ export class FaintCountdownAttr extends AddBattlerTagAttr {
|
||||
|
||||
/**
|
||||
* Swap the Pokémon's base Attack stat with its base Defense stat.
|
||||
* Pokémon with the Power Trick Tag will have their altered base stat values displayed.
|
||||
* Pokémon with the Power Trick Tag will have their altered base stat values.
|
||||
* @extends AddBattlerTagAttr
|
||||
*/
|
||||
export class PowerTrickAttr extends AddBattlerTagAttr {
|
||||
@ -4195,12 +4195,14 @@ export class PowerTrickAttr extends AddBattlerTagAttr {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (user.findTag(t => t instanceof PowerTrickTag)) {
|
||||
if (user.getTag(BattlerTagType.POWER_TRICK)) {
|
||||
user.removeTag(BattlerTagType.POWER_TRICK);
|
||||
} else {
|
||||
super.apply(user, target, move, args);
|
||||
}
|
||||
|
||||
[user.stats[Stat.ATK], user.stats[Stat.DEF]] = [user.stats[Stat.DEF], user.stats[Stat.ATK]];
|
||||
|
||||
user.scene.queueMessage(i18next.t("battle:battlerTagsPowerTrickApply", { pokemonNameWithAffix: getPokemonNameWithAffix(user) }));
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user