Do not allow gen2 preevolutions for VC1 pokemon in generation 7

This commit is contained in:
javierhimura 2017-09-23 13:16:33 +02:00
parent f129701ee6
commit eda97f4b49

View file

@ -1530,8 +1530,16 @@ namespace PKHeX.Core
GensEvoChains[gen] = GensEvoChains[gen].Where(e => e.Level >= GetMinLevelGeneration(pkm, gen)).ToArray(); GensEvoChains[gen] = GensEvoChains[gen].Where(e => e.Level >= GetMinLevelGeneration(pkm, gen)).ToArray();
if (gen == 1 && GensEvoChains[gen].LastOrDefault()?.Species > MaxSpeciesID_1) if (gen == 1 && GensEvoChains[gen].LastOrDefault()?.Species > MaxSpeciesID_1)
{
// Remove generation 2 pre-evolutions // Remove generation 2 pre-evolutions
GensEvoChains[gen] = GensEvoChains[gen].Take(GensEvoChains[gen].Length - 1).ToArray(); GensEvoChains[gen] = GensEvoChains[gen].Take(GensEvoChains[gen].Length - 1).ToArray();
if (pkm.VC1)
{
// Remove generation 2 pre-evolutions from gen 7 and future generations
for ( int fgen = 7; fgen <= maxgen; fgen++)
GensEvoChains[fgen] = GensEvoChains[fgen].Take(GensEvoChains[fgen].Length - 1).ToArray();
}
}
} }
return GensEvoChains; return GensEvoChains;
} }