From fc14a2ec50a23db7253e0ef91ad748f7726a2191 Mon Sep 17 00:00:00 2001 From: javierhimura Date: Thu, 16 Feb 2017 00:05:13 +0100 Subject: [PATCH] Tweks in function InhabitedGeneration to take into account future gen evolutions and GB-GBC transfer --- PKHeX/Legality/Core.cs | 15 ++++++++++++++- PKHeX/Legality/Tables1.cs | 5 +++++ PKHeX/Legality/Tables2.cs | 5 +++++ PKHeX/Legality/Tables3.cs | 5 +++++ PKHeX/Legality/Tables4.cs | 5 +++++ PKHeX/Legality/Tables5.cs | 5 +++++ 6 files changed, 39 insertions(+), 1 deletion(-) diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index 27d5ca64a..41b87e527 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -421,7 +421,20 @@ internal static int getMaxSpeciesOrigin(int generation) default: return -1; } } - + + internal static int[] getFutureGenEvolutions(int generation) + { + switch (generation) + { + case 1: return FutureEvolutionsGen1; + case 2: return FutureEvolutionsGen2; + case 3: return FutureEvolutionsGen3; + case 4: return FutureEvolutionsGen4; + case 5: return FutureEvolutionsGen5; + default: return new int[0]; + } + } + internal static int getMaxSpeciesOrigin(PKM pkm) { if (pkm.Format == 1 || pkm.VC1) // Gen1 VC could not trade with gen 2 yet diff --git a/PKHeX/Legality/Tables1.cs b/PKHeX/Legality/Tables1.cs index 5079716b6..9b52ab7e5 100644 --- a/PKHeX/Legality/Tables1.cs +++ b/PKHeX/Legality/Tables1.cs @@ -114,5 +114,10 @@ public static partial class Legal new EncounterSlot1 {Species = 118, LevelMin = 10, LevelMax = 10, Type = SlotType.Good_Rod, Rate = -1, }, // Goldeen new EncounterSlot1 {Species = 060, LevelMin = 10, LevelMax = 10, Type = SlotType.Good_Rod, Rate = -1, }, // Poliwag }}; + + internal static readonly int[] FutureEvolutionsGen1 = + { + 169,182,186,196,197,199,208,212,230,233,242,462,463,464,465,466,467,470,471,474,700 + }; } } diff --git a/PKHeX/Legality/Tables2.cs b/PKHeX/Legality/Tables2.cs index 27a3a89c5..1c934f4dd 100644 --- a/PKHeX/Legality/Tables2.cs +++ b/PKHeX/Legality/Tables2.cs @@ -36,5 +36,10 @@ public static partial class Legal 10, 00, 00, 00, 00 }; internal static readonly int[] WildPokeBalls2 = { 4 }; + + internal static readonly int[] FutureEvolutionsGen2 = + { + 424,429,430,461,462,463,464,465,466,467,468,469,470,471,472,473,474,700 + }; } } diff --git a/PKHeX/Legality/Tables3.cs b/PKHeX/Legality/Tables3.cs index a136845ca..34cbb69e2 100644 --- a/PKHeX/Legality/Tables3.cs +++ b/PKHeX/Legality/Tables3.cs @@ -82,5 +82,10 @@ public static partial class Legal 590, 591, 592, 593 }; internal static readonly int[] WildPokeBalls3 = {1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12}; + + internal static readonly int[] FutureEvolutionsGen3 = + { + 407,424,429,430,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,700 + }; } } diff --git a/PKHeX/Legality/Tables4.cs b/PKHeX/Legality/Tables4.cs index 8dbfb116b..83f1a9f6f 100644 --- a/PKHeX/Legality/Tables4.cs +++ b/PKHeX/Legality/Tables4.cs @@ -130,5 +130,10 @@ public static partial class Legal 17, 18, 19, 20, 21, 22, // Comp Ball not usable in wild }; + + internal static readonly int[] FutureEvolutionsGen4 = + { + 700 + }; } } diff --git a/PKHeX/Legality/Tables5.cs b/PKHeX/Legality/Tables5.cs index 7c1199c20..723d65860 100644 --- a/PKHeX/Legality/Tables5.cs +++ b/PKHeX/Legality/Tables5.cs @@ -89,5 +89,10 @@ public static partial class Legal // HGSS balls not usable // Dream ball not usable in wild }; + + internal static readonly int[] FutureEvolutionsGen5 = + { + 700 + }; } }