mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Do not allow gen2 preevolutions for VC1 pokemon in generation 7
This commit is contained in:
parent
f129701ee6
commit
eda97f4b49
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue