From bf37a8ca51e735e63960fd688c86a0e76c62446e Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Sun, 21 Sep 2025 16:21:45 -0400 Subject: [PATCH] Fixed duplicate calls to `game.field.setTurnOrder` --- test/abilities/neutralizing-gas.test.ts | 1 - test/abilities/protosynthesis.test.ts | 1 - test/abilities/supreme-overlord.test.ts | 8 -------- test/items/multi-lens.test.ts | 1 - test/moves/baton-pass.test.ts | 1 - test/moves/grudge.test.ts | 1 - test/moves/instruct.test.ts | 1 - test/moves/last-respects.test.ts | 7 ------- test/moves/metronome.test.ts | 1 - test/moves/pledge-moves.test.ts | 1 - test/moves/rage-fist.test.ts | 3 --- test/moves/roost.test.ts | 2 -- test/moves/sketch.test.ts | 1 - test/moves/spite.test.ts | 1 - test/phases/frenzy-move-reset.test.ts | 1 - 15 files changed, 31 deletions(-) diff --git a/test/abilities/neutralizing-gas.test.ts b/test/abilities/neutralizing-gas.test.ts index fd9138e4174..140b7eae75b 100644 --- a/test/abilities/neutralizing-gas.test.ts +++ b/test/abilities/neutralizing-gas.test.ts @@ -120,7 +120,6 @@ describe("Abilities - Neutralizing Gas", () => { game.move.select(MoveId.SPLASH, 1); await game.move.selectEnemyMove(MoveId.ENTRAINMENT, BattlerIndex.PLAYER_2); await game.move.selectEnemyMove(MoveId.SPLASH); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left }); diff --git a/test/abilities/protosynthesis.test.ts b/test/abilities/protosynthesis.test.ts index ea2e1e20c17..1d4a9845f8f 100644 --- a/test/abilities/protosynthesis.test.ts +++ b/test/abilities/protosynthesis.test.ts @@ -97,7 +97,6 @@ describe("Abilities - Protosynthesis", () => { true, ); game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); const boosted_dmg = initialHp - enemy.hp; expect(boosted_dmg).toBeGreaterThan(unboosted_dmg); diff --git a/test/abilities/supreme-overlord.test.ts b/test/abilities/supreme-overlord.test.ts index d5470b70476..5ce04f0d0f4 100644 --- a/test/abilities/supreme-overlord.test.ts +++ b/test/abilities/supreme-overlord.test.ts @@ -53,12 +53,10 @@ describe("Abilities - Supreme Overlord", () => { await game.toNextTurn(); game.move.select(MoveId.EXPLOSION); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); game.doSelectPartyPokemon(2); await game.toNextTurn(); game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(MoveEffectPhase); expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.2); @@ -80,7 +78,6 @@ describe("Abilities - Supreme Overlord", () => { */ game.doRevivePokemon(1); game.move.select(MoveId.EXPLOSION); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); game.doSelectPartyPokemon(1); await game.toNextTurn(); @@ -88,12 +85,10 @@ describe("Abilities - Supreme Overlord", () => { * Bulbasur faints twice */ game.move.select(MoveId.EXPLOSION); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); game.doSelectPartyPokemon(2); await game.toNextTurn(); game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(MoveEffectPhase); expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.3); @@ -116,7 +111,6 @@ describe("Abilities - Supreme Overlord", () => { * Enemy Pokemon faints and new wave is entered. */ game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); game.move.select(MoveId.TACKLE); @@ -137,7 +131,6 @@ describe("Abilities - Supreme Overlord", () => { await game.toNextTurn(); game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); game.move.select(MoveId.TACKLE); @@ -158,7 +151,6 @@ describe("Abilities - Supreme Overlord", () => { await game.toNextTurn(); game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); game.move.select(MoveId.TACKLE); diff --git a/test/items/multi-lens.test.ts b/test/items/multi-lens.test.ts index 3686aff0fcf..ac04bcb3b3d 100644 --- a/test/items/multi-lens.test.ts +++ b/test/items/multi-lens.test.ts @@ -70,7 +70,6 @@ describe("Items - Multi Lens", () => { const playerPokemon = game.field.getPlayerPokemon(); game.move.select(MoveId.TACKLE); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("MoveEndPhase"); expect(playerPokemon.turnData.hitCount).toBe(3); diff --git a/test/moves/baton-pass.test.ts b/test/moves/baton-pass.test.ts index caabcfa7158..11133a42a95 100644 --- a/test/moves/baton-pass.test.ts +++ b/test/moves/baton-pass.test.ts @@ -111,7 +111,6 @@ describe("Moves - Baton Pass", () => { expect(enemy.getTag(BattlerTagType.FIRE_SPIN)).toBeDefined(); game.move.select(MoveId.BATON_PASS); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); game.doSelectPartyPokemon(1); await game.toNextTurn(); diff --git a/test/moves/grudge.test.ts b/test/moves/grudge.test.ts index cc75024bfbf..4fd66066a22 100644 --- a/test/moves/grudge.test.ts +++ b/test/moves/grudge.test.ts @@ -64,7 +64,6 @@ describe("Moves - Grudge", () => { game.move.use(MoveId.GUILLOTINE); await game.move.forceEnemyMove(MoveId.SPLASH); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toEndOfTurn(); expect(ratatta).toHaveFainted(); diff --git a/test/moves/instruct.test.ts b/test/moves/instruct.test.ts index eb3eccff400..d0053acc447 100644 --- a/test/moves/instruct.test.ts +++ b/test/moves/instruct.test.ts @@ -343,7 +343,6 @@ describe("Moves - Instruct", () => { expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL); game.move.select(MoveId.INSTRUCT); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase", false); expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL); diff --git a/test/moves/last-respects.test.ts b/test/moves/last-respects.test.ts index 9dadb316144..ea6f3f2f854 100644 --- a/test/moves/last-respects.test.ts +++ b/test/moves/last-respects.test.ts @@ -59,7 +59,6 @@ describe("Moves - Last Respects", () => { * Charmander faints once */ game.move.select(MoveId.EXPLOSION); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); game.doSelectPartyPokemon(2); await game.toNextTurn(); @@ -86,7 +85,6 @@ describe("Moves - Last Respects", () => { */ game.doRevivePokemon(1); game.move.select(MoveId.EXPLOSION); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); game.doSelectPartyPokemon(1); await game.toNextTurn(); @@ -99,7 +97,6 @@ describe("Moves - Last Respects", () => { await game.toNextTurn(); game.move.select(MoveId.LAST_RESPECTS); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(MoveEffectPhase); expect(move.calculateBattlePower).toHaveReturnedWith(basePower + 3 * 50); @@ -127,7 +124,6 @@ describe("Moves - Last Respects", () => { * Enemy Pokemon faints and new wave is entered. */ game.move.select(MoveId.LAST_RESPECTS); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); expect(game.scene.arena.playerFaints).toBe(1); @@ -160,7 +156,6 @@ describe("Moves - Last Respects", () => { * Enemy Pokemon faints and new wave is entered. */ game.move.select(MoveId.LAST_RESPECTS); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); expect(game.scene.currentBattle.enemyFaints).toBe(0); @@ -184,7 +179,6 @@ describe("Moves - Last Respects", () => { await game.toNextTurn(); game.move.select(MoveId.LAST_RESPECTS); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); game.move.select(MoveId.LAST_RESPECTS); @@ -205,7 +199,6 @@ describe("Moves - Last Respects", () => { await game.toNextTurn(); game.move.select(MoveId.LAST_RESPECTS); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); game.move.select(MoveId.LAST_RESPECTS); diff --git a/test/moves/metronome.test.ts b/test/moves/metronome.test.ts index 2215c18f451..63400ad8303 100644 --- a/test/moves/metronome.test.ts +++ b/test/moves/metronome.test.ts @@ -102,7 +102,6 @@ describe("Moves - Metronome", () => { expect.soft(turn1PpUsed).toBeGreaterThan(1); expect(solarBeamMove.ppUsed).toBe(0); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); expect(player.getTag(BattlerTagType.CHARGING)).toBeFalsy(); diff --git a/test/moves/pledge-moves.test.ts b/test/moves/pledge-moves.test.ts index 34058829d07..3cba2cf6e18 100644 --- a/test/moves/pledge-moves.test.ts +++ b/test/moves/pledge-moves.test.ts @@ -166,7 +166,6 @@ describe("Moves - Pledge Moves", () => { game.move.select(MoveId.FIERY_DANCE, 0, BattlerIndex.ENEMY_2); game.move.select(MoveId.SPLASH, 1); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("MoveEndPhase"); // Rainbow effect should increase Fiery Dance's chance of raising Sp. Atk to 100% diff --git a/test/moves/rage-fist.test.ts b/test/moves/rage-fist.test.ts index c58d1296ac5..f883bef1242 100644 --- a/test/moves/rage-fist.test.ts +++ b/test/moves/rage-fist.test.ts @@ -85,7 +85,6 @@ describe("Moves - Rage Fist", () => { // remove substitute and get confused game.move.select(MoveId.TIDY_UP); await game.move.selectEnemyMove(MoveId.CONFUSE_RAY); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); game.move.select(MoveId.RAGE_FIST); @@ -108,7 +107,6 @@ describe("Moves - Rage Fist", () => { expect(game.field.getPlayerPokemon().battleData.hitCount).toBe(2); game.move.select(MoveId.RAGE_FIST); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); expect(game.field.getPlayerPokemon().battleData.hitCount).toBe(4); @@ -147,7 +145,6 @@ describe("Moves - Rage Fist", () => { await game.toNextTurn(); game.move.select(MoveId.RAGE_FIST); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase", false); expect(move.calculateBattlePower).toHaveLastReturnedWith(150); diff --git a/test/moves/roost.test.ts b/test/moves/roost.test.ts index bb567a41cd0..c47b3e4b72f 100644 --- a/test/moves/roost.test.ts +++ b/test/moves/roost.test.ts @@ -159,7 +159,6 @@ describe("Moves - Roost", () => { await game.phaseInterceptor.to(TurnEndPhase); game.move.select(MoveId.ROOST); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(MoveEffectPhase); // Should only be typeless type after roost and is grounded @@ -195,7 +194,6 @@ describe("Moves - Roost", () => { await game.phaseInterceptor.to(TurnEndPhase); game.move.select(MoveId.ROOST); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(MoveEffectPhase); // Should only be typeless type after roost and is grounded diff --git a/test/moves/sketch.test.ts b/test/moves/sketch.test.ts index 0c2527bc09c..62f2aa33bc6 100644 --- a/test/moves/sketch.test.ts +++ b/test/moves/sketch.test.ts @@ -71,7 +71,6 @@ describe("Moves - Sketch", () => { await game.toNextTurn(); game.move.select(MoveId.SKETCH); - await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.move.forceStatusActivation(true); await game.phaseInterceptor.to("TurnEndPhase"); expect(playerPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); diff --git a/test/moves/spite.test.ts b/test/moves/spite.test.ts index 56c1be76198..af0f802819e 100644 --- a/test/moves/spite.test.ts +++ b/test/moves/spite.test.ts @@ -49,7 +49,6 @@ describe("Moves - Spite", () => { game.move.use(MoveId.SPITE); await game.move.selectEnemyMove(MoveId.SPLASH); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toEndOfTurn(); expect(karp).toHaveUsedPP(MoveId.TACKLE, 4 + 1); diff --git a/test/phases/frenzy-move-reset.test.ts b/test/phases/frenzy-move-reset.test.ts index feedd1b5865..7872a56d716 100644 --- a/test/phases/frenzy-move-reset.test.ts +++ b/test/phases/frenzy-move-reset.test.ts @@ -62,7 +62,6 @@ describe("Frenzy Move Reset", () => { expect(playerPokemon.summonData.moveQueue.length).toBe(2); expect(playerPokemon.summonData.tags.some(tag => tag.tagType === BattlerTagType.FRENZY)).toBe(true); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.move.forceStatusActivation(true); await game.toNextTurn();