diff --git a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade2.cs b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade2.cs index 86e37a0c3..5f06061fe 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade2.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade2.cs @@ -1,6 +1,4 @@ -using static PKHeX.Core.Species; - -namespace PKHeX.Core +namespace PKHeX.Core { public sealed class EncounterTrade2 : EncounterTradeGB { @@ -54,27 +52,6 @@ private bool IsValidTradeOTName(PKM pkm) if (pkm.Korean) return GetOT((int)LanguageID.Korean) == OT; - if (pkm.Format >= 7) - { - switch (Species) - { - case (int)Voltorb: - // Spanish FALCÁN trade loses the accented A on transfer - if (OT == "FALCÁN") - return false; - if (OT == "FALC N") - return true; - break; - case (int)Shuckle: - // Spanish MANÍA trade loses the accented I on transfer - if (OT == "MANÍA") - return false; - if (OT == "MAN A") - return true; - break; - } - } - const int start = (int)LanguageID.English; const int end = (int)LanguageID.Spanish; diff --git a/PKHeX.Core/PKM/Strings/StringConverter12Transporter.cs b/PKHeX.Core/PKM/Strings/StringConverter12Transporter.cs index 705bee7dc..1d7d042ad 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter12Transporter.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter12Transporter.cs @@ -15,14 +15,14 @@ public static class StringConverter12Transporter public static string GetString(byte[] data, bool jp) { var table = jp ? jp_table : us_table; - var chars = GetG1ConvertedChar(data, table, jp ? 1 : 2); + var chars = GetG1ConvertedChar(data, table); if (jp) chars = CheckKata(chars); return string.Concat(chars); } - private static IEnumerable GetG1ConvertedChar(byte[] data, ushort[] table, int lang = -1) + private static IEnumerable GetG1ConvertedChar(byte[] data, ushort[] table) { foreach (var b in data) { @@ -72,10 +72,15 @@ private static bool IsHiragana(IEnumerable chars) private static readonly char[] Katakana = { 'ベ', 'ペ', 'ヘ', 'リ' }; private static readonly char[] Hiragana = { 'べ', 'ぺ', 'へ', 'り' }; - /// /// International 1->7 character translation table /// + /// + /// Exported from Gen1's VC string transferring, with manual modifications for the two permitted accent marks: + ///
0xC1 at arr[0xBF] = Á (Spanish In-game Trade Voltorb, FALCÁN)
+ ///
0xCD at arr[0xC9] = Í (Spanish In-game Trade Shuckle, MANÍA)
+ ///
All other new language sensitive re-mapping (or lack thereof) are inaccessible via the character entry screen.
+ ///
private static readonly ushort[] us_table = { 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, // 0 @@ -89,8 +94,8 @@ private static bool IsHiragana(IEnumerable chars) 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, // 8 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x0028, 0x0029, 0x003A, 0x003B, 0x0028, 0x0029, // 9 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, // A - 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, // B - 0x00C4, 0x00D6, 0x00DC, 0x00E4, 0x00F6, 0x00FC, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, // C + 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00C1, // B + 0x00C4, 0x00D6, 0x00DC, 0x00E4, 0x00F6, 0x00FC, 0x0020, 0x0020, 0x0020, 0x00CD, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, // C 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, // D 0x0020, 0x0050, 0x004D, 0x002D, 0x0020, 0x0020, 0x003F, 0x0021, 0x002D, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0xE08E, // E 0x0020, 0x0078, 0x002E, 0x002F, 0x002C, 0xE08F, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, // F