mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-12 03:12:18 +02:00
add automated tests for Clear Body
+ Contrary
This commit is contained in:
parent
15f2e0c67b
commit
edc90dc72c
@ -5,6 +5,7 @@ import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
|
||||
describe("Abilities - Contrary", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
@ -39,4 +40,39 @@ describe("Abilities - Contrary", () => {
|
||||
|
||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||
}, 20000);
|
||||
|
||||
describe("With Clear Body", () => {
|
||||
it("should apply positive effects", async () => {
|
||||
game.override
|
||||
.enemyPassiveAbility(Abilities.CLEAR_BODY)
|
||||
.moveset([Moves.TAIL_WHIP]);
|
||||
await game.classicMode.startBattle([Species.SLOWBRO]);
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||
|
||||
game.move.select(Moves.TAIL_WHIP);
|
||||
await game.phaseInterceptor.to("TurnEndPhase");
|
||||
|
||||
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(1);
|
||||
});
|
||||
|
||||
it("should block negative effects", async () => {
|
||||
game.override
|
||||
.enemyPassiveAbility(Abilities.CLEAR_BODY)
|
||||
.enemyMoveset([Moves.HOWL, Moves.HOWL, Moves.HOWL, Moves.HOWL])
|
||||
.moveset([Moves.SPLASH]);
|
||||
await game.classicMode.startBattle([Species.SLOWBRO]);
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||
|
||||
game.move.select(Moves.SPLASH);
|
||||
await game.phaseInterceptor.to("TurnEndPhase");
|
||||
|
||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user