mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-28 19:22:29 +02:00
Fixing instruct test to not read turnData of fainted mon
This commit is contained in:
parent
2ff1966e06
commit
2cd192b2f0
@ -221,7 +221,8 @@ describe("Moves - Instruct", () => {
|
|||||||
it("should allow for dancer copying of instructed dance move", async () => {
|
it("should allow for dancer copying of instructed dance move", async () => {
|
||||||
game.override
|
game.override
|
||||||
.battleType("double")
|
.battleType("double")
|
||||||
.enemyMoveset([ Moves.INSTRUCT, Moves.SPLASH ]);
|
.enemyMoveset([ Moves.INSTRUCT, Moves.SPLASH ])
|
||||||
|
.enemyLevel(1000);
|
||||||
await game.classicMode.startBattle([ Species.ORICORIO, Species.VOLCARONA ]);
|
await game.classicMode.startBattle([ Species.ORICORIO, Species.VOLCARONA ]);
|
||||||
|
|
||||||
const [ oricorio, volcarona ] = game.scene.getPlayerField();
|
const [ oricorio, volcarona ] = game.scene.getPlayerField();
|
||||||
@ -236,11 +237,9 @@ describe("Moves - Instruct", () => {
|
|||||||
await game.phaseInterceptor.to("BerryPhase");
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
// fiery dance triggered dancer successfully for a total of 4 hits
|
// fiery dance triggered dancer successfully for a total of 4 hits
|
||||||
// Volcarona fiery dance has a _small_ chance to 3HKO a shuckle in worst case, so we add the hit count of both
|
// Enemy level is set to a high value so that it does not faint even after all 4 hits
|
||||||
// foes to account for spillover
|
|
||||||
instructSuccess(volcarona, Moves.FIERY_DANCE);
|
instructSuccess(volcarona, Moves.FIERY_DANCE);
|
||||||
expect(game.scene.getEnemyField()[0].turnData.attacksReceived.length +
|
expect(game.scene.getEnemyField()[0].turnData.attacksReceived.length).toBe(4);
|
||||||
game.scene.getEnemyField()[1].turnData.attacksReceived.length).toBe(4);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not repeat move when switching out", async () => {
|
it("should not repeat move when switching out", async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user