mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Always check requested form first
This commit is contained in:
parent
f0c33e5416
commit
bcef75fb10
@ -715,7 +715,6 @@ export class SingleTypeChallenge extends Challenge {
|
||||
{ species: Species.CASTFORM, type: PokemonType.NORMAL, fusion: false },
|
||||
];
|
||||
// TODO: Find a solution for all Pokemon with this ssui issue, including Basculin and Burmy
|
||||
private static SPECIES_OVERRIDES: Species[] = [Species.MELOETTA];
|
||||
|
||||
constructor() {
|
||||
super(Challenges.SINGLE_TYPE, 18);
|
||||
@ -1298,11 +1297,15 @@ 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) || props.formIndex === 0) {
|
||||
const isValidForChallenge = new Utils.BooleanHolder(true);
|
||||
applyChallenges(globalScene.gameMode, ChallengeType.STARTER_CHOICE, species, isValidForChallenge, props);
|
||||
if (!soft || !pokemonFormChanges.hasOwnProperty(species.speciesId)) {
|
||||
return isValidForChallenge.value;
|
||||
}
|
||||
// If the form in props is valid, return true before checking other form changes
|
||||
if (soft && isValidForChallenge.value) {
|
||||
return true;
|
||||
}
|
||||
pokemonFormChanges[species.speciesId].forEach(f1 => {
|
||||
species.forms.forEach((f2, formIndex) => {
|
||||
if (f1.formKey === f2.formKey) {
|
||||
|
Loading…
Reference in New Issue
Block a user