using static PKHeX.Core.LanguageID;
namespace PKHeX.Core;
///
/// Provides information for and data.
///
/// These values were specific to the 3DS games (Generations 6 and 7, excluding LGP/E)
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) => consoleRegion switch
{
0 => country is 1, // Japan
1 => country is (>= 8 and <= 52) or 153 or 156 or 168 or 174 or 186, // Americas
2 => country is (>= 64 and <= 127) or 169 or 184 or 185, // Europe
4 => country is 144 or 160, // China
5 => country is 136, // Korea
6 => country is 144 or 128, // Taiwan
_ => false,
};
///
/// Compares the and language ID to determine if the language is available within that region.
///
///
/// Used to check for Virtual Console language availability. VC Games were region locked to the Console, meaning not all language games are available.
///
/// Console region.
/// Language of region
/// Language is available within Console Region
public static bool IsRegionLockedLanguageValidVC(int consoleRegion, int language) => consoleRegion switch
{
0 or 6 => language == 1, // Japan & Taiwan
1 => language is (int)English or (int)Spanish or (int)French, // Americas
2 => language is (int)English or (int)Spanish or (int)French or (int)German or (int)Italian, // Europe
5 => language is (int)Korean, // Korea
_ => false, // China & Invalid
};
///
/// Compares the and to determine if the country is available within that region.
///
///
/// Used to check for gift availability.
///
/// Console region.
/// Language of region
/// Language is available within Console Region
public static bool IsRegionLockedLanguageValid(int consoleRegion, int language) => consoleRegion switch
{
0 => language is (int)Japanese, // Japan & Taiwan
1 => language is (int)English or (int)Spanish or (int)French, // Americas
2 => language is (int)English or (int)Spanish or (int)French or (int)German or (int)Italian, // Europe
4 => language is (int)ChineseS or (int)ChineseT, // China
5 => language is (int)Korean, // Korea
6 => language is (int)ChineseS or (int)ChineseT,
_ => false, // China & Invalid
};
}