Skip to content

Commit

Permalink
Prevent Arena Trap/etc from breaking Costar test
Browse files Browse the repository at this point in the history
  • Loading branch information
DayKev committed Jul 8, 2024
1 parent 4dd5e73 commit 39f2937
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/test/abilities/costar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ describe("Abilities - COSTAR", () => {
game = new GameManager(phaserGame);
vi.spyOn(Overrides, "DOUBLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.COSTAR);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NASTY_PLOT, Moves.CURSE]);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NASTY_PLOT]);
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
});


test(
"ability copies positive stat changes",
async () => {
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);

await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);

let [leftPokemon, rightPokemon] = game.scene.getPlayerField();
expect(leftPokemon).not.toBe(undefined);
expect(rightPokemon).not.toBe(undefined);

game.doAttack(getMovePosition(game.scene, 0, Moves.NASTY_PLOT));
await game.phaseInterceptor.to(CommandPhase);
Expand Down Expand Up @@ -71,8 +71,6 @@ describe("Abilities - COSTAR", () => {
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);

let [leftPokemon, rightPokemon] = game.scene.getPlayerField();
expect(leftPokemon).not.toBe(undefined);
expect(rightPokemon).not.toBe(undefined);

expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2);
expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2);
Expand Down

0 comments on commit 39f2937

Please sign in to comment.