Fix egg move validation when Smeargle is Unreleased (#11102)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run

This commit is contained in:
shrianshChari
2025-05-13 19:46:36 -07:00
committed by GitHub
parent be76e2a686
commit f23c953273

View File

@@ -1435,7 +1435,7 @@ export class TeamValidator {
throw new Error(`${species.name} has no egg groups for source ${source}`);
}
// no chainbreeding necessary if the father can be Smeargle
if (!getAll && eggGroups.includes('Field')) return true;
if (!getAll && eggGroups.includes('Field') && this.dex.species.get('Smeargle').tier !== 'Unreleased') return true;
// try to find a father to inherit the egg move combination from
for (const father of dex.species.all()) {
@@ -1486,7 +1486,8 @@ export class TeamValidator {
if (!this.dex.species.getLearnsetData(species.id).learnset) return false;
if (species.id === 'smeargle') return true;
const canBreedWithSmeargle = species.eggGroups.includes('Field');
const canBreedWithSmeargle = species.eggGroups.includes('Field') &&
this.dex.species.get('Smeargle').tier !== 'Unreleased';
const allEggSources = new PokemonSources();
allEggSources.sourcesBefore = eggGen;