From 5e5adf3f64e51c3b6495bdff1eb69cb6312564a8 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:01:16 +0100 Subject: [PATCH] Make sure that pokemon with forms are not filtered out --- src/data/challenge.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/data/challenge.ts b/src/data/challenge.ts index a187ee65496..d1c3fe97595 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -1269,9 +1269,8 @@ export function checkStarterValidForChallenge(species: PokemonSpecies, props: De return isValidForChallenge.value; } // We check the validity of every evolution and form change, and require that at least one is valid - const isValid = false; const speciesToCheck = [species.speciesId]; - while (speciesToCheck.length && !isValid) { + while (speciesToCheck.length) { const checking = speciesToCheck.pop(); // Linter complains if we don't handle this if (!checking) { @@ -1299,7 +1298,7 @@ export function checkStarterValidForChallenge(species: PokemonSpecies, props: De * @returns True if the species is considered valid. */ function checkSpeciesValidForChallenge(species: PokemonSpecies, props: DexAttrProps, soft: boolean) { - if (!soft || !pokemonFormChanges.hasOwnProperty(species.speciesId)) { + if (!soft || !pokemonFormChanges.hasOwnProperty(species.speciesId) || props.formIndex === 0) { const isValidForChallenge = new Utils.BooleanHolder(true); applyChallenges(globalScene.gameMode, ChallengeType.STARTER_CHOICE, species, isValidForChallenge, props); return isValidForChallenge.value;