using System.Collections.Generic;
namespace PKHeX.Core
{
///
/// Provides information for and data.
///
public static class Locale3DS
{
///
/// Compares the and to determine if the country is available within that region.
///
/// Console region.
/// Country of nationality
/// Country is within Console Region
public static bool IsConsoleRegionCountryValid(int consoleRegion, int country)
{
return consoleRegion switch
{
0 => (country == 1), // Japan
1 => ((8 <= country && country <= 52) || ExtendedAmericas.Contains(country)), // Americas
2 => ((64 <= country && country <= 127) || ExtendedEurope.Contains(country)), // Europe
4 => (country == 144 || country == 160), // China
5 => (country == 136), // Korea
6 => (country == 144 || country == 128), // Taiwan
_ => false
};
}
private static readonly HashSet ExtendedAmericas = new HashSet { 153, 156, 168, 174, 186 };
private static readonly HashSet ExtendedEurope = new HashSet { 169, 184, 185 };
}
}