Exclude form changes that are not triggered by an item

This commit is contained in:
Wlowscha 2025-03-16 12:34:27 +01:00
parent 95b87f7ce5
commit 0b50cbe348
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -1311,6 +1311,11 @@ function checkSpeciesValidForChallenge(species: PokemonSpecies, props: DexAttrPr
return true;
}
pokemonFormChanges[species.speciesId].forEach(f1 => {
// Exclude form changes that require the mon to be on the field to begin with,
// such as Castform
if (!("item" in f1)) {
return;
}
species.forms.forEach((f2, formIndex) => {
if (f1.formKey === f2.formKey) {
const formProps = { ...props };