From 9bb138c51977f053e1217fca56eca0a94e5412a1 Mon Sep 17 00:00:00 2001 From: geeil-han Date: Sat, 8 Feb 2025 22:41:00 +0100 Subject: [PATCH] added turnorder to tests --- src/test/abilities/protosynthesis.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/abilities/protosynthesis.test.ts b/src/test/abilities/protosynthesis.test.ts index b1e354b7ec3..67786c3ae9e 100644 --- a/src/test/abilities/protosynthesis.test.ts +++ b/src/test/abilities/protosynthesis.test.ts @@ -5,6 +5,7 @@ import { Species } from "#enums/species"; import { Stat } from "#enums/stat"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; +import { BattlerIndex } from "#app/battle"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Abilities - Protosynthesis", () => { @@ -48,12 +49,14 @@ describe("Abilities - Protosynthesis", () => { const atk_before_boost = mew.getEffectiveStat(Stat.ATK, undefined, undefined, false, undefined, false, false, true); const initialHp = enemy.hp; game.move.select(Moves.TACKLE); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); await game.toNextTurn(); const unboosted_dmg = initialHp - enemy.hp; enemy.hp = initialHp; const def_after_boost = mew.getEffectiveStat(Stat.DEF, undefined, undefined, false, undefined, false, false, true); const atk_after_boost = mew.getEffectiveStat(Stat.ATK, undefined, undefined, false, undefined, false, false, true); game.move.select(Moves.TACKLE); + await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]); await game.toNextTurn(); const boosted_dmg = initialHp - enemy.hp; expect(boosted_dmg).toBeGreaterThan(unboosted_dmg);