make enc move gen tree fetch non-pkm specific

just need to get all evo chains possible

fetching a GO leafeon, need to reverse leafeon->eevee, but the LGPE evo chains don't know about leafeon

works fine now
This commit is contained in:
Kurt 2020-05-15 21:59:06 -07:00
parent 496a3a45ff
commit c8a141534c

View file

@ -117,7 +117,7 @@ namespace PKHeX.Core
public static IEnumerable<IEncounterable> GenerateVersionEncounters(PKM pk, IEnumerable<int> moves, GameVersion version) public static IEnumerable<IEncounterable> GenerateVersionEncounters(PKM pk, IEnumerable<int> moves, GameVersion version)
{ {
pk.Version = (int)version; pk.Version = (int)version;
var et = EvolutionTree.GetEvolutionTree(pk, pk.Species <= Legal.MaxSpeciesID_7_USUM ? 7 : PKX.Generation); // temp workaround as G8 doesn't have all evolutions var et = EvolutionTree.GetEvolutionTree(pk.Format);
var dl = et.GetValidPreEvolutions(pk, maxLevel: 100, skipChecks: true); var dl = et.GetValidPreEvolutions(pk, maxLevel: 100, skipChecks: true);
int[] needs = GetNeededMoves(pk, moves, dl); int[] needs = GetNeededMoves(pk, moves, dl);