Cross Evolution: Simplify validation (#7016)

All NFE Pokemon are going to be banned instead of restricted from now on, so the second check is useless.
This commit is contained in:
Kris Johnson 2020-07-18 11:27:20 -06:00 committed by GitHub
parent e2d268747c
commit 4eeb6e91a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,8 +519,7 @@ export const Formats: (FormatsData | {section: string, column?: number})[] = [
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
}
if (this.ruleTable.isRestrictedSpecies(crossSpecies) ||
(this.ruleTable.isRestrictedSpecies(species) && !species.prevo)) {
if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
}
const crossPrevoSpecies = this.dex.getSpecies(crossSpecies.prevo);