Fixed duplicate calls to game.field.setTurnOrder

This commit is contained in:
Bertie690 2025-09-21 16:21:45 -04:00
parent 76beb6c4a1
commit bf37a8ca51
15 changed files with 0 additions and 31 deletions

View File

@ -120,7 +120,6 @@ describe("Abilities - Neutralizing Gas", () => {
game.move.select(MoveId.SPLASH, 1); game.move.select(MoveId.SPLASH, 1);
await game.move.selectEnemyMove(MoveId.ENTRAINMENT, BattlerIndex.PLAYER_2); await game.move.selectEnemyMove(MoveId.ENTRAINMENT, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(MoveId.SPLASH); await game.move.selectEnemyMove(MoveId.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left
}); });

View File

@ -97,7 +97,6 @@ describe("Abilities - Protosynthesis", () => {
true, true,
); );
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toNextTurn(); await game.toNextTurn();
const boosted_dmg = initialHp - enemy.hp; const boosted_dmg = initialHp - enemy.hp;
expect(boosted_dmg).toBeGreaterThan(unboosted_dmg); expect(boosted_dmg).toBeGreaterThan(unboosted_dmg);

View File

@ -53,12 +53,10 @@ describe("Abilities - Supreme Overlord", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.EXPLOSION); game.move.select(MoveId.EXPLOSION);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
game.doSelectPartyPokemon(2); game.doSelectPartyPokemon(2);
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase); await game.phaseInterceptor.to(MoveEffectPhase);
expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.2); expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.2);
@ -80,7 +78,6 @@ describe("Abilities - Supreme Overlord", () => {
*/ */
game.doRevivePokemon(1); game.doRevivePokemon(1);
game.move.select(MoveId.EXPLOSION); game.move.select(MoveId.EXPLOSION);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
game.doSelectPartyPokemon(1); game.doSelectPartyPokemon(1);
await game.toNextTurn(); await game.toNextTurn();
@ -88,12 +85,10 @@ describe("Abilities - Supreme Overlord", () => {
* Bulbasur faints twice * Bulbasur faints twice
*/ */
game.move.select(MoveId.EXPLOSION); game.move.select(MoveId.EXPLOSION);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
game.doSelectPartyPokemon(2); game.doSelectPartyPokemon(2);
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase); await game.phaseInterceptor.to(MoveEffectPhase);
expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.3); expect(move.calculateBattlePower).toHaveReturnedWith(basePower * 1.3);
@ -116,7 +111,6 @@ describe("Abilities - Supreme Overlord", () => {
* Enemy Pokemon faints and new wave is entered. * Enemy Pokemon faints and new wave is entered.
*/ */
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
@ -137,7 +131,6 @@ describe("Abilities - Supreme Overlord", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
@ -158,7 +151,6 @@ describe("Abilities - Supreme Overlord", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);

View File

@ -70,7 +70,6 @@ describe("Items - Multi Lens", () => {
const playerPokemon = game.field.getPlayerPokemon(); const playerPokemon = game.field.getPlayerPokemon();
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to("MoveEndPhase"); await game.phaseInterceptor.to("MoveEndPhase");
expect(playerPokemon.turnData.hitCount).toBe(3); expect(playerPokemon.turnData.hitCount).toBe(3);

View File

@ -111,7 +111,6 @@ describe("Moves - Baton Pass", () => {
expect(enemy.getTag(BattlerTagType.FIRE_SPIN)).toBeDefined(); expect(enemy.getTag(BattlerTagType.FIRE_SPIN)).toBeDefined();
game.move.select(MoveId.BATON_PASS); game.move.select(MoveId.BATON_PASS);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
game.doSelectPartyPokemon(1); game.doSelectPartyPokemon(1);
await game.toNextTurn(); await game.toNextTurn();

View File

@ -64,7 +64,6 @@ describe("Moves - Grudge", () => {
game.move.use(MoveId.GUILLOTINE); game.move.use(MoveId.GUILLOTINE);
await game.move.forceEnemyMove(MoveId.SPLASH); await game.move.forceEnemyMove(MoveId.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toEndOfTurn(); await game.toEndOfTurn();
expect(ratatta).toHaveFainted(); expect(ratatta).toHaveFainted();

View File

@ -343,7 +343,6 @@ describe("Moves - Instruct", () => {
expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL); expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL);
game.move.select(MoveId.INSTRUCT); game.move.select(MoveId.INSTRUCT);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("TurnEndPhase", false); await game.phaseInterceptor.to("TurnEndPhase", false);
expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL); expect(player.getLastXMoves()[0].result).toBe(MoveResult.FAIL);

View File

@ -59,7 +59,6 @@ describe("Moves - Last Respects", () => {
* Charmander faints once * Charmander faints once
*/ */
game.move.select(MoveId.EXPLOSION); game.move.select(MoveId.EXPLOSION);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
game.doSelectPartyPokemon(2); game.doSelectPartyPokemon(2);
await game.toNextTurn(); await game.toNextTurn();
@ -86,7 +85,6 @@ describe("Moves - Last Respects", () => {
*/ */
game.doRevivePokemon(1); game.doRevivePokemon(1);
game.move.select(MoveId.EXPLOSION); game.move.select(MoveId.EXPLOSION);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
game.doSelectPartyPokemon(1); game.doSelectPartyPokemon(1);
await game.toNextTurn(); await game.toNextTurn();
@ -99,7 +97,6 @@ describe("Moves - Last Respects", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase); await game.phaseInterceptor.to(MoveEffectPhase);
expect(move.calculateBattlePower).toHaveReturnedWith(basePower + 3 * 50); expect(move.calculateBattlePower).toHaveReturnedWith(basePower + 3 * 50);
@ -127,7 +124,6 @@ describe("Moves - Last Respects", () => {
* Enemy Pokemon faints and new wave is entered. * Enemy Pokemon faints and new wave is entered.
*/ */
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
expect(game.scene.arena.playerFaints).toBe(1); expect(game.scene.arena.playerFaints).toBe(1);
@ -160,7 +156,6 @@ describe("Moves - Last Respects", () => {
* Enemy Pokemon faints and new wave is entered. * Enemy Pokemon faints and new wave is entered.
*/ */
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
expect(game.scene.currentBattle.enemyFaints).toBe(0); expect(game.scene.currentBattle.enemyFaints).toBe(0);
@ -184,7 +179,6 @@ describe("Moves - Last Respects", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);
@ -205,7 +199,6 @@ describe("Moves - Last Respects", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave(); await game.toNextWave();
game.move.select(MoveId.LAST_RESPECTS); game.move.select(MoveId.LAST_RESPECTS);

View File

@ -102,7 +102,6 @@ describe("Moves - Metronome", () => {
expect.soft(turn1PpUsed).toBeGreaterThan(1); expect.soft(turn1PpUsed).toBeGreaterThan(1);
expect(solarBeamMove.ppUsed).toBe(0); expect(solarBeamMove.ppUsed).toBe(0);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toNextTurn(); await game.toNextTurn();
expect(player.getTag(BattlerTagType.CHARGING)).toBeFalsy(); expect(player.getTag(BattlerTagType.CHARGING)).toBeFalsy();

View File

@ -166,7 +166,6 @@ describe("Moves - Pledge Moves", () => {
game.move.select(MoveId.FIERY_DANCE, 0, BattlerIndex.ENEMY_2); game.move.select(MoveId.FIERY_DANCE, 0, BattlerIndex.ENEMY_2);
game.move.select(MoveId.SPLASH, 1); game.move.select(MoveId.SPLASH, 1);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("MoveEndPhase"); await game.phaseInterceptor.to("MoveEndPhase");
// Rainbow effect should increase Fiery Dance's chance of raising Sp. Atk to 100% // Rainbow effect should increase Fiery Dance's chance of raising Sp. Atk to 100%

View File

@ -85,7 +85,6 @@ describe("Moves - Rage Fist", () => {
// remove substitute and get confused // remove substitute and get confused
game.move.select(MoveId.TIDY_UP); game.move.select(MoveId.TIDY_UP);
await game.move.selectEnemyMove(MoveId.CONFUSE_RAY); await game.move.selectEnemyMove(MoveId.CONFUSE_RAY);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.RAGE_FIST); game.move.select(MoveId.RAGE_FIST);
@ -108,7 +107,6 @@ describe("Moves - Rage Fist", () => {
expect(game.field.getPlayerPokemon().battleData.hitCount).toBe(2); expect(game.field.getPlayerPokemon().battleData.hitCount).toBe(2);
game.move.select(MoveId.RAGE_FIST); game.move.select(MoveId.RAGE_FIST);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to("TurnEndPhase");
expect(game.field.getPlayerPokemon().battleData.hitCount).toBe(4); expect(game.field.getPlayerPokemon().battleData.hitCount).toBe(4);
@ -147,7 +145,6 @@ describe("Moves - Rage Fist", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.RAGE_FIST); game.move.select(MoveId.RAGE_FIST);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("BerryPhase", false); await game.phaseInterceptor.to("BerryPhase", false);
expect(move.calculateBattlePower).toHaveLastReturnedWith(150); expect(move.calculateBattlePower).toHaveLastReturnedWith(150);

View File

@ -159,7 +159,6 @@ describe("Moves - Roost", () => {
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
game.move.select(MoveId.ROOST); game.move.select(MoveId.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase); await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be typeless type after roost and is grounded // Should only be typeless type after roost and is grounded
@ -195,7 +194,6 @@ describe("Moves - Roost", () => {
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
game.move.select(MoveId.ROOST); game.move.select(MoveId.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase); await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be typeless type after roost and is grounded // Should only be typeless type after roost and is grounded

View File

@ -71,7 +71,6 @@ describe("Moves - Sketch", () => {
await game.toNextTurn(); await game.toNextTurn();
game.move.select(MoveId.SKETCH); game.move.select(MoveId.SKETCH);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.move.forceStatusActivation(true); await game.move.forceStatusActivation(true);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to("TurnEndPhase");
expect(playerPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); expect(playerPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS);

View File

@ -49,7 +49,6 @@ describe("Moves - Spite", () => {
game.move.use(MoveId.SPITE); game.move.use(MoveId.SPITE);
await game.move.selectEnemyMove(MoveId.SPLASH); await game.move.selectEnemyMove(MoveId.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toEndOfTurn(); await game.toEndOfTurn();
expect(karp).toHaveUsedPP(MoveId.TACKLE, 4 + 1); expect(karp).toHaveUsedPP(MoveId.TACKLE, 4 + 1);

View File

@ -62,7 +62,6 @@ describe("Frenzy Move Reset", () => {
expect(playerPokemon.summonData.moveQueue.length).toBe(2); expect(playerPokemon.summonData.moveQueue.length).toBe(2);
expect(playerPokemon.summonData.tags.some(tag => tag.tagType === BattlerTagType.FRENZY)).toBe(true); 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.move.forceStatusActivation(true);
await game.toNextTurn(); await game.toNextTurn();