From 501e2a0c334045ca5b9959de310e447e2e5f14c1 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Sat, 31 May 2025 12:32:53 -0400 Subject: [PATCH] Marked `classicMode.runToSummon` and `classicMode.startBattle` without species as deprecated Having the species being used depend on daily run RNG is both unintuitive, janky and prone to flaking out (as happened with the Gastro Acid tests) --- test/testUtils/helpers/classicModeHelper.ts | 23 +++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/test/testUtils/helpers/classicModeHelper.ts b/test/testUtils/helpers/classicModeHelper.ts index 8e1ac95c733..1bf3a1568e9 100644 --- a/test/testUtils/helpers/classicModeHelper.ts +++ b/test/testUtils/helpers/classicModeHelper.ts @@ -16,9 +16,19 @@ import { GameManagerHelper } from "./gameManagerHelper"; export class ClassicModeHelper extends GameManagerHelper { /** * Runs the classic game to the summon phase. - * @param species - Optional array of species to summon. + * @param species - An array of {@linkcode Species} to summon. * @returns A promise that resolves when the summon phase is reached. */ + async runToSummon(species: Species[]): Promise; + /** + * Runs the classic game to the summon phase. + * Selects 3 daily run starters with a fixed seed of "test" + * (see `DailyRunConfig.getDailyRunStarters` in `daily-run.ts` for more info). + * @returns A promise that resolves when the summon phase is reached. + * @deprecated - Specifying the starters helps prevent inconsistencies from internal RNG changes. + */ + async runToSummon(): Promise; + async runToSummon(species: Species[] | undefined): Promise; async runToSummon(species?: Species[]): Promise { await this.game.runToTitle(); @@ -42,9 +52,18 @@ export class ClassicModeHelper extends GameManagerHelper { /** * Transitions to the start of a battle. - * @param species - Optional array of species to start the battle with. + * @param species - An array of {@linkcode Species} to start the battle with. * @returns A promise that resolves when the battle is started. */ + async startBattle(species: Species[]): Promise; + /** + * Transitions to the start of a battle. + * Will select 3 daily run starters with a fixed seed of "test" + * (see `DailyRunConfig.getDailyRunStarters` in `daily-run.ts` for more info). + * @returns A promise that resolves when the battle is started. + * @deprecated - Specifying the starters helps prevent inconsistencies from internal RNG changes. + */ + async startBattle(): Promise; async startBattle(species?: Species[]): Promise { await this.runToSummon(species);