mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 14:55:22 +01:00
[Test] Remove duplicate fake out test (#6691)
This commit is contained in:
parent
49bab02fca
commit
82181c5264
@ -23,7 +23,6 @@ describe("Moves - Fake Out", () => {
|
|||||||
game.override
|
game.override
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.enemySpecies(SpeciesId.CORVIKNIGHT)
|
.enemySpecies(SpeciesId.CORVIKNIGHT)
|
||||||
.moveset([MoveId.FAKE_OUT, MoveId.SPLASH])
|
|
||||||
.enemyMoveset(MoveId.SPLASH)
|
.enemyMoveset(MoveId.SPLASH)
|
||||||
.enemyLevel(10)
|
.enemyLevel(10)
|
||||||
.startingLevel(1) // prevent LevelUpPhase from happening
|
.startingLevel(1) // prevent LevelUpPhase from happening
|
||||||
@ -33,18 +32,17 @@ describe("Moves - Fake Out", () => {
|
|||||||
it("should only work the first turn a pokemon is sent out in a battle", async () => {
|
it("should only work the first turn a pokemon is sent out in a battle", async () => {
|
||||||
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
|
game.move.use(MoveId.FAKE_OUT);
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
const corv = game.field.getEnemyPokemon();
|
const corv = game.field.getEnemyPokemon();
|
||||||
|
expect(corv).not.toHaveFullHp();
|
||||||
|
corv.hp = corv.getMaxHp();
|
||||||
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
game.move.use(MoveId.FAKE_OUT);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(corv.hp).toBeLessThan(corv.getMaxHp());
|
expect(corv).toHaveFullHp();
|
||||||
const postTurnOneHp = corv.hp;
|
|
||||||
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
|
||||||
await game.toNextTurn();
|
|
||||||
|
|
||||||
expect(corv.hp).toBe(postTurnOneHp);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// This is a PokeRogue buff to Fake Out
|
// This is a PokeRogue buff to Fake Out
|
||||||
@ -53,43 +51,24 @@ describe("Moves - Fake Out", () => {
|
|||||||
|
|
||||||
// set hp to 1 for easy knockout
|
// set hp to 1 for easy knockout
|
||||||
game.field.getEnemyPokemon().hp = 1;
|
game.field.getEnemyPokemon().hp = 1;
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
game.move.use(MoveId.FAKE_OUT);
|
||||||
await game.toNextWave();
|
await game.toNextWave();
|
||||||
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
game.move.use(MoveId.FAKE_OUT);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
const corv = game.field.getEnemyPokemon();
|
const corv = game.field.getEnemyPokemon();
|
||||||
expect(corv).toBeDefined();
|
expect(corv).not.toHaveFullHp();
|
||||||
expect(corv?.hp).toBeLessThan(corv?.getMaxHp());
|
|
||||||
});
|
|
||||||
|
|
||||||
// This is a PokeRogue buff to Fake Out
|
|
||||||
it("should succeed at the start of each new wave, even if user wasn't recalled", async () => {
|
|
||||||
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
|
||||||
|
|
||||||
// set hp to 1 for easy knockout
|
|
||||||
game.field.getEnemyPokemon().hp = 1;
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
|
||||||
await game.toNextWave();
|
|
||||||
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
|
||||||
await game.toNextTurn();
|
|
||||||
|
|
||||||
const corv = game.field.getEnemyPokemon();
|
|
||||||
expect(corv).toBeDefined();
|
|
||||||
expect(corv.hp).toBeLessThan(corv.getMaxHp());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should succeed if recalled and sent back out", async () => {
|
it("should succeed if recalled and sent back out", async () => {
|
||||||
await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MAGIKARP]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MAGIKARP]);
|
||||||
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
game.move.use(MoveId.FAKE_OUT);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
const corv = game.field.getEnemyPokemon();
|
const corv = game.field.getEnemyPokemon();
|
||||||
|
expect(corv).not.toHaveFullHp();
|
||||||
expect(corv.hp).toBeLessThan(corv.getMaxHp());
|
|
||||||
corv.hp = corv.getMaxHp();
|
corv.hp = corv.getMaxHp();
|
||||||
|
|
||||||
game.doSwitchPokemon(1);
|
game.doSwitchPokemon(1);
|
||||||
@ -98,9 +77,9 @@ describe("Moves - Fake Out", () => {
|
|||||||
game.doSwitchPokemon(1);
|
game.doSwitchPokemon(1);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
game.move.select(MoveId.FAKE_OUT);
|
game.move.use(MoveId.FAKE_OUT);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(corv.hp).toBeLessThan(corv.getMaxHp());
|
expect(corv).not.toHaveFullHp();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user