From 3483b4bb91bb7419536c627eeb089d66d3bde65e Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 24 Nov 2017 10:13:42 -0800 Subject: [PATCH] Clean up vc2 legality/transfer stuff --- PKHeX.Core/Legality/Core.cs | 1 - PKHeX.Core/Legality/Encounters/EncounterGenerator.cs | 4 ++-- PKHeX.Core/PKM/PK2.cs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/Core.cs b/PKHeX.Core/Legality/Core.cs index 77e00be51..aa3814903 100644 --- a/PKHeX.Core/Legality/Core.cs +++ b/PKHeX.Core/Legality/Core.cs @@ -34,7 +34,6 @@ namespace PKHeX.Core /// Setting to specify if an analysis should permit data sourced from the physical cartridge era of GameBoy games. public static bool AllowGBCartEra { get; set; } public static bool AllowGen1Tradeback { get; set; } - public static bool AllowGen2VCTransfer => true; public static bool AllowGen2VCCrystal => false; public static bool AllowGen2Crystal(bool Korean) => !Korean && (AllowGBCartEra || AllowGen2VCCrystal); // Pokemon Crystal was never released in Korea public static bool AllowGen2Crystal(PKM pkm) => AllowGen2Crystal(pkm.Korean); diff --git a/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs b/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs index 7302f9681..0d17ff5d7 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs @@ -180,7 +180,7 @@ namespace PKHeX.Core } private static IEnumerable GenerateFilteredEncounters(PKM pkm) { - bool crystal = pkm.Format == 2 && pkm.Met_Location != 0; + bool crystal = pkm.Format == 2 && pkm.Met_Location != 0 || pkm.Format >= 7 && pkm.OT_Gender == 1; var g1i = new PeekEnumerator(get1().GetEnumerator()); var g2i = new PeekEnumerator(get2().GetEnumerator()); var deferred = new List(); @@ -207,7 +207,7 @@ namespace PKHeX.Core } IEnumerable get2() { - if (!pkm.Gen1_NotTradeback && AllowGen2VCTransfer) + if (!pkm.Gen1_NotTradeback) foreach (var z in GenerateRawEncounters12(pkm, crystal ? GameVersion.C : GameVersion.GSC)) yield return z; } diff --git a/PKHeX.Core/PKM/PK2.cs b/PKHeX.Core/PKM/PK2.cs index afe1a9516..740a9b21b 100644 --- a/PKHeX.Core/PKM/PK2.cs +++ b/PKHeX.Core/PKM/PK2.cs @@ -424,7 +424,7 @@ namespace PKHeX.Core Move2_PP = Move2_PP, Move3_PP = Move3_PP, Move4_PP = Move4_PP, - Met_Location = 30017, + Met_Location = Legal.Transfer2, // "Johto region", hardcoded. Gender = Gender, IsNicknamed = false, AltForm = AltForm,