From fee92e4f32453573e3ba0728ba8fa45bbaa374c6 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 17 Oct 2019 18:23:50 -0700 Subject: [PATCH] Handle past gen transfer evochain for new evos basically Math.Max(2, format); we always want permissible evo chains when fetching encounters Closes #2403 ty @Rayqo ! --- PKHeX.Core/Legality/Evolutions/EvolutionChain.cs | 2 +- .../466 - Electivire - FF102D8B375B.pk7 | Bin 0 -> 232 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 Tests/PKHeX.Core.Tests/Legality/Legal/Generation 7 Transfer/466 - Electivire - FF102D8B375B.pk7 diff --git a/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs b/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs index a981e5c71..7326f509d 100644 --- a/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs +++ b/PKHeX.Core/Legality/Evolutions/EvolutionChain.cs @@ -256,7 +256,7 @@ internal static List GetValidPreEvolutions(PKM pkm, int maxspecieso if (maxspeciesorigin == -1 && pkm.InhabitedGeneration(2) && pkm.Format <= 2 && pkm.GenNumber == 1) maxspeciesorigin = MaxSpeciesID_2; - int tree = maxspeciesorigin == MaxSpeciesID_2 ? 2 : pkm.Format; + int tree = pkm.Format <= 2 ? 2 : pkm.Format; var et = EvolutionTree.GetEvolutionTree(pkm, tree); return et.GetValidPreEvolutions(pkm, maxLevel: lvl, maxSpeciesOrigin: maxspeciesorigin, skipChecks: skipChecks, minLevel: minLevel); } diff --git a/Tests/PKHeX.Core.Tests/Legality/Legal/Generation 7 Transfer/466 - Electivire - FF102D8B375B.pk7 b/Tests/PKHeX.Core.Tests/Legality/Legal/Generation 7 Transfer/466 - Electivire - FF102D8B375B.pk7 new file mode 100644 index 0000000000000000000000000000000000000000..8b09aff28aa08afb7e0fdc4772d17c51a407b819 GIT binary patch literal 232 zcmazx@785t5cq$Ik%1v4j)7qTKLdjY3j;&J<)mH)B7iGH4nrzKGD8VNCPNtz7Xf(? zki?+PzzJl^$pMW-0rQX7+j#+1Rx