mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 09:02:47 +02:00
Fix test
This commit is contained in:
parent
3551f69b0e
commit
151c308d63
@ -1,6 +1,6 @@
|
|||||||
import { Abilities } from "#enums/abilities";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { Moves } from "#enums/moves";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { Species } from "#enums/species";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
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, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
@ -22,40 +22,39 @@ describe("Abilities - Liquid Ooze", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
.moveset([Moves.SPLASH, Moves.GIGA_DRAIN])
|
.moveset([MoveId.SPLASH, MoveId.GIGA_DRAIN])
|
||||||
.ability(Abilities.BALL_FETCH)
|
.ability(AbilityId.BALL_FETCH)
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.disableCrits()
|
|
||||||
.enemyLevel(20)
|
.enemyLevel(20)
|
||||||
.enemySpecies(Species.MAGIKARP)
|
.enemySpecies(SpeciesId.MAGIKARP)
|
||||||
.enemyAbility(Abilities.LIQUID_OOZE)
|
.enemyAbility(AbilityId.LIQUID_OOZE)
|
||||||
.enemyMoveset(Moves.SPLASH);
|
.enemyMoveset(MoveId.SPLASH);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should drain the attacker's HP after a draining move", async () => {
|
it("should drain the attacker's HP after a draining move", async () => {
|
||||||
await game.classicMode.startBattle([Species.FEEBAS]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
game.move.select(Moves.GIGA_DRAIN);
|
game.move.select(MoveId.GIGA_DRAIN);
|
||||||
await game.phaseInterceptor.to("BerryPhase");
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
expect(game.scene.getPlayerPokemon()?.isFullHp()).toBe(false);
|
expect(game.scene.getPlayerPokemon()?.isFullHp()).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not drain the attacker's HP if it ignores indirect damage", async () => {
|
it("should not drain the attacker's HP if it ignores indirect damage", async () => {
|
||||||
game.override.ability(Abilities.MAGIC_GUARD);
|
game.override.ability(AbilityId.MAGIC_GUARD);
|
||||||
await game.classicMode.startBattle([Species.FEEBAS]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
game.move.select(Moves.GIGA_DRAIN);
|
game.move.select(MoveId.GIGA_DRAIN);
|
||||||
await game.phaseInterceptor.to("BerryPhase");
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
expect(game.scene.getPlayerPokemon()?.isFullHp()).toBe(true);
|
expect(game.scene.getPlayerPokemon()?.isFullHp()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not apply if suppressed", async () => {
|
it("should not apply if suppressed", async () => {
|
||||||
game.override.ability(Abilities.NEUTRALIZING_GAS);
|
game.override.ability(AbilityId.NEUTRALIZING_GAS);
|
||||||
await game.classicMode.startBattle([Species.FEEBAS]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
game.move.select(Moves.GIGA_DRAIN);
|
game.move.select(MoveId.GIGA_DRAIN);
|
||||||
await game.phaseInterceptor.to("BerryPhase");
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
expect(game.scene.getPlayerPokemon()?.isFullHp()).toBe(true);
|
expect(game.scene.getPlayerPokemon()?.isFullHp()).toBe(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user