From abc9eb5d7098bb3fb8cc9eeaf1913799d2e5224d Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Tue, 20 May 2025 03:15:31 -0700 Subject: [PATCH] Add test --- test/abilities/libero.test.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/abilities/libero.test.ts b/test/abilities/libero.test.ts index 4adb828180e..86605d1e9d9 100644 --- a/test/abilities/libero.test.ts +++ b/test/abilities/libero.test.ts @@ -11,8 +11,9 @@ import { Species } from "#enums/species"; import { WeatherType } from "#enums/weather-type"; import GameManager from "#test/testUtils/gameManager"; 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", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -290,6 +291,18 @@ describe("Abilities - Libero", () => { testPokemonTypeMatchesDefaultMoveType(leadPokemon, Moves.CURSE); 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) {