mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 15:22:19 +02:00
Make sure that pokemon with forms are not filtered out
This commit is contained in:
parent
c34b7b1deb
commit
5e5adf3f64
@ -1269,9 +1269,8 @@ export function checkStarterValidForChallenge(species: PokemonSpecies, props: De
|
|||||||
return isValidForChallenge.value;
|
return isValidForChallenge.value;
|
||||||
}
|
}
|
||||||
// We check the validity of every evolution and form change, and require that at least one is valid
|
// 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];
|
const speciesToCheck = [species.speciesId];
|
||||||
while (speciesToCheck.length && !isValid) {
|
while (speciesToCheck.length) {
|
||||||
const checking = speciesToCheck.pop();
|
const checking = speciesToCheck.pop();
|
||||||
// Linter complains if we don't handle this
|
// Linter complains if we don't handle this
|
||||||
if (!checking) {
|
if (!checking) {
|
||||||
@ -1299,7 +1298,7 @@ export function checkStarterValidForChallenge(species: PokemonSpecies, props: De
|
|||||||
* @returns True if the species is considered valid.
|
* @returns True if the species is considered valid.
|
||||||
*/
|
*/
|
||||||
function checkSpeciesValidForChallenge(species: PokemonSpecies, props: DexAttrProps, soft: boolean) {
|
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);
|
const isValidForChallenge = new Utils.BooleanHolder(true);
|
||||||
applyChallenges(globalScene.gameMode, ChallengeType.STARTER_CHOICE, species, isValidForChallenge, props);
|
applyChallenges(globalScene.gameMode, ChallengeType.STARTER_CHOICE, species, isValidForChallenge, props);
|
||||||
return isValidForChallenge.value;
|
return isValidForChallenge.value;
|
||||||
|
Loading…
Reference in New Issue
Block a user