diff --git a/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs b/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs index 750e70ccf..052f0ab83 100644 --- a/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs +++ b/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs @@ -235,23 +235,6 @@ internal static List GetValidPreEvolutions(PKM pkm, int maxspecieso { if (lvl < 0) lvl = pkm.CurrentLevel; - if (pkm.IsEgg && !skipChecks) - { - return new List(1) - { - new EvoCriteria(pkm.Species, pkm.AltForm) { Level = lvl, MinLevel = lvl }, - }; - } - - // Shedinja's evolution case can be a little tricky; hard-code handling. - if (pkm.Species == (int)Species.Shedinja && lvl >= 20 && (!pkm.HasOriginalMetLocation || pkm.Met_Level + 1 <= lvl)) - { - return new List(2) - { - new EvoCriteria((int)Species.Shedinja, 0) { Level = lvl, MinLevel = 20 }, - new EvoCriteria((int)Species.Nincada, 0) { Level = lvl, MinLevel = 1 }, - }; - } if (maxspeciesorigin == -1 && pkm.InhabitedGeneration(2) && pkm.Format <= 2 && pkm.GenNumber == 1) maxspeciesorigin = MaxSpeciesID_2; diff --git a/PKHeX.Core/Legality/Evolutions/EvolutionTree.cs b/PKHeX.Core/Legality/Evolutions/EvolutionTree.cs index 3aecfcb0b..1dc9c5a16 100644 --- a/PKHeX.Core/Legality/Evolutions/EvolutionTree.cs +++ b/PKHeX.Core/Legality/Evolutions/EvolutionTree.cs @@ -206,6 +206,24 @@ public List GetValidPreEvolutions(PKM pkm, int maxLevel, int maxSpe { if (maxSpeciesOrigin <= 0) maxSpeciesOrigin = Legal.GetMaxSpeciesOrigin(pkm); + if (pkm.IsEgg && !skipChecks) + { + return new List(1) + { + new EvoCriteria(pkm.Species, pkm.AltForm) { Level = maxLevel, MinLevel = maxLevel }, + }; + } + + // Shedinja's evolution case can be a little tricky; hard-code handling. + if (pkm.Species == (int)Species.Shedinja && maxLevel >= 20 && (!pkm.HasOriginalMetLocation || pkm.Met_Level + 1 <= maxLevel)) + { + return new List(2) + { + new EvoCriteria((int)Species.Shedinja, 0) { Level = maxLevel, MinLevel = 20 }, + new EvoCriteria((int)Species.Nincada, 0) { Level = maxLevel, MinLevel = 1 }, + }; + } + return GetExplicitLineage(pkm, maxLevel, skipChecks, maxSpeciesOrigin, minLevel); }