diff --git a/PKHeX.Core/Legality/Tables/Tables3.cs b/PKHeX.Core/Legality/Tables/Tables3.cs index e8ad4b566..4bc618b6d 100644 --- a/PKHeX.Core/Legality/Tables/Tables3.cs +++ b/PKHeX.Core/Legality/Tables/Tables3.cs @@ -97,36 +97,6 @@ namespace PKHeX.Core internal static readonly bool[] ReleasedHeldItems_3 = GetPermitList(MaxItemID_3, HeldItems_RS, new ushort[] {005}); // Safari Ball - internal static readonly HashSet EReaderBerriesNames_USA = new() - { - // USA Series 1 - "PUMKIN", - "DRASH", - "EGGANT", - "STRIB", - "CHILAN", - "NUTPEA", - }; - - internal static readonly HashSet EReaderBerriesNames_JP = new() - { - // JP Series 1 - "カチャ", // PUMKIN - "ブ-カ", // DRASH - "ビスナ", // EGGANT - "エドマ", // STRIB - "ホズ", // CHILAN - "ラッカ", // NUTPEA - "クオ", // KU - // JP Series 2 - "ギネマ", // GINEMA - "クオ", // KUO - "ヤゴ", // YAGO - "トウガ", // TOUGA - "ニニク", // NINIKU - "トポ" // TOPO - }; - internal static readonly int[] TM_3 = { 264, 337, 352, 347, 046, 092, 258, 339, 331, 237, diff --git a/PKHeX.Core/Saves/Substructures/Gen3/EReaderBerrySettings.cs b/PKHeX.Core/Saves/Substructures/Gen3/EReaderBerrySettings.cs index 070b7fb4d..de6182516 100644 --- a/PKHeX.Core/Saves/Substructures/Gen3/EReaderBerrySettings.cs +++ b/PKHeX.Core/Saves/Substructures/Gen3/EReaderBerrySettings.cs @@ -1,4 +1,5 @@ -using static PKHeX.Core.EReaderBerryMatch; +using System.Collections.Generic; +using static PKHeX.Core.EReaderBerryMatch; namespace PKHeX.Core { @@ -23,7 +24,7 @@ namespace PKHeX.Core if (IsEnigma) // no e-Reader Berry data provided, can't hold berry. return NoData; - var matchUSA = Legal.EReaderBerriesNames_USA.Contains(Name); + var matchUSA = EReaderBerriesNames_USA.Contains(Name); if (matchUSA) { if (Language <= 0) @@ -33,7 +34,7 @@ namespace PKHeX.Core return InvalidUSA; } - var matchJP = Legal.EReaderBerriesNames_JP.Contains(Name); + var matchJP = EReaderBerriesNames_JP.Contains(Name); if (matchJP) { if (Language <= 0) @@ -46,6 +47,36 @@ namespace PKHeX.Core return NoMatch; } + private static readonly HashSet EReaderBerriesNames_USA = new() + { + // USA Series 1 + "PUMKIN", + "DRASH", + "EGGANT", + "STRIB", + "CHILAN", + "NUTPEA", + }; + + private static readonly HashSet EReaderBerriesNames_JP = new() + { + // JP Series 1 + "カチャ", // PUMKIN + "ブ-カ", // DRASH + "ビスナ", // EGGANT + "エドマ", // STRIB + "ホズ", // CHILAN + "ラッカ", // NUTPEA + "クオ", // KU + // JP Series 2 + "ギネマ", // GINEMA + "クオ", // KUO + "ヤゴ", // YAGO + "トウガ", // TOUGA + "ニニク", // NINIKU + "トポ" // TOPO + }; + public static void LoadFrom(SAV3 sav3) { IsEnigma = sav3.IsEBerryIsEnigma;