From 036449dfa0ba6d11aedf7474622527b3419e1b87 Mon Sep 17 00:00:00 2001 From: javierhimura Date: Thu, 16 Feb 2017 01:33:17 +0100 Subject: [PATCH] Check future gen evolutions in InhabitedGeneration Return true when format equals generation --- PKHeX/PKM/PKM.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PKHeX/PKM/PKM.cs b/PKHeX/PKM/PKM.cs index 076006eaf..951bb7480 100644 --- a/PKHeX/PKM/PKM.cs +++ b/PKHeX/PKM/PKM.cs @@ -453,7 +453,11 @@ namespace PKHeX.Core if (species < 0) species = Species; - if (Format == 1 && Generation ==2 && Legal.MaxSpeciesID_2 >= species) + if (Format == 1 && Generation ==2 && (Legal.MaxSpeciesID_2 >= species || Legal.FutureEvolutionsGen2.Contains(species))) + return true; + + if (Format == Generation) + //Every pokemon even those with illegal data inhabit the generation of its current format return true; if (Format < Generation) @@ -463,7 +467,7 @@ namespace PKHeX.Core return false; // Sanity Check Species ID - if (Legal.getMaxSpeciesOrigin(GenNumber) < species) + if (Legal.getMaxSpeciesOrigin(GenNumber) < species && !Legal.getFutureGenEvolutions(GenNumber).Contains(species)) return false; int gen = GenNumber;