mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +02:00
Fixed logic to allow mons with no forms
This commit is contained in:
parent
82fab3502b
commit
c34b7b1deb
@ -1299,12 +1299,11 @@ 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) {
|
||||
if (!soft || !pokemonFormChanges.hasOwnProperty(species.speciesId)) {
|
||||
const isValidForChallenge = new Utils.BooleanHolder(true);
|
||||
applyChallenges(globalScene.gameMode, ChallengeType.STARTER_CHOICE, species, isValidForChallenge, props);
|
||||
return isValidForChallenge.value;
|
||||
}
|
||||
if (pokemonFormChanges.hasOwnProperty(species.speciesId)) {
|
||||
pokemonFormChanges[species.speciesId].forEach(f1 => {
|
||||
species.forms.forEach((f2, formIndex) => {
|
||||
if (f1.formKey === f2.formKey) {
|
||||
@ -1324,6 +1323,5 @@ function checkSpeciesValidForChallenge(species: PokemonSpecies, props: DexAttrPr
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user