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);
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
});

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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%

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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();