Check future gen evolutions in InhabitedGeneration

Return true when format equals generation
This commit is contained in:
javierhimura 2017-02-16 01:33:17 +01:00
parent dec2787aef
commit 036449dfa0

View file

@ -453,7 +453,11 @@ namespace PKHeX.Core
if (species < 0) if (species < 0)
species = Species; species = Species;
if (Format == 1 && Generation ==2 && Legal.MaxSpeciesID_2 >= species) if (Format == 1 && Generation ==2 && (Legal.MaxSpeciesID_2 >= species || Legal.FutureEvolutionsGen2.Contains(species)))
return true;
if (Format == Generation)
//Every pokemon even those with illegal data inhabit the generation of its current format
return true; return true;
if (Format < Generation) if (Format < Generation)
@ -463,7 +467,7 @@ namespace PKHeX.Core
return false; return false;
// Sanity Check Species ID // Sanity Check Species ID
if (Legal.getMaxSpeciesOrigin(GenNumber) < species) if (Legal.getMaxSpeciesOrigin(GenNumber) < species && !Legal.getFutureGenEvolutions(GenNumber).Contains(species))
return false; return false;
int gen = GenNumber; int gen = GenNumber;