mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Add test
This commit is contained in:
parent
c9d1a57b3c
commit
abc9eb5d70
@ -11,8 +11,9 @@ import { Species } from "#enums/species";
|
|||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
import GameManager from "#test/testUtils/gameManager";
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, test } from "vitest";
|
||||||
|
|
||||||
|
// TODO: use `describe.each` to combine the Libero and Protean tests
|
||||||
describe("Abilities - Libero", () => {
|
describe("Abilities - Libero", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
@ -290,6 +291,18 @@ describe("Abilities - Libero", () => {
|
|||||||
testPokemonTypeMatchesDefaultMoveType(leadPokemon, Moves.CURSE);
|
testPokemonTypeMatchesDefaultMoveType(leadPokemon, Moves.CURSE);
|
||||||
expect(leadPokemon.getTag(BattlerTagType.CURSED)).not.toBe(undefined);
|
expect(leadPokemon.getTag(BattlerTagType.CURSED)).not.toBe(undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("activates even if the move is stopped by Psychic Terrain", async () => {
|
||||||
|
game.override.enemyAbility(Abilities.PSYCHIC_SURGE).moveset(Moves.QUICK_ATTACK);
|
||||||
|
await game.classicMode.startBattle([Species.FEEBAS]);
|
||||||
|
|
||||||
|
const feebas = game.scene.getPlayerPokemon()!;
|
||||||
|
|
||||||
|
game.move.select(Moves.QUICK_ATTACK);
|
||||||
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
|
testPokemonTypeMatchesDefaultMoveType(feebas, Moves.QUICK_ATTACK);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: Moves) {
|
function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: Moves) {
|
||||||
|
Loading…
Reference in New Issue
Block a user