simplefied test

This commit is contained in:
cadi 2024-09-13 21:58:36 +09:00
parent 16a71c2fd4
commit b68ed1b763
2 changed files with 9 additions and 9 deletions

View File

@ -2210,6 +2210,7 @@ export class TarShotTag extends BattlerTag {
pokemon.scene.queueMessage(i18next.t("battlerTags:tarShotOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); pokemon.scene.queueMessage(i18next.t("battlerTags:tarShotOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
} }
} }
/** /**
* Tag that swaps the user's base ATK stat with its base DEF stat. * Tag that swaps the user's base ATK stat with its base DEF stat.
* @extends BattlerTag * @extends BattlerTag

View File

@ -75,21 +75,20 @@ describe("Moves - Power Trick", () => {
await game.classicMode.startBattle([Species.SHUCKLE, Species.SHUCKLE]); await game.classicMode.startBattle([Species.SHUCKLE, Species.SHUCKLE]);
await game.override.moveset([Moves.POWER_TRICK, Moves.BATON_PASS]); await game.override.moveset([Moves.POWER_TRICK, Moves.BATON_PASS]);
game.move.select(Moves.POWER_TRICK); const player = game.scene.getPlayerPokemon()!;
player.addTag(BattlerTagType.POWER_TRICK);
await game.phaseInterceptor.to(TurnEndPhase);
game.move.select(Moves.BATON_PASS); game.move.select(Moves.BATON_PASS);
game.doSelectPartyPokemon(1); game.doSelectPartyPokemon(1);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
const player = game.scene.getPlayerPokemon()!; const switchedPlayer = game.scene.getPlayerPokemon()!;
const baseATK = player.getStat(Stat.ATK); const baseATK = switchedPlayer.getStat(Stat.ATK);
const baseDEF = player.getStat(Stat.DEF); const baseDEF = switchedPlayer.getStat(Stat.DEF);
expect(player.getStat(Stat.ATK, false)).toBe(baseDEF); expect(switchedPlayer.getStat(Stat.ATK, false)).toBe(baseDEF);
expect(player.getStat(Stat.DEF, false)).toBe(baseATK); expect(switchedPlayer.getStat(Stat.DEF, false)).toBe(baseATK);
expect(player.getTag(BattlerTagType.POWER_TRICK)).toBeDefined(); expect(switchedPlayer.getTag(BattlerTagType.POWER_TRICK)).toBeDefined();
}, 20000); }, 20000);
}); });