mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
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:
parent
8f45608437
commit
c44f596e08
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue