예제 #1
0
        internal static List <EvoCriteria> GetOriginChain(PKM pkm, int maxspeciesorigin = -1, int lvl = -1, int minLevel = 1, bool skipChecks = false)
        {
            var chain = GetValidPreEvolutions(pkm, maxspeciesorigin, lvl, minLevel, skipChecks);

            if (!pkm.HasOriginalMetLocation)
            {
                var maxLevel = Legal.GetMaxLevelEncounter(pkm);
                if (maxLevel < 0)
                {
                    chain.Clear();
                    return(chain);
                }
                foreach (var c in chain)
                {
                    c.Level = Math.Min(maxLevel, c.Level);
                }
            }
            return(chain);
        }