Fix Egg evolution lineage check

If [i]'s evolution chain has (species), add i to list.
Previously it only looked downward (metapod -> caterpie), now with this
it looks upward (beedrill <- metapod)

Thanks nymeros!
This commit is contained in:
Kaphotics 2016-05-09 20:58:12 -07:00
parent 8f45608437
commit c44f596e08

View file

@ -316,7 +316,11 @@ namespace PKHeX
}
internal static IEnumerable<int> getLineage(PK6 pk6)
{
List<int> res = new List<int>();
int species = pk6.Species;
List<int> res = new List<int>{species};
for (int i = 0; i < Evolves.Length; i++)
if (Evolves[i].Evos.Any(pk => pk.Species == species))
res.Add(i);
for (int i = -1; i < 2; i++)
res.Add(getBaseSpecies(pk6, i));
return res.Distinct();