mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-25 09:42:20 +02:00
Fixed tests for lure abilities to account for double lures
This commit is contained in:
parent
7258a15a7b
commit
da70d864b0
@ -57,15 +57,25 @@ describe("Abilities - Arena Trap", () => {
|
||||
vi.spyOn(game.scene, "getDoubleBattleChance");
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
let expected: number = 8;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 2;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(8);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
|
||||
expected = 2;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 1;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(2);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -254,14 +254,24 @@ describe("Abilities - Commander", () => {
|
||||
vi.spyOn(game.scene, "getDoubleBattleChance");
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
let expected: number = 8;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 2;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(8);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
|
||||
expected = 2;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 1;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(2);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
});
|
||||
});
|
||||
|
@ -57,14 +57,24 @@ describe("Abilities - Illuminate", () => {
|
||||
vi.spyOn(game.scene, "getDoubleBattleChance");
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
let expected: number = 8;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 2;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(8);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
|
||||
expected = 2;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 1;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(2);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
});
|
||||
});
|
||||
|
@ -66,15 +66,25 @@ describe("Abilities - No Guard", () => {
|
||||
vi.spyOn(game.scene, "getDoubleBattleChance");
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
let expected: number = 8;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 2;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(8);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
|
||||
expected = 2;
|
||||
game.move.select(Moves.SPLASH);
|
||||
if (game.scene.currentBattle.double) {
|
||||
game.move.select(Moves.SPLASH);
|
||||
expected = 1;
|
||||
}
|
||||
await game.doKillOpponents();
|
||||
await game.toNextWave();
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(2);
|
||||
expect(game.scene.getDoubleBattleChance).toHaveLastReturnedWith(expected);
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user