fix
This commit is contained in:
parent
97a6e9bf62
commit
126b5b1b99
|
@ -102,7 +102,7 @@ describe("Moves - Instruct", () => {
|
|||
await game.phaseInterceptor.to("TurnEndPhase", false);
|
||||
|
||||
instructSuccess(shuckle, Moves.SONIC_BOOM);
|
||||
expect(game.scene.getEnemyField()[0].getInverseHp()).toBe(40);
|
||||
expect(game.scene.getEnemyPokemon()?.getInverseHp()).toBe(40);
|
||||
});
|
||||
|
||||
// TODO: Enable test case once gigaton hammer (and blood moon) are reworked
|
||||
|
@ -219,7 +219,7 @@ describe("Moves - Instruct", () => {
|
|||
// fiery dance triggered dancer successfully for a total of 4 hits
|
||||
// Enemy level is set to a high value so that it does not faint even after all 4 hits
|
||||
instructSuccess(volcarona, Moves.FIERY_DANCE);
|
||||
expect(game.scene.getEnemyField()[0].turnData.attacksReceived.length).toBe(4);
|
||||
expect(game.scene.getEnemyPokemon()?.turnData.attacksReceived.length).toBe(4);
|
||||
});
|
||||
|
||||
it("should not repeat move when switching out", async () => {
|
||||
|
@ -270,13 +270,13 @@ describe("Moves - Instruct", () => {
|
|||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2]);
|
||||
await game.phaseInterceptor.to("TurnEndPhase", false);
|
||||
|
||||
expect(game.scene.getPlayerField()[0].getLastXMoves()[0].result).toBe(MoveResult.SUCCESS);
|
||||
const enemyMove = game.scene.getEnemyField()[0]!.getLastXMoves()[0];
|
||||
expect(game.scene.getEnemyPokemon()?.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS);
|
||||
const enemyMove = game.scene.getEnemyPokemon()?.getLastXMoves()[0]!;
|
||||
expect(enemyMove.result).toBe(MoveResult.FAIL);
|
||||
expect(
|
||||
game.scene
|
||||
.getEnemyField()[0]
|
||||
.getMoveset()
|
||||
.getEnemyPokemon()
|
||||
?.getMoveset()
|
||||
.find(m => m?.moveId === Moves.SONIC_BOOM)?.ppUsed,
|
||||
).toBe(1);
|
||||
});
|
||||
|
@ -336,14 +336,14 @@ describe("Moves - Instruct", () => {
|
|||
game.move.select(Moves.ELECTRO_DRIFT);
|
||||
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
|
||||
await game.toNextTurn();
|
||||
expect(regieleki.getMoveHistory()).toContain(expect.objectContaining({ move: Moves.ELECTRO_DRIFT }));
|
||||
expect(regieleki.getLastXMoves()[0]).toEqual(expect.objectContaining({ move: Moves.ELECTRO_DRIFT }));
|
||||
|
||||
// Simulate forgetting electro drift cuz reasons
|
||||
game.move.changeMoveset(regieleki, [Moves.ELECTROWEB, Moves.SPLASH]);
|
||||
game.move.select(Moves.SPLASH);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("TurnEndPhase", false);
|
||||
expect(game.scene.getEnemyField()[0].getLastXMoves()[0].result).toBe(MoveResult.FAIL);
|
||||
expect(game.scene.getEnemyPokemon()?.getLastXMoves()[0].result).toBe(MoveResult.FAIL);
|
||||
});
|
||||
|
||||
it("should disregard priority of instructed move on use", async () => {
|
||||
|
@ -427,7 +427,7 @@ describe("Moves - Instruct", () => {
|
|||
.startingLevel(500);
|
||||
await game.classicMode.startBattle([Species.KORAIDON, Species.KLEFKI]);
|
||||
|
||||
const koraidon = game.scene.getPlayerField()[0]!;
|
||||
const koraidon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
game.move.select(Moves.BREAKING_SWIPE);
|
||||
await game.phaseInterceptor.to("TurnEndPhase", false);
|
||||
|
@ -454,7 +454,7 @@ describe("Moves - Instruct", () => {
|
|||
.startingLevel(500);
|
||||
await game.classicMode.startBattle([Species.KORAIDON, Species.KLEFKI]);
|
||||
|
||||
const koraidon = game.scene.getPlayerField()[0]!;
|
||||
const koraidon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
game.move.select(Moves.BRUTAL_SWING);
|
||||
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
|
||||
|
|
Loading…
Reference in New Issue