diff --git a/.gitignore b/.gitignore index e459712f5..b00ec759b 100644 --- a/.gitignore +++ b/.gitignore @@ -210,6 +210,7 @@ $RECYCLE.BIN/ ############# *.resources +pingme.txt ############# diff --git a/PKHeX.Core/Game/GameInfo.cs b/PKHeX.Core/Game/GameInfo.cs index dcfcbdf92..aaeb4593c 100644 --- a/PKHeX.Core/Game/GameInfo.cs +++ b/PKHeX.Core/Game/GameInfo.cs @@ -183,6 +183,8 @@ private void SanitizeItemNames() itemlist[771] += " (3)"; // Meteorite itemlist[772] += " (4)"; // Meteorite itemlist[842] += " (SM)"; // Fishing Rod + itemlist[945] += " (2)"; // Used Solarizer + itemlist[946] += " (2)"; // Used Lunarizer // Append Z-Crystal flagging foreach (var i in Legal.Pouch_ZCrystal_USUM) @@ -315,7 +317,7 @@ public static void InitializeDataSources(GameStrings s) SpeciesDataSource = Util.GetCBList(s.specieslist, null); NatureDataSource = Util.GetCBList(s.natures, null); AbilityDataSource = Util.GetCBList(s.abilitylist, null); - VersionDataSource = Util.GetCBList(s.gamelist, Legal.Games_7sm, Legal.Games_6oras, Legal.Games_6xy, Legal.Games_5, Legal.Games_4, Legal.Games_4e, Legal.Games_4r, Legal.Games_3, Legal.Games_3e, Legal.Games_3r, Legal.Games_3s); + VersionDataSource = Util.GetCBList(s.gamelist, Legal.Games_7usum, Legal.Games_7sm, Legal.Games_6oras, Legal.Games_6xy, Legal.Games_5, Legal.Games_4, Legal.Games_4e, Legal.Games_4r, Legal.Games_3, Legal.Games_3e, Legal.Games_3r, Legal.Games_3s); VersionDataSource.AddRange(Util.GetCBList(s.gamelist, Legal.Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted VersionDataSource.AddRange(Util.GetCBList(s.gamelist, Legal.Games_7vc2).OrderBy(g => g.Value)); // stuff to end unsorted VersionDataSource.AddRange(Util.GetCBList(s.gamelist, Legal.Games_7go).OrderBy(g => g.Value)); // stuff to end unsorted @@ -472,7 +474,7 @@ public static List GetLocationList(GameVersion Version, int SaveForma case GameVersion.GD: case GameVersion.SV: case GameVersion.C: - return MetGen7.Take(3).Concat(MetGen7.Skip(3).OrderByDescending(loc => loc.Value < 200)).ToList(); // Outer Cape + return MetGen7.Take(3).Concat(MetGen7.Skip(3).OrderByDescending(loc => loc.Value < 234)).ToList(); // Dividing Peak Tunnel } // Currently on a future game, return corresponding list for generation diff --git a/PKHeX.Core/Legality/Analysis.cs b/PKHeX.Core/Legality/Analysis.cs index bca707451..1ad901904 100644 --- a/PKHeX.Core/Legality/Analysis.cs +++ b/PKHeX.Core/Legality/Analysis.cs @@ -294,7 +294,7 @@ private void UpdateChecks() } private string GetLegalityReport() { - if (!Parsed || pkm == null) + if (!Parsed || pkm == null || Info == null) return V189; var lines = new List(); @@ -323,7 +323,7 @@ private string GetLegalityReport() } private string GetVerboseLegalityReport() { - if (!Parsed || pkm == null) + if (!Parsed || pkm == null || Info == null) return V189; const string separator = "==="; diff --git a/PKHeX.Core/Legality/Checks.cs b/PKHeX.Core/Legality/Checks.cs index 40bf9a4cf..e654bbaf1 100644 --- a/PKHeX.Core/Legality/Checks.cs +++ b/PKHeX.Core/Legality/Checks.cs @@ -324,9 +324,9 @@ private void VerifyNicknameTrade() { case 1: case 2: VerifyTrade12(); return; - case 3: VerifyTrade3(); return; // todo + case 3: VerifyTrade3(); return; case 4: VerifyTrade4(); return; - case 5: VerifyTrade5(); return; // todo + case 5: VerifyTrade5(); return; case 6: VerifyTrade6(); return; case 7: VerifyTrade7(); return; } @@ -1170,7 +1170,7 @@ private void VerifyBall() return; } - if (pkm.Ball == 0x14 && pkm.Gen7) // Heavy Ball + if (pkm.Ball == 0x14 && !Info.EncounterMatch.EggEncounter && pkm.SM) // Heavy Ball { var lineage = Legal.GetLineage(pkm); if (lineage.Any(e => Legal.AlolanCaptureNoHeavyBall.Contains(e))) @@ -1977,13 +1977,6 @@ private void VerifyForm() return; } break; - case 718: // Zygarde - if (pkm.AltForm >= 4) - { - AddLine(Severity.Invalid, V310, CheckIdentifier.Form); - return; - } - break; case 773: // Silvally { int item = pkm.HeldItem; @@ -1996,13 +1989,6 @@ private void VerifyForm() AddLine(Severity.Valid, V309, CheckIdentifier.Form); break; } - case 774: // Minior - if (pkm.AltForm < 7) - { - AddLine(Severity.Invalid, V310, CheckIdentifier.Form); - return; - } - break; // Party Only Forms case 492: // Shaymin @@ -2014,6 +2000,17 @@ private void VerifyForm() return; } break; + + // Battle only Forms with other legal forms allowed + case 718 when pkm.AltForm >= 4: // Zygarde Complete + case 774 when pkm.AltForm < 7: // Minior Shield + case 800 when pkm.AltForm == 3: // Ultra Necrozma + AddLine(Severity.Invalid, V310, CheckIdentifier.Form); + return; + case 800 when pkm.AltForm < 3: // Necrozma Fused forms & default + case 778 when pkm.AltForm == 2: // Totem disguise Mimikyu + AddLine(Severity.Valid, V315, CheckIdentifier.Form); + return; } if (pkm.Format >= 7 && Info.Generation < 7 && pkm.AltForm != 0) diff --git a/PKHeX.Core/Legality/Core.cs b/PKHeX.Core/Legality/Core.cs index 40e1b52b3..6ef757beb 100644 --- a/PKHeX.Core/Legality/Core.cs +++ b/PKHeX.Core/Legality/Core.cs @@ -918,7 +918,7 @@ internal static IEnumerable GetEncounterStaticTable(PKM pkm, Ga case GameVersion.US: return StaticUS; case GameVersion.UM: return StaticUM; - default: return new EncounterStatic[0]; + default: return Enumerable.Empty(); } } internal static IEnumerable GetEncounterTable(PKM pkm, GameVersion gameSource = GameVersion.Any) @@ -969,7 +969,7 @@ internal static IEnumerable GetEncounterTable(PKM pkm, GameVersio case GameVersion.US: return SlotsUS; case GameVersion.UM: return SlotsUM; - default: return new EncounterArea[0]; + default: return Enumerable.Empty(); } } private static IEnumerable GetEncounterStaticTableGSC(PKM pkm) @@ -1014,7 +1014,7 @@ internal static IEnumerable GetDexNavAreas(PKM pkm) case (int)GameVersion.OR: return SlotsO.Where(l => l.Location == pkm.Met_Location); default: - return new EncounterArea[0]; + return Enumerable.Empty(); } } @@ -1157,7 +1157,7 @@ private static bool IsEvolvedFormChange(PKM pkm) if (pkm.IsEgg) return false; - if (pkm.Format >= 7 && EvolveToAlolanForms.Contains(pkm.Species)) + if (pkm.Format >= 7 && AlolanVariantEvolutions12.Contains(pkm.Species)) return pkm.AltForm == 1; if (pkm.Species == 678 && pkm.Gender == 1) return pkm.AltForm == 1; @@ -1249,9 +1249,7 @@ internal static bool IsFormChangeable(PKM pkm, int species) if (IsEvolvedFormChange(pkm)) return true; if (pkm.Species == 718 && pkm.InhabitedGeneration(7) && pkm.AltForm != 1) - { return true; - } return false; } @@ -1694,12 +1692,22 @@ private static IEnumerable GetValidMoves(PKM pkm, GameVersion Version, DexL if (pkm.Format <= 3) return r.Distinct(); if (LVL) - { - if (species == 479 && Generation >= 4) // Rotom - r.Add(RotomMoves[pkm.AltForm]); - - if (species == 718 && Generation == 7) // Zygarde - r.AddRange(ZygardeMoves); + { + switch (species) + { + case 479 when Generation >= 4: // rotom + r.Add(RotomMoves[pkm.AltForm]); + break; + case 718 when Generation == 7: // zygarde + r.AddRange(ZygardeMoves); + break; + case 800 when pkm.AltForm == 1: // Sun Necrozma + r.Add(713); + break; + case 800 when pkm.AltForm == 2: // Moon Necrozma + r.Add(714); + break; + } } if (Tutor) { @@ -2202,10 +2210,10 @@ internal static IEnumerable GetTutorMoves(PKM pkm, int species, int form, b } return moves.Distinct(); - IEnumerable GetTutors(PersonalTable t, IReadOnlyList tutors) + IEnumerable GetTutors(PersonalTable t, params int[][] tutors) { var pi = t.GetFormeEntry(species, form); - for (int i = 0; i < tutors.Count; i++) + for (int i = 0; i < tutors.Length; i++) for (int b = 0; b < tutors[i].Length; b++) if (pi.SpecialTutors[i][b]) yield return tutors[i][b]; diff --git a/PKHeX.Core/Legality/Encounters/Data/Encounters7.cs b/PKHeX.Core/Legality/Encounters/Data/Encounters7.cs index 1cfbc7f6c..4a5c815fd 100644 --- a/PKHeX.Core/Legality/Encounters/Data/Encounters7.cs +++ b/PKHeX.Core/Legality/Encounters/Data/Encounters7.cs @@ -31,10 +31,14 @@ static Encounters7() var REG_US = GetEncounterTables(GameVersion.US); var REG_UM = GetEncounterTables(GameVersion.UM); + var SOS_US = GetEncounterTables("uu", "us_sos"); + var SOS_UM = GetEncounterTables("uu", "um_sos"); MarkG7REGSlots(ref REG_US); MarkG7REGSlots(ref REG_UM); - SlotsUS = AddExtraTableSlots(REG_US); - SlotsUM = AddExtraTableSlots(REG_UM); + MarkG7SMSlots(ref SOS_US); + MarkG7SMSlots(ref SOS_UM); + SlotsUS = AddExtraTableSlots(REG_US, SOS_US, Encounter_Pelago_SM, Encounter_Pelago_SN); + SlotsUM = AddExtraTableSlots(REG_UM, SOS_UM, Encounter_Pelago_SM, Encounter_Pelago_MN); } private static void MarkG7REGSlots(ref EncounterArea[] Areas) { @@ -67,8 +71,8 @@ private static void MarkG7SMSlots(ref EncounterArea[] Areas) new EncounterStatic { Gift = true, Species = 133, Level = 1, EggLocation = 60002, }, // Eevee @ Nursery helpers new EncounterStatic { Gift = true, Species = 137, Level = 30, Location = 116, }, // Porygon @ Route 15 new EncounterStatic { Gift = true, Species = 772, Level = 40, Location = 188, IV3 = true, }, // Type: Null - new EncounterStatic { Gift = true, Species = 789, Level = 5, Location = 142, Shiny = false, IV3 = true, Version = GameVersion.SN}, // Cosmog 00 FF - new EncounterStatic { Gift = true, Species = 789, Level = 5, Location = 144, Shiny = false, IV3 = true, Version = GameVersion.MN}, // Cosmog 00 FF + new EncounterStatic { Gift = true, Species = 789, Level = 5, Location = 142, Shiny = false, Ability = 2, IV3 = true, Version = GameVersion.SN }, // Cosmog + new EncounterStatic { Gift = true, Species = 789, Level = 5, Location = 144, Shiny = false, Ability = 2, IV3 = true, Version = GameVersion.MN }, // Cosmog new EncounterStatic { Gift = true, Species = 142, Level = 40, Location = 172, }, // Aerodactyl @ Seafolk Village new EncounterStatic { Gift = true, Species = 718, Form = 0, Level = 30, Shiny = false, Location = 118, IV3 = true, }, // Zygarde @@ -83,7 +87,7 @@ private static void MarkG7SMSlots(ref EncounterArea[] Areas) new EncounterStatic // Magearna (Bottle Cap) 00 FF { - Gift = true, Species = 801, Level = 50, Location = 40001, Shiny = false, IV3 = true, + Gift = true, Species = 801, Level = 50, Location = 40001, Shiny = false, IV3 = true, HeldItem = 795, Ability = 2, Fateful = true, RibbonWishing = true, Relearn = new [] {705, 430, 381, 270}, Ball = 0x10, // Cherish }, @@ -164,11 +168,209 @@ private static void MarkG7SMSlots(ref EncounterArea[] Areas) }; private static readonly EncounterStatic[] Encounter_USUM = { + new EncounterStatic { Gift = true, Species = 722, Level = 05, Location = 8, }, // Rowlet + new EncounterStatic { Gift = true, Species = 725, Level = 05, Location = 8, }, // Litten + new EncounterStatic { Gift = true, Species = 728, Level = 05, Location = 8, }, // Popplio + new EncounterStatic { Gift = true, Species = 138, Level = 15, Location = 58, }, // Omanyte + new EncounterStatic { Gift = true, Species = 140, Level = 15, Location = 58, }, // Kabuto + new EncounterStatic { Gift = true, Species = 142, Level = 15, Location = 58, }, // Aerodactyl + new EncounterStatic { Gift = true, Species = 345, Level = 15, Location = 58, }, // Lileep + new EncounterStatic { Gift = true, Species = 347, Level = 15, Location = 58, }, // Anorith + new EncounterStatic { Gift = true, Species = 408, Level = 15, Location = 58, }, // Cranidos + new EncounterStatic { Gift = true, Species = 410, Level = 15, Location = 58, }, // Shieldon + new EncounterStatic { Gift = true, Species = 564, Level = 15, Location = 58, }, // Tirtouga + new EncounterStatic { Gift = true, Species = 566, Level = 15, Location = 58, }, // Archen + new EncounterStatic { Gift = true, Species = 696, Level = 15, Location = 58, }, // Tyrunt + new EncounterStatic { Gift = true, Species = 698, Level = 15, Location = 58, }, // Amaura + new EncounterStatic { Gift = true, Species = 133, Level = 01, EggLocation = 60002, }, // Eevee @ Nursery helpers + new EncounterStatic { Gift = true, Species = 137, Level = 30, Location = 116, }, // Porygon @ Route 15 + new EncounterStatic { Gift = true, Species = 772, Level = 60, Location = 188, IV3 = true, }, // Type: Null @ Aether Paradise + new EncounterStatic { Gift = true, Species = 772, Level = 60, Location = 160, IV3 = true, }, // Type: Null @ Ancient Poni Path + new EncounterStatic { Gift = true, Species = 789, Level = 05, Location = 142, IV3 = true, Shiny = false, Ability = 2, Version = GameVersion.US }, // Cosmog @ Lake of the Sunne + new EncounterStatic { Gift = true, Species = 789, Level = 05, Location = 144, IV3 = true, Shiny = false, Ability = 2, Version = GameVersion.UM }, // Cosmog @ Lake of the Moone + new EncounterStatic { Gift = true, Species = 142, Level = 40, Location = 172, }, // Aerodactyl @ Seafolk Village + new EncounterStatic { Gift = true, Species = 025, Level = 40, Location = 070, IV3 = true, HeldItem = 796, Relearn = new[] {57,0,0,0} }, // Pikachu @ Heahea City + new EncounterStatic { Gift = true, Species = 803, Level = 40, Location = 208, IV3 = true,}, // Poipole @ Megalo Tower + new EncounterStatic { Gift = true, Species = 803, Level = 40, Location = 206, IV3 = true,}, // Poipole @ Ultra Megalopolis + // Totem-Sized Gifts @ Heahea Beach + new EncounterStatic { Gift = true, Species = 735, Level = 20, Ability = 4, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.US }, // Gumshoos + new EncounterStatic { Gift = true, Species = 020, Level = 20, Ability = 4, Location = 202, Form = 2, Shiny = false, IV3 = true, Version = GameVersion.UM }, // Raticate + new EncounterStatic { Gift = true, Species = 105, Level = 25, Ability = 4, Location = 202, Form = 2, Shiny = false, IV3 = true, Version = GameVersion.US }, // Marowak + new EncounterStatic { Gift = true, Species = 752, Level = 25, Ability = 1, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.UM }, // Araquanid + new EncounterStatic { Gift = true, Species = 754, Level = 30, Ability = 2, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.US }, // Lurantis + new EncounterStatic { Gift = true, Species = 758, Level = 30, Ability = 1, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.UM }, // Salazzle + new EncounterStatic { Gift = true, Species = 738, Level = 35, Ability = 1, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.US }, // Vikavolt + new EncounterStatic { Gift = true, Species = 777, Level = 35, Ability = 4, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.UM }, // Togedemaru + new EncounterStatic { Gift = true, Species = 778, Level = 40, Ability = 1, Location = 202, Form = 2, Shiny = false, IV3 = true, }, // Mimikyu + new EncounterStatic { Gift = true, Species = 743, Level = 50, Ability = 4, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.US }, // Ribombee + new EncounterStatic { Gift = true, Species = 784, Level = 50, Ability = 4, Location = 202, Form = 1, Shiny = false, IV3 = true, Version = GameVersion.UM }, // Kommo-o + + new EncounterStatic { Gift = true, Species = 718, Level = 63, Ability = 1, Location = 118, Form = 1, Shiny = false, IV3 = true, }, // Zygarde @ Route 16 + + new EncounterStatic // Magearna (Bottle Cap) + { + Gift = true, Species = 801, Level = 50, Location = 40001, Shiny = false, IV3 = true, HeldItem = 795, Ability = 2, + Fateful = true, RibbonWishing = true, Relearn = new [] {705, 430, 381, 270}, Ball = 0x10, // Cherish + }, + new EncounterStatic // Pikachu (Pretty Wing), should probably be a fake mystery gift as it has OT details + { + Gift = true, Species = 25, Level = 21, Location = 40005, Shiny = false, Form = 7, HeldItem = 571, Ability = 1, + Fateful = true, RibbonWishing = true, Relearn = new[] {85, 98, 87, 231}, Nature = Nature.Hardy, + }, + + new EncounterStatic { Gift = true, Species = 718, Form = 0, Level = 50, Shiny = false, Location = 118, IV3 = true, }, // Zygarde + new EncounterStatic { Gift = true, Species = 718, Form = 1, Level = 50, Shiny = false, Location = 118, IV3 = true, }, // Zygarde + new EncounterStatic { Gift = true, Species = 718, Form = 2, Level = 50, Shiny = false, Location = 118, IV3 = true, }, // Zygarde + new EncounterStatic { Gift = true, Species = 718, Form = 3, Level = 50, Shiny = false, Location = 118, IV3 = true, }, // Zygarde + + new EncounterStatic { Species = 791, Level = 60, Location = 028, Ability = 1, Shiny = false, IV3 = true, Relearn = new[] {713,322,242,428}, Version = GameVersion.US }, // Solgaleo @ Mahalo Trail (Plank Bridge) + new EncounterStatic { Species = 792, Level = 60, Location = 028, Ability = 1, Shiny = false, IV3 = true, Relearn = new[] {714,322,539,585}, Version = GameVersion.UM }, // Lunala @ Mahalo Trail (Plank Bridge) + + // QR Scan: Su/M/Tu/W/Th/F/Sa + // Melemele Island + new EncounterStatic { Species = 004, Level = 12, Location = 010, Relearn = new[] {068,108,052,010}, }, // Charmander @ Route 3 + new EncounterStatic { Species = 007, Level = 12, Location = 042, Relearn = new[] {453,110,055,033}, }, // Squirtle @ Seaward Cave + new EncounterStatic { Species = 095, Level = 14, Location = 034, Relearn = new[] {563,099,317,088}, }, // Onix @ Ten Carat Hill + new EncounterStatic { Species = 116, Level = 18, Location = 014, Relearn = new[] {352,239,055,043}, }, // Horsea @ Kala'e Bay + new EncounterStatic { Species = 664, Level = 09, Location = 020, Relearn = new[] {476,081,078,033}, }, // Scatterbug @ Hau'oli City + new EncounterStatic { Species = 001, Level = 10, Location = 012, Relearn = new[] {580,022,045,033}, }, // Bulbasaur @ Route 2 + new EncounterStatic { Species = 607, Level = 09, Location = 038, Relearn = new[] {203,052,083,123}, }, // Litwick @ Hau'oli Cemetery + + // Akala Island + new EncounterStatic { Species = 280, Level = 17, Location = 054, Relearn = new[] {581,345,381,574}, }, // Ralts @ Route 6 + new EncounterStatic { Species = 363, Level = 19, Location = 056, Relearn = new[] {187,362,301,227}, }, // Spheal @ Route 7 + new EncounterStatic { Species = 256, Level = 20, Location = 058, Relearn = new[] {067,488,064,028}, }, // Combusken @ Route 8 + new EncounterStatic { Species = 679, Level = 24, Location = 094, Relearn = new[] {469,332,425,475}, }, // Honedge @ Akala Outskirts + new EncounterStatic { Species = 015, Level = 14, Location = 050, Relearn = new[] {099,031,041,000}, }, // Beedrill @ Route 4 + new EncounterStatic { Species = 253, Level = 16, Location = 052, Relearn = new[] {580,072,098,071}, }, // Grovyle @ Route 5 + new EncounterStatic { Species = 259, Level = 17, Location = 086, Relearn = new[] {068,193,189,055}, }, // Marshtomp @ Brooklet Hill + + // Ula'ula Island + new EncounterStatic { Species = 111, Level = 32, Location = 138, Relearn = new[] {470,350,498,523}, }, // Rhyhorn @ Blush Mountain + new EncounterStatic { Species = 220, Level = 33, Location = 114, Relearn = new[] {333,036,420,196}, }, // Swinub @ Tapu Village + new EncounterStatic { Species = 394, Level = 35, Location = 118, Relearn = new[] {681,362,031,117}, }, // Prinplup @ Route 16 + new EncounterStatic { Species = 388, Level = 36, Location = 128, Relearn = new[] {484,073,072,044}, }, // Grotle @ Ula'ula Meadow + new EncounterStatic { Species = 018, Level = 29, Location = 106, Relearn = new[] {211,297,239,098}, }, // Pidgeot @ Route 10 + new EncounterStatic { Species = 391, Level = 29, Location = 108, Relearn = new[] {612,172,154,259}, }, // Monferno @ Route 11 + new EncounterStatic { Species = 610, Level = 30, Location = 136, Relearn = new[] {068,337,206,163}, }, // Axew @ Mount Hokulani + + // Poni Island + new EncounterStatic { Species = 604, Level = 55, Location = 164, Relearn = new[] {242,435,029,306}, }, // Eelektross @ Poni Grove + new EncounterStatic { Species = 306, Level = 57, Location = 166, Relearn = new[] {179,484,038,334}, }, // Aggron @ Poni Plains + new EncounterStatic { Species = 479, Level = 61, Location = 170, Relearn = new[] {268,506,486,164}, }, // Rotom @ Poni Gauntlet + new EncounterStatic { Species = 542, Level = 57, Location = 156, Relearn = new[] {580,437,014,494}, }, // Leavanny @ Poni Meadow + new EncounterStatic { Species = 652, Level = 45, Location = 184, Relearn = new[] {191,341,402,596}, }, // Chesnaught @ Exeggutor Island + new EncounterStatic { Species = 658, Level = 44, Location = 158, Relearn = new[] {516,164,185,594}, }, // Greninja @ Poni Wilds + new EncounterStatic { Species = 655, Level = 44, Location = 160, Relearn = new[] {273,473,113,595}, }, // Delphox @ Ancient Poni Path + + new EncounterStatic { Species = 785, Level = 60, Location = 030, Ability = 1, Shiny = false, IV3 = true, }, // Tapu Koko @ Ruins of Conflict + new EncounterStatic { Species = 786, Level = 60, Location = 092, Ability = 1, Shiny = false, IV3 = true, }, // Tapu Lele @ Ruins of Life + new EncounterStatic { Species = 787, Level = 60, Location = 140, Ability = 1, Shiny = false, IV3 = true, }, // Tapu Bulu @ Ruins of Abundance + new EncounterStatic { Species = 788, Level = 60, Location = 180, Ability = 1, Shiny = false, IV3 = true, }, // Tapu Fini @ Ruins of Hope + + new EncounterStatic { Species = 023, Level = 10, Location = 012, Ability = 1, }, // Ekans @ Route 2 + + new EncounterStatic { Species = 736, Level = 04, Location = 008, Ability = 1, Shiny = false, }, // Grubbin @ Route 1 + new EncounterStatic { Species = 127, Level = 42, Location = 184, Shiny = false, }, // Pinsir @ Exeggutor Island + new EncounterStatic { Species = 127, Level = 43, Location = 184, Shiny = false, }, // Pinsir @ Exeggutor Island + new EncounterStatic { Species = 800, Level = 65, Location = 146, Ability = 1, Shiny = false, IV3 = true, Relearn = new[] {722,334,408,400}, HeldItem = 923, }, // Necrozma @ Mount Lanakila + + // Legendaries @ Ultra Space Wilds + new EncounterStatic { Species = 144, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {246,573,115,258}, }, // Articuno + new EncounterStatic { Species = 145, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {246,435,365,240}, }, // Zapdos + new EncounterStatic { Species = 146, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {246,053,403,241}, }, // Moltres + new EncounterStatic { Species = 150, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {094,105,129,427}, }, // Mewtwo + new EncounterStatic { Species = 243, Level = 60, Location = 222, Ability = 1, IV3 = true, Version = GameVersion.US }, // Raikou + new EncounterStatic { Species = 244, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {023,044,207,436}, Version = GameVersion.UM }, // Entei + new EncounterStatic { Species = 245, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {061,062,054,240}, }, // Suicune + new EncounterStatic { Species = 249, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {285,177,326,246}, Version = GameVersion.UM }, // Lugia + new EncounterStatic { Species = 250, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {682,221,326,246}, HeldItem = 044, Version = GameVersion.US }, // Ho-Oh + new EncounterStatic { Species = 377, Level = 60, Location = 222, Ability = 1, IV3 = true, }, // Regirock + new EncounterStatic { Species = 378, Level = 60, Location = 222, Ability = 1, IV3 = true, }, // Regice + new EncounterStatic { Species = 379, Level = 60, Location = 222, Ability = 1, IV3 = true, }, // Registeel + new EncounterStatic { Species = 380, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {296,406,375,273}, Gender = 1, Version = GameVersion.UM }, // Latias + new EncounterStatic { Species = 381, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {295,406,375,225}, Gender = 0, Version = GameVersion.US }, // Latios + new EncounterStatic { Species = 382, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {058,618,347,330}, Version = GameVersion.UM }, // Kyogre + new EncounterStatic { Species = 383, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {089,619,339,076}, Version = GameVersion.US }, // Groudon + new EncounterStatic { Species = 384, Level = 60, Location = 222, Ability = 1, IV3 = true, }, // Rayquaza + new EncounterStatic { Species = 480, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {326,281,133,129}, }, // Uxie + new EncounterStatic { Species = 481, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {326,204,248,129}, }, // Mesprit + new EncounterStatic { Species = 482, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {326,417,253,129}, }, // Azelf + new EncounterStatic { Species = 483, Level = 60, Location = 222, Ability = 1, IV3 = true, Version = GameVersion.US }, // Dialga + new EncounterStatic { Species = 484, Level = 60, Location = 222, Ability = 1, IV3 = true, Version = GameVersion.UM }, // Palkia + new EncounterStatic { Species = 485, Level = 60, Location = 222, Ability = 1, IV3 = true, Version = GameVersion.US }, // Heatran + new EncounterStatic { Species = 486, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {428,279,146,109}, Version = GameVersion.UM }, // Regigigas + new EncounterStatic { Species = 487, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {467,396,414,337}, }, // Giratina + new EncounterStatic { Species = 488, Level = 60, Location = 222, Ability = 1, IV3 = true, Gender = 1, }, // Cresselia + new EncounterStatic { Species = 638, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {533,014,098,442}, }, // Cobalion + new EncounterStatic { Species = 639, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {533,014,157,444}, }, // Terrakion + new EncounterStatic { Species = 640, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {533,014,202,348}, }, // Virizion + new EncounterStatic { Species = 641, Level = 60, Location = 222, Ability = 1, IV3 = true, Gender = 0, Version = GameVersion.US }, // Tornadus + new EncounterStatic { Species = 642, Level = 60, Location = 222, Ability = 1, IV3 = true, Gender = 0, Version = GameVersion.UM }, // Thundurus + new EncounterStatic { Species = 643, Level = 60, Location = 222, Ability = 1, IV3 = true, Version = GameVersion.US }, // Reshiram + new EncounterStatic { Species = 644, Level = 60, Location = 222, Ability = 1, IV3 = true, Version = GameVersion.UM }, // Zekrom + new EncounterStatic { Species = 645, Level = 60, Location = 222, Ability = 1, IV3 = true, Gender = 0, }, // Landorus + new EncounterStatic { Species = 646, Level = 60, Location = 222, Ability = 1, IV3 = true, }, // Kyurem + new EncounterStatic { Species = 716, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {601,532,400,585}, Version = GameVersion.US }, // Xerneas + new EncounterStatic { Species = 717, Level = 60, Location = 222, Ability = 1, IV3 = true, Relearn = new[] {613,399,566,094}, Version = GameVersion.UM }, // Yveltal + + new EncounterStatic { Species = 334, Level = 60, Location = 222, IV3 = true, }, // Altaria @ Ultra Space Wilds + new EncounterStatic { Species = 469, Level = 60, Location = 222, IV3 = true, }, // Yanmega @ Ultra Space Wilds + new EncounterStatic { Species = 561, Level = 60, Location = 222, IV3 = true, }, // Sigilyph @ Ultra Space Wilds + new EncounterStatic { Species = 581, Level = 60, Location = 222, IV3 = true, }, // Swanna @ Ultra Space Wilds + new EncounterStatic { Species = 277, Level = 60, Location = 222, IV3 = true, }, // Swellow @ Ultra Space Wilds + new EncounterStatic { Species = 452, Level = 60, Location = 222, IV3 = true, }, // Drapion @ Ultra Space Wilds + new EncounterStatic { Species = 531, Level = 60, Location = 222, IV3 = true, }, // Audino @ Ultra Space Wilds + new EncounterStatic { Species = 695, Level = 60, Location = 222, IV3 = true, }, // Heliolisk @ Ultra Space Wilds + new EncounterStatic { Species = 274, Level = 60, Location = 222, IV3 = true, }, // Nuzleaf @ Ultra Space Wilds + new EncounterStatic { Species = 326, Level = 60, Location = 222, IV3 = true, }, // Grumpig @ Ultra Space Wilds + new EncounterStatic { Species = 460, Level = 60, Location = 222, IV3 = true, }, // Abomasnow @ Ultra Space Wilds + new EncounterStatic { Species = 308, Level = 60, Location = 222, IV3 = true, }, // Medicham @ Ultra Space Wilds + new EncounterStatic { Species = 450, Level = 60, Location = 222, IV3 = true, }, // Hippowdon @ Ultra Space Wilds + new EncounterStatic { Species = 558, Level = 60, Location = 222, IV3 = true, }, // Crustle @ Ultra Space Wilds + new EncounterStatic { Species = 219, Level = 60, Location = 222, IV3 = true, }, // Magcargo @ Ultra Space Wilds + new EncounterStatic { Species = 689, Level = 60, Location = 222, IV3 = true, }, // Barbaracle @ Ultra Space Wilds + new EncounterStatic { Species = 271, Level = 60, Location = 222, IV3 = true, }, // Lombre @ Ultra Space Wilds + new EncounterStatic { Species = 618, Level = 60, Location = 222, IV3 = true, }, // Stunfisk @ Ultra Space Wilds + new EncounterStatic { Species = 419, Level = 60, Location = 222, IV3 = true, }, // Floatzel @ Ultra Space Wilds + new EncounterStatic { Species = 195, Level = 60, Location = 222, IV3 = true, }, // Quagsire @ Ultra Space Wilds + + new EncounterStatic { Species = 793, Level = 60, Location = 190, Ability = 1, IV3 = true, Relearn = new[] {408,491,446,243}, }, // Nihilego @ Ultra Deep Sea + new EncounterStatic { Species = 794, Level = 60, Location = 218, Ability = 1, IV3 = true, Version = GameVersion.US }, // Buzzwole @ Ultra Jungle + new EncounterStatic { Species = 795, Level = 60, Location = 214, Ability = 1, IV3 = true, Version = GameVersion.UM }, // Pheromosa @ Ultra Desert + new EncounterStatic { Species = 796, Level = 60, Location = 210, Ability = 1, IV3 = true, }, // Xurkitree @ Ultra Plant + new EncounterStatic { Species = 797, Level = 60, Location = 212, Ability = 1, IV3 = true, Version = GameVersion.UM }, // Celesteela @ Ultra Crater + new EncounterStatic { Species = 798, Level = 60, Location = 216, Ability = 1, IV3 = true, Version = GameVersion.US }, // Kartana @ Ultra Forest + new EncounterStatic { Species = 799, Level = 60, Location = 220, Ability = 1, IV3 = true, }, // Guzzlord @ Ultra Ruin + new EncounterStatic { Species = 760, Level = 28, Location = -01, Shiny = false, }, // Bewear @ ??? + new EncounterStatic { Species = 097, Level = 29, Location = 020, Shiny = false, Relearn = new[] {095,171,139,029}, }, // Hypno @ Hau'oli City Police Station + new EncounterStatic { Species = 097, Level = 29, Location = 020, Shiny = false, Relearn = new[] {417,060,050,139}, }, // Hypno @ Hau'oli City Police Station + new EncounterStatic { Species = 097, Level = 29, Location = 020, Shiny = false, Relearn = new[] {093,050,001,096}, }, // Hypno @ Hau'oli City Police Station + new EncounterStatic { Species = 092, Level = 19, Location = 230, Shiny = false, Relearn = new[] {174,109,122,101}, }, // Gastly @ Route 1 (Trainers’ School) + new EncounterStatic { Species = 425, Level = 19, Location = 230, Shiny = false, Relearn = new[] {310,132,016,371}, }, // Drifloon @ Route 1 (Trainers’ School) + new EncounterStatic { Species = 769, Level = 30, Location = 116, Shiny = false, Relearn = new[] {310,523,072,328}, }, // Sandygast @ Route 15 + new EncounterStatic { Species = 592, Level = 34, Location = 126, Shiny = false, Gender = 1, }, // Frillish @ Route 14 + new EncounterStatic { Species = 132, Level = 29, Location = 060, IVs = new[] {-1,-1,31,30,-1,00}, Nature = Nature.Bold }, // Ditto @ Route 9 + new EncounterStatic { Species = 132, Level = 29, Location = 072, IVs = new[] {-1,-1,30,30,-1,31}, Nature = Nature.Jolly }, // Ditto @ Konikoni City + new EncounterStatic { Species = 132, Level = 29, Location = 072, IVs = new[] {-1,31,30,-1,-1,30}, Nature = Nature.Adamant }, // Ditto @ Konikoni City + new EncounterStatic { Species = 132, Level = 29, Location = 072, IVs = new[] {-1,00,-1,31,30,-1}, Nature = Nature.Modest }, // Ditto @ Konikoni City + new EncounterStatic { Species = 132, Level = 29, Location = 072, IVs = new[] {-1,30,-1,-1,30,31}, Nature = Nature.Timid }, // Ditto @ Konikoni City + new EncounterStatic { Species = 718, Level = 60, Location = 182, Ability = 1, Shiny = false, IV3 = true, Relearn = new[] {616,137,219,225}, }, // Zygarde @ Resolution Cave + new EncounterStatic { Species = 805, Level = 60, Location = 164, Ability = 1, IV3 = true, Version = GameVersion.UM }, // Stakataka @ Poni Grove + new EncounterStatic { Species = 806, Level = 60, Location = 164, Ability = 1, IV3 = true, Version = GameVersion.US }, // Blacephalon @ Poni Grove + new EncounterStatic { Species = 101, Level = 60, Location = 224, Ability = 1, Shiny = false, }, // Electrode @ Team Rocket's Castle }; internal static readonly EncounterTrade[] TradeGift_USUM = { - + // Trades - 4.bin + new EncounterTrade { Species = 701, Form = 0, Level = 08, Ability = 2, TID = 00410, SID = 00000, IVs = new[] {-1,31,-1,-1,-1,-1}, OTGender = 1, Gender = 0, Nature = Nature.Brave, }, // Hawlucha + new EncounterTrade { Species = 714, Form = 0, Level = 19, Ability = 1, TID = 20683, SID = 00009, IVs = new[] {-1,-1,-1,-1,31,-1}, OTGender = 0, Gender = 1, Nature = Nature.Modest, }, // Noibat + new EncounterTrade { Species = 339, Form = 0, Level = 21, Ability = 2, TID = 01092, SID = 00009, IVs = new[] {31,-1,-1,-1,-1,-1}, OTGender = 0, Gender = 1, Nature = Nature.Naughty, }, // Barboach + new EncounterTrade { Species = 024, Form = 0, Level = 22, Ability = 1, TID = 10913, SID = 00000, IVs = new[] {-1,-1,31,-1,-1,-1}, OTGender = 1, Gender = 1, Nature = Nature.Impish, }, // Arbok + new EncounterTrade { Species = 708, Form = 0, Level = 33, Ability = 1, TID = 20778, SID = 00009, IVs = new[] {-1,-1,-1,-1,-1,31}, OTGender = 0, Gender = 0, Nature = Nature.Calm, EvolveOnTrade = true }, // Phantump + new EncounterTrade { Species = 422, Form = 0, Level = 44, Ability = 2, TID = 20679, SID = 00009, IVs = new[] {-1,-1,31,-1,-1,-1}, OTGender = 1, Gender = 1, Nature = Nature.Quiet, }, // Shellos + new EncounterTrade { Species = 128, Form = 0, Level = 59, Ability = 1, TID = 56734, SID = 00008, IVs = new[] {-1,-1,-1,31,-1,-1}, OTGender = 0, Gender = 0, Nature = Nature.Jolly, }, // Tauros }; internal static readonly string[][] TradeSM = { @@ -186,7 +388,17 @@ private static void MarkG7SMSlots(ref EncounterArea[] Areas) }; internal static readonly string[][] TradeUSUM = { - // todo + new string[0], // 0 - None + Util.GetStringList("tradeusum", "ja"), // 1 + Util.GetStringList("tradeusum", "en"), // 2 + Util.GetStringList("tradeusum", "fr"), // 3 + Util.GetStringList("tradeusum", "it"), // 4 + Util.GetStringList("tradeusum", "de"), // 5 + new string[0], // 6 - None + Util.GetStringList("tradeusum", "es"), // 7 + Util.GetStringList("tradeusum", "ko"), // 8 + Util.GetStringList("tradeusum", "zh"), // 9 + Util.GetStringList("tradeusum", "zh"), // 10 }; private static readonly EncounterArea[] Encounter_Pelago_SM = diff --git a/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs b/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs index 891661058..12e545e24 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterGenerator.cs @@ -572,69 +572,90 @@ private static IEnumerable GetValidEncounterSlots(PKM pkm, Encoun if (lvl < 0) lvl = GetMinLevelEncounter(pkm); if (lvl <= 0) - yield break; - - int gen = pkm.GenNumber; - int fluteBoost = gen < 3 ? 0 : 4; - const int dexnavBoost = 30; - - int df = DexNav ? fluteBoost : 0; - int dn = DexNav ? fluteBoost + dexnavBoost : 0; + return Enumerable.Empty(); var maxspeciesorigin = -1; if (gameSource == GameVersion.RBY) maxspeciesorigin = MaxSpeciesID_1; else if (GameVersion.GSC.Contains(gameSource)) maxspeciesorigin = MaxSpeciesID_2; // Get Valid levels - IEnumerable vs = GetValidPreEvolutions(pkm, maxspeciesorigin: maxspeciesorigin, lvl: ignoreLevel ? 100 : -1, skipChecks: ignoreLevel); + var vs = GetValidPreEvolutions(pkm, maxspeciesorigin: maxspeciesorigin, lvl: ignoreLevel ? 100 : -1, skipChecks: ignoreLevel); if (!FilterGBSlotsCatchRate(pkm, ref vs, out GameVersion Gen1Version, out bool RBDragonair)) - yield break; + return Enumerable.Empty(); + + int gen = pkm.GenNumber; + int fluteBoost = gen < 3 ? 0 : 4; + const int dexnavBoost = 30; + int df = DexNav ? fluteBoost : 0; + int dn = DexNav ? fluteBoost + dexnavBoost : 0; // Get slots where pokemon can exist with respect to the evolution chain - IEnumerable slots = loc.Slots.Where(slot => vs.Any(evo => evo.Species == slot.Species && (ignoreLevel || evo.Level >= slot.LevelMin - df))); - - List encounterSlots; - if (ignoreLevel) - encounterSlots = slots.ToList(); - else if (pkm.HasOriginalMetLocation) - encounterSlots = slots.Where(slot => slot.LevelMin - df <= lvl && lvl <= slot.LevelMax + (slot.Permissions.AllowDexNav ? dn : df)).ToList(); - else // check for any less than current level - encounterSlots = slots.Where(slot => slot.LevelMin <= lvl).ToList(); + var slots = loc.Slots.Where(slot => vs.Any(evo => evo.Species == slot.Species && (ignoreLevel || evo.Level >= slot.LevelMin - df))); + // Get slots where pokemon can exist with respect to level constraints + var encounterSlots = GetSlotsFilterByLevel(pkm, lvl, ignoreLevel, slots, df, dn); + // Return enumerable of slots pkm might have originated from if (gen <= 2) - { - var gbslots = FilterGBSlots(pkm, gen, Gen1Version, encounterSlots, RBDragonair); - foreach (var s in gbslots.OrderBy(slot => slot.LevelMin)) - yield return s; - yield break; - } + return GetFilteredSlots12(pkm, gen, Gen1Version, encounterSlots, RBDragonair).OrderBy(slot => slot.LevelMin); // prefer lowest levels + if (gen <= 5) + return GetFilteredSlotsByForm(pkm, encounterSlots); + if (DexNav && gen == 6) + return GetFilteredSlots6DexNav(pkm, lvl, encounterSlots, fluteBoost); + return GetFilteredSlots67(pkm, encounterSlots); + } + private static List GetSlotsFilterByLevel(PKM pkm, int lvl, bool ignoreLevel, IEnumerable slots, int df, int dn) + { + if (ignoreLevel) + return slots.ToList(); + if (pkm.HasOriginalMetLocation) + return slots.Where(slot => slot.LevelMin - df <= lvl && lvl <= slot.LevelMax + (slot.Permissions.AllowDexNav ? dn : df)).ToList(); + // check for any less than current level + return slots.Where(slot => slot.LevelMin <= lvl).ToList(); + } + private static IEnumerable GetFilteredSlotsByForm(PKM pkm, IEnumerable encounterSlots) + { + return WildForms.Contains(pkm.Species) + ? encounterSlots.Where(slot => slot.Form == pkm.AltForm) + : encounterSlots; + } + private static IEnumerable GetFilteredSlots67(PKM pkm, IReadOnlyCollection encounterSlots) + { + IEnumerable slotdata; + int species = pkm.Species; + int form = pkm.AltForm; + if (AlolanVariantEvolutions12.Contains(species)) // match form if same species, else form 0. + slotdata = encounterSlots.Where(slot => species == slot.Species ? slot.Form == form : slot.Form == 0); + else if (WildForms.Contains(species) || AlolanOriginForms.Contains(species)) // match slot form + slotdata = encounterSlots.Where(slot => slot.Form == form); + else + slotdata = encounterSlots; // no form checking + + foreach (var z in slotdata) + yield return z; + + // Filter for Form Specific // Pressure Slot EncounterSlot slotMax = encounterSlots.OrderByDescending(slot => slot.LevelMax).FirstOrDefault(); + if (slotMax == null) + yield break; // yield break; - if (gen >= 6 && !DexNav) + if (AlolanVariantEvolutions12.Contains(species)) // match form if same species, else form 0. { - var slotdata = WildForms.Contains(pkm.Species) - ? encounterSlots.Where(slot => slot.Form == pkm.AltForm) - : encounterSlots; - - foreach (var z in slotdata) - yield return z; - - // Filter for Form Specific - if (slotMax != null) - yield return getPressureSlot(slotMax); - yield break; + if (species == slotMax.Species ? slotMax.Form == form : slotMax.Form == 0) + yield return GetPressureSlot(slotMax, pkm); } - - IEnumerable formMatchSlots = encounterSlots.Where(slot => !WildForms.Contains(pkm.Species) || slot.Form == pkm.AltForm); - if (gen <= 5) + else if (WildForms.Contains(species) || AlolanOriginForms.Contains(species)) // match slot form { - foreach (var z in formMatchSlots) - yield return z; - yield break; + if (slotMax.Form == form) + yield return GetPressureSlot(slotMax, pkm); } - + else + yield return GetPressureSlot(slotMax, pkm); + } + private static IEnumerable GetFilteredSlots6DexNav(PKM pkm, int lvl, IReadOnlyCollection encounterSlots, int fluteBoost) + { + var formMatchSlots = GetFilteredSlotsByForm(pkm, encounterSlots); foreach (EncounterSlot s in formMatchSlots) { bool nav = s.Permissions.AllowDexNav && (pkm.RelearnMove1 != 0 || pkm.AbilityNumber == 4); @@ -649,17 +670,19 @@ private static IEnumerable GetValidEncounterSlots(PKM pkm, Encoun slot.Permissions.DexNav = true; yield return slot; } + // Pressure Slot + EncounterSlot slotMax = encounterSlots.OrderByDescending(slot => slot.LevelMax).FirstOrDefault(); if (slotMax != null) - yield return getPressureSlot(slotMax); - - EncounterSlot getPressureSlot(EncounterSlot s) - { - var max = s.Clone(); - max.Permissions.Pressure = true; - max.Form = pkm.AltForm; - return max; - } + yield return GetPressureSlot(slotMax, pkm); } + private static EncounterSlot GetPressureSlot(EncounterSlot s, PKM pkm) + { + var max = s.Clone(); + max.Permissions.Pressure = true; + max.Form = pkm.AltForm; + return max; + } + private static bool FilterGBSlotsCatchRate(PKM pkm, ref IEnumerable vs, out GameVersion Gen1Version, out bool RBDragonair) { RBDragonair = false; @@ -710,7 +733,7 @@ private static bool FilterGBSlotsCatchRate(PKM pkm, ref IEnumerable vs return true; } } - private static IEnumerable FilterGBSlots(PKM pkm, int gen, GameVersion Gen1Version, IEnumerable slots, bool RBDragonair) + private static IEnumerable GetFilteredSlots12(PKM pkm, int gen, GameVersion Gen1Version, IEnumerable slots, bool RBDragonair) { switch (gen) { diff --git a/PKHeX.Core/Legality/Structures/EvolutionTree.cs b/PKHeX.Core/Legality/Structures/EvolutionTree.cs index 38c2d84e1..8fa1e1d64 100644 --- a/PKHeX.Core/Legality/Structures/EvolutionTree.cs +++ b/PKHeX.Core/Legality/Structures/EvolutionTree.cs @@ -166,21 +166,18 @@ private void FixEvoTreeSM() } Lineage[711].Chain.RemoveRange(0, 3); - // Add past gen evolutions for other Marowak and Exeggutor - var raichu1 = Lineage[Personal.GetFormeIndex(26, 1)]; - var evo1 = raichu1.Chain[0].StageEntryMethods[0].Copy(); - Lineage[26].Chain.Add(new EvolutionStage { StageEntryMethods = new List { evo1 } }); - var evo2 = raichu1.Chain[1].StageEntryMethods[0].Copy(); - evo2.Form = -1; evo2.Banlist = EvolutionMethod.BanSM; - Lineage[26].Chain.Add(new EvolutionStage { StageEntryMethods = new List { evo2 } }); - - var exegg = Lineage[Personal.GetFormeIndex(103, 1)].Chain[0].StageEntryMethods[0].Copy(); - exegg.Form = -1; exegg.Banlist = EvolutionMethod.BanSM; exegg.Method = 8; // No night required (doesn't matter) - Lineage[103].Chain.Add(new EvolutionStage { StageEntryMethods = new List { exegg } }); - - var marowak = Lineage[Personal.GetFormeIndex(105, 1)].Chain[0].StageEntryMethods[0].Copy(); - marowak.Form = -1; marowak.Banlist = EvolutionMethod.BanSM; - Lineage[105].Chain.Add(new EvolutionStage { StageEntryMethods = new List { marowak } }); + // Ban Raichu Evolution on SM + Lineage[Personal.GetFormeIndex(26, 0)] + .Chain[1].StageEntryMethods[0] + .Banlist = EvolutionMethod.BanSM; + // Ban Exeggutor Evolution on SM + Lineage[Personal.GetFormeIndex(103, 0)] + .Chain[0].StageEntryMethods[0] + .Banlist = EvolutionMethod.BanSM; + // Ban Marowak Evolution on SM + Lineage[Personal.GetFormeIndex(105, 0)] + .Chain[0].StageEntryMethods[0] + .Banlist = EvolutionMethod.BanSM; } private int GetIndex(PKM pkm) @@ -549,7 +546,7 @@ public class EvolutionMethod internal static readonly HashSet TradeMethods = new HashSet {5, 6, 7}; private static readonly IReadOnlyCollection NoBanlist = new GameVersion[0]; - internal static readonly IReadOnlyCollection BanSM = new[] {GameVersion.SN, GameVersion.MN, GameVersion.US, GameVersion.UM}; + internal static readonly IReadOnlyCollection BanSM = new[] {GameVersion.SN, GameVersion.MN}; internal IReadOnlyCollection Banlist = NoBanlist; public bool Valid(PKM pkm, int lvl, bool skipChecks) @@ -559,12 +556,13 @@ public bool Valid(PKM pkm, int lvl, bool skipChecks) if (!skipChecks && pkm.AltForm != Form) return false; - if (!skipChecks && Banlist.Contains((GameVersion)pkm.Version)) + if (!skipChecks && Banlist.Contains((GameVersion)pkm.Version) && pkm.IsUntraded) // sm lacks usum kantonian evos return false; switch (Method) { case 8: // Use Item + case 42: return true; case 17: // Male return pkm.Gender == 0; diff --git a/PKHeX.Core/Legality/Tables.cs b/PKHeX.Core/Legality/Tables.cs index 5cc55903d..cc9fbdb1b 100644 --- a/PKHeX.Core/Legality/Tables.cs +++ b/PKHeX.Core/Legality/Tables.cs @@ -54,6 +54,8 @@ public static partial class Legal 720, // Hoopa 741, // Oricorio 773, // Silvally + + 800, // Necrozma }; public static readonly HashSet FormChangeMoves = new HashSet { @@ -153,6 +155,12 @@ public static partial class Legal 800, // Necrozma 801, // Magearna 802, // Marshadow + + 803, // Poipole + 804, // Naganadel + 805, // Stakataka + 806, // Blacephalon + 807, // Zeraora }; public static readonly HashSet BattleFrontierBanlist = new HashSet @@ -195,6 +203,7 @@ public static partial class Legal 800, // Necrozma 801, // Magearna 802, // Marshadow + 807, // Zeraora }; public static readonly HashSet BattleForms = new HashSet @@ -223,7 +232,10 @@ public static partial class Legal 302,319,323,334,362,373,376,384, 428,475, 531, - 719 + 719, + + // USUM + 800, // Ultra Necrozma }; public static readonly HashSet BattlePrimals = new HashSet { 382, 383 }; @@ -232,6 +244,7 @@ public static partial class Legal 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 695, 696, 697, 698, 699, 700, 701, 702, 703, 719, + 723, 724, 725, 726, 727, 728 }; internal static readonly HashSet InvalidSketch = new HashSet(new[] { 165, 448 }.Concat(Z_Moves)); // Struggle & Chatter @@ -240,14 +253,14 @@ public static partial class Legal 150, 151, 249, 250, 251, 382, 383, 384, 385, 386, 483, 484, 487, 489, 490, 491, 492, 493, 494, 643, 644, 646, 647, 648, 649, 716, 717, 718, 719, 720, 721, 789, 790, - 791, 792, 800, 801, 802 + 791, 792, 800, 801, 802, 807 }; public static readonly HashSet SubLegends = new HashSet { 144, 145, 146, 243, 244, 245, 377, 378, 379, 380, 381, 480, 481, 482, 485, 486, 488, 638, 639, 640, 641, 642, 645, 772, 773, 787, 788, 785, 786, 793, 794, 795, 796, - 797, 798, 799 + 797, 798, 799, 803, 804, 805, 806, }; public static readonly int[] Arceus_Plate = {303, 306, 304, 305, 309, 308, 310, 313, 298, 299, 301, 300, 307, 302, 311, 312, 644}; @@ -386,6 +399,7 @@ public static partial class Legal public static readonly int[] Games_7vc2 = { 39, 40, 41 }; // Gold, Silver, Crystal public static readonly int[] Games_7vc1 = { 35, 36, 37, 38 }; // Red, Green, Blue, Yellow public static readonly int[] Games_7go = { 34 }; + public static readonly int[] Games_7usum = { 32, 33 }; public static readonly int[] Games_7sm = { 30, 31 }; public static readonly int[] Games_6xy = { 24, 25 }; public static readonly int[] Games_6oras = { 26, 27 }; diff --git a/PKHeX.Core/Legality/Tables7.cs b/PKHeX.Core/Legality/Tables7.cs index 08379a5f9..85d257d51 100644 --- a/PKHeX.Core/Legality/Tables7.cs +++ b/PKHeX.Core/Legality/Tables7.cs @@ -12,9 +12,10 @@ public static partial class Legal internal const int MaxBallID_7 = 0x1A; // 26 internal const int MaxGameID_7 = 41; // Crystal (VC?) - internal const int MaxSpeciesID_7_USUM = 802; - internal const int MaxMoveID_7_USUM = 720; - internal const int MaxItemID_7_USUM = 920; + internal const int MaxSpeciesID_7_USUM = 807; + internal const int MaxMoveID_7_USUM = 728; + internal const int MaxItemID_7_USUM = 959; + internal const int MaxAbilityID_7_USUM = 233; #region Met Locations @@ -26,7 +27,10 @@ public static partial class Legal 006, 008, 010, 012, 014, 016, 018, 020, 022, 024, 026, 028, 030, 032, 034, 036, 038, 040, 042, 044, 046, 048, 050, 052, 054, 056, 058, 060, 062, 064, 066, 068, 070, 072, 074, 076, 078, 082, 084, 086, 088, 090, 092, 094, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, - 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192 + 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, + + 194, 196, 198, + 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, }; internal static readonly int[] Met_SM_3 = @@ -50,12 +54,14 @@ public static partial class Legal #endregion - internal static readonly int[][] Tutors_USUM = + internal static readonly int[] Tutors_USUM = { - new int[0], // todo - new int[0], // todo - new int[0], // todo - new int[0], // todo + 450, 343, 162, 530, 324, 442, 402, 529, 340, 067, 441, 253, 009, 007, 008, + 277, 335, 414, 492, 356, 393, 334, 387, 276, 527, 196, 401, 428, 406, 304, 231, + 020, 173, 282, 235, 257, 272, 215, 366, 143, 220, 202, 409, 264, 351, 352, + 380, 388, 180, 495, 270, 271, 478, 472, 283, 200, 278, 289, 446, 285, + + 477, 502, 432, 710, 707, 675, 673 }; internal static readonly ushort[] Pouch_Regular_SM = // 00 { @@ -90,8 +96,12 @@ public static partial class Legal 705, 706, 765, 773, 797, 841, 842, 843, 845, 847, 850, 857, 858, 860, }; - internal static readonly ushort[] Pouch_Key_USUM = { - // todo + internal static readonly ushort[] Pouch_Key_USUM = Pouch_Key_SM.Concat(new ushort[] { + 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, + 440, + }).ToArray(); + public static readonly ushort[] Pouch_Roto_USUM = { + 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959 }; internal static readonly ushort[] Pouch_TMHM_SM = { // 02 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, @@ -117,16 +127,16 @@ public static partial class Legal 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 798, 799, 800, 801, 802, 803, 804, 805, 806, 836 }; internal static readonly ushort[] Pouch_ZCrystal_USUM = Pouch_ZCrystal_SM.Concat(new ushort[] { // Bead - // todo + 927, 928, 929, 930, 931, 932 }).ToArray(); internal static readonly ushort[] Pouch_ZCrystalHeld_USUM = Pouch_ZCrystalHeld_SM.Concat(new ushort[] { // Piece - // todo + 921, 922, 923, 924, 925, 926 }).ToArray(); public static readonly Dictionary ZCrystalDictionary = Pouch_ZCrystal_USUM .Zip(Pouch_ZCrystalHeld_USUM, (k, v) => new { Key = (int)k, Value = (int)v }) .ToDictionary(x => x.Key, x => x.Value); internal static readonly ushort[] HeldItems_SM = new ushort[1].Concat(Pouch_Items_SM).Concat(Pouch_Berries_SM).Concat(Pouch_Medicine_SM).Concat(Pouch_ZCrystalHeld_SM).ToArray(); - internal static readonly ushort[] HeldItems_USUM = HeldItems_SM; // todo + internal static readonly ushort[] HeldItems_USUM = new ushort[1].Concat(Pouch_Items_SM).Concat(Pouch_Berries_SM).Concat(Pouch_Medicine_SM).Concat(Pouch_ZCrystalHeld_USUM).ToArray(); private static readonly HashSet WildPokeballs7 = new HashSet { 0x01, 0x02, 0x03, 0x04, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, @@ -171,7 +181,37 @@ public static partial class Legal 422, 423, 425, 426, 429, 430, 438, 440, 443, 444, 445, 446, 447, 448, 456, 457, 461, 462, 466, 467, 470, 471, 474, 476, 478, 506, 507, 508, 524, 525, 526, 546, 547, 548, 549, 551, 552, 553, 564, 565, 566, 567, 568, 569, 582, 583, 584, 587, 594, 627, 628, 629, 630, 661, 662, 663, 674, 675, 700, 703, 704, 705, 706, 707, 708, 709, - 718 + 718, + + // Regular + 023, 086, 108, 138, 140, 163, 177, 179, 190, 204, + 206, 214, 223, 228, 238, 246, 303, 309, 341, 343, + 345, 347, 352, 353, 357, 366, 427, 439, 458, 550, + 559, 570, 572, 592, 605, 619, 621, 622, 624, 636, + 667, 669, 676, 686, 690, 692, 696, 698, 701, 702, + 714, + + // Wormhole + 333, 334, // Altaria + 193, 469, // Yanmega + 561, // Sigilyph + 580, 581, // Swanna + 276, 277, // Swellow + 451, 452, // Drapion + 531, // Audino + 695, // Heliolisk + 273, 274, 275, // Nuzleaf + 325, 326, // Gumpig + 459, 460, // Abomasnow + 307, 308, // Medicham + 449, 450, // Hippowdon + 557, 558, // Crustle + 218, 219, // Magcargo + 688, 689, // Barbaracle + 270, 271, 272, // Lombre + 618, // Stunfisk + 418, 419, // Floatzel + 194, 195, // Quagsire }; public static readonly HashSet PastGenAlolanNativesUncapturable = new HashSet { @@ -212,6 +252,26 @@ public static partial class Legal 532, // [534] Conkeldurr (Timburr) 540, // [542] Leavanny (Sewaddle) 602, // [604] Eelektross (Tynamo) + + 004, // Charmander + 007, // Squirtle + 095, // Onix + 663, 664, // Scatterbug + 001, // Bulbasaur + 280, // Ralts + 255, 256, // Combusken + 013, 014, 015, // Beedrill + 252, 253, // Grovyle + 258, 259, // Marshtomp + 393, 394, // Prinplup + 387, 388, // Grotle + 016, 017, 018, // Pidgeot + 389, 390, 391, // Monferno + 304, 305, 306, // Aggron + 479, // Rotom + 650, 651, 652, // Chesnaught + 656, 657, 658, // Greninja + 653, 654, 655, // Delphox }; internal static readonly HashSet Inherit_Apricorn6 = new HashSet { @@ -257,7 +317,15 @@ public static partial class Legal 731, 734, 736, 739, 741, 742, 744, 746, 747, 749, 751, 753, 755, 757, 759, 761, 764, 765, 766, 767, 769, 771, 774, 775, 776, 777, 778, 779, 780, 781, - 782 + 782, + + // USUM Additions + 023, 086, 108, 138, 140, 163, 177, 179, 190, 204, + 206, 214, 223, 228, 238, 246, 303, 309, 341, 343, + 345, 347, 352, 353, 357, 366, 427, 439, 458, 550, + 559, 570, 572, 592, 605, 619, 621, 622, 624, 636, + 667, 669, 676, 686, 690, 692, 696, 698, 701, 702, + 714 }; internal static readonly HashSet AlolanCaptureNoHeavyBall = new HashSet { 374, 785, 786, 787, 788}; // Beldum & Tapus internal static readonly HashSet Inherit_ApricornMale7 = new HashSet @@ -351,6 +419,39 @@ public static partial class Legal 687, // Core Enforcer }; + internal static readonly HashSet Totem_Alolan = new HashSet + { + 020, // Raticate (Normal, Alolan, Totem) + 105, // Marowak (Normal, Alolan, Totem) + 778, // Mimikyu (Normal, Busted, Totem, Totem_Busted) + }; + internal static readonly HashSet Totem_SM = new HashSet + { + 020, // Raticate + 735, // Gumshoos + //746, // Wishiwashi + 758, // Salazzle + 754, // Lurantis + 738, // Vikavolt + 778, // Mimikyu + 784, // Kommo-o + }; + internal static readonly HashSet Totem_USUM = new HashSet + { + 020, // Raticate + 735, // Gumshoos + //746, // Wishiwashi + 758, // Salazzle + 754, // Lurantis + 738, // Vikavolt + 778, // Mimikyu + 784, // Kommo-o + 105, // Marowak + 752, // Araquanid + 777, // Togedemaru + 743, // Ribombee + }; + internal static readonly int[] EggLocations7 = {60002, 30002}; internal static readonly HashSet ValidMet_SM = new HashSet { @@ -361,9 +462,10 @@ public static partial class Legal 30016 // Poké Pelago }; - internal static readonly HashSet ValidMet_USUM = new HashSet + internal static readonly HashSet ValidMet_USUM = new HashSet(ValidMet_SM) { - // todo + 194, 196, 198, + 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, }; private static readonly int[] TMHM_SM = @@ -399,7 +501,7 @@ public static partial class Legal 05, 10, 05, 05, 15, 10, 05, 05, 05, 10, 10, 10, 10, 20, 25, 10, 20, 30, 25, 20, 20, 15, 20, 15, 20, 20, 10, 10, 10, 10, 10, 20, 10, 30, 15, 10, 10, 10, 20, 20, 05, 05, 05, 20, 10, 10, 20, 15, 20, 20, 10, 20, 30, 10, 10, 40, 40, 30, 20, 40, 20, 20, 10, 10, 10, 10, 05, 10, 10, 05, 05, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 40, 15, 20, 30, 20, 15, 15, 20, 10, 15, 15, 10, 05, 10, 10, 20, 15, 10, 15, 15, 15, 05, 15, 20, 20, 01, 01, 01, 01, 01, 01, - 01, 01, 01, 05, 05, 10, 10, 10, 20, 10, 10, 10, 05, 05, 20, 10, 10, 10, 01 + 01, 01, 01, 05, 05, 10, 10, 10, 20, 10, 10, 10, 05, 05, 20, 10, 10, 10, 01, 05, 15, 05, 01, 01, 01, 01, 01, 01, }; internal static readonly HashSet Ban_NoHidden7 = new HashSet diff --git a/PKHeX.Core/PKHeX.Core.csproj b/PKHeX.Core/PKHeX.Core.csproj index 26e393af7..dc2807c82 100644 --- a/PKHeX.Core/PKHeX.Core.csproj +++ b/PKHeX.Core/PKHeX.Core.csproj @@ -48,7 +48,9 @@ + + @@ -145,6 +147,7 @@ + @@ -190,6 +193,7 @@ + @@ -234,6 +238,7 @@ + @@ -278,6 +283,7 @@ + @@ -343,6 +349,7 @@ + @@ -387,6 +394,7 @@ + @@ -430,6 +438,7 @@ + @@ -585,6 +594,7 @@ + @@ -595,6 +605,7 @@ + @@ -605,7 +616,6 @@ - @@ -629,6 +639,7 @@ + @@ -679,7 +690,9 @@ + + @@ -776,6 +789,7 @@ + @@ -821,6 +835,7 @@ + @@ -865,6 +880,7 @@ + @@ -909,6 +925,7 @@ + @@ -974,6 +991,7 @@ + @@ -1018,6 +1036,7 @@ + @@ -1061,6 +1080,7 @@ + @@ -1216,6 +1236,7 @@ + @@ -1226,6 +1247,7 @@ + @@ -1236,7 +1258,6 @@ - @@ -1260,6 +1281,7 @@ + diff --git a/PKHeX.Core/PKM/FormConverter.cs b/PKHeX.Core/PKM/FormConverter.cs index 19f69bb7d..dcc73ed09 100644 --- a/PKHeX.Core/PKM/FormConverter.cs +++ b/PKHeX.Core/PKM/FormConverter.cs @@ -2,7 +2,7 @@ namespace PKHeX.Core { - internal static class FormConverter + public static class FormConverter { /// /// Gets a list of formes that the species can have. @@ -22,6 +22,8 @@ internal static string[] GetFormList(int species, IReadOnlyList types, I types[000], // Normal forms[804], // Mega }; + if (generation == 7 && Legal.Totem_USUM.Contains(species)) + return GetFormsTotem(species, types, forms); if (species <= Legal.MaxSpeciesID_1) return GetFormsGen1(species, types, forms, generation); @@ -39,6 +41,27 @@ internal static string[] GetFormList(int species, IReadOnlyList types, I return GetFormsGen7(species, types, forms); } + public static bool IsTotemForm(int species, int form, int generation = 7) + { + if (generation != 7) + return false; + if (form == 0) + return false; + if (!Legal.Totem_USUM.Contains(species)) + return false; + if (species == 778) // Mimikyu + return form == 2 || form == 3; + if (Legal.Totem_Alolan.Contains(species)) + return form == 2; + return form == 1; + } + public static int GetTotemBaseForm(int species, int form) + { + if (species == 778) // Mimikyu + return form -2; + return form - 1; + } + private static string[] GetFormsGen1(int species, IReadOnlyList types, IReadOnlyList forms, int generation) { switch (species) @@ -382,11 +405,18 @@ private static string[] GetFormsGen7(int species, IReadOnlyList types, I forms[1023], // "BLU" - Sensu }; + case 744: // Rockruff + return new[] + { + types[0], // Normal + forms[1064], // Dusk + }; case 745: // Lycanroc return new[] { forms[745], // Midday forms[1024], // Midnight + forms[1064], // Dusk }; case 746: // Wishiwashi @@ -418,11 +448,13 @@ private static string[] GetFormsGen7(int species, IReadOnlyList types, I forms[1057], // "V-Core", // Core Violet }; - case 778: // Mimikyu + case 800: return new[] { - forms[778], // Disguised - forms[1058], // Busted + types[000], // Normal + forms[1065], // Dusk Mane + forms[1066], // Dawn Wings + forms[1067], // Ultra Necrozma }; case 801: // Magearna @@ -445,7 +477,6 @@ private static string[] GetFormsAlolan (int generation, IReadOnlyList ty return new[] { "" }; case 19: // Rattata - case 20: // Raticate case 26: // Raichu case 27: // Sandshrew case 28: // Sandslash @@ -460,7 +491,6 @@ private static string[] GetFormsAlolan (int generation, IReadOnlyList ty case 76: // Golem case 88: // Grimer case 89: // Muk - case 105: // Marowak case 103: // Exeggutor return new[] { @@ -497,6 +527,7 @@ private static string[] GetFormsPikachu(int generation, IReadOnlyList ty forms[816], // Unova forms[817], // Kalos forms[818], // Alola + forms[1063] // Partner }; } } @@ -581,6 +612,29 @@ private static string[] GetFormsArceus (int generation, IReadOnlyList ty }; } } + private static string[] GetFormsTotem (int species, IReadOnlyList types, IReadOnlyList forms) + { + if (species == 778) // Mimikyu + return new[] + { + forms[778], // Disguised + forms[1058], // Busted + forms[1007], // Large + "*" + forms[1058], // Busted + }; + if (Legal.Totem_Alolan.Contains(species)) + return new[] + { + types[0], // Normal + forms[810], // Alolan + forms[1007], // Large + }; + return new[] + { + types[0], // Normal + forms[1007], // Large + }; + } private static string[] GetFormsUnown(int generation) { switch (generation) diff --git a/PKHeX.Core/PKM/PK7.cs b/PKHeX.Core/PKM/PK7.cs index 5a34a1c7a..7da5735c7 100644 --- a/PKHeX.Core/PKM/PK7.cs +++ b/PKHeX.Core/PKM/PK7.cs @@ -628,7 +628,7 @@ public void TradeMemory(bool Bank) // Maximums public override int MaxMoveID => Legal.MaxMoveID_7_USUM; public override int MaxSpeciesID => Legal.MaxSpeciesID_7_USUM; - public override int MaxAbilityID => Legal.MaxAbilityID_7; + public override int MaxAbilityID => Legal.MaxAbilityID_7_USUM; public override int MaxItemID => Legal.MaxItemID_7_USUM; public override int MaxBallID => Legal.MaxBallID_7; public override int MaxGameID => Legal.MaxGameID_7; diff --git a/PKHeX.Core/PKM/StringConverter.cs b/PKHeX.Core/PKM/StringConverter.cs index 1a03344d3..41d13bf09 100644 --- a/PKHeX.Core/PKM/StringConverter.cs +++ b/PKHeX.Core/PKM/StringConverter.cs @@ -496,17 +496,12 @@ private static string ConvertString2BinG7_zh(string inputstr, int lang) bool cht = lang == 10; // A string cannot contain a mix of CHS and CHT characters. - bool IsCHT = inputstr.Any(chr => Gen7_CHT.Contains(chr) && !Gen7_CHS.Contains(chr)); - IsCHT |= cht && !inputstr.Any(chr => Gen7_CHT.Contains(chr) ^ Gen7_CHS.Contains(chr)); // CHS and CHT have the same display name - var table = IsCHT ? Gen7_CHT : Gen7_CHS; - ushort ofs = IsCHT ? Gen7_CHT_Ofs : Gen7_CHS_Ofs; + bool IsCHT = inputstr.Any(chr => G7_CHT.ContainsKey(chr) && !G7_CHS.ContainsKey(chr)); + IsCHT |= cht && !inputstr.Any(chr => G7_CHT.ContainsKey(chr) ^ G7_CHS.ContainsKey(chr)); // CHS and CHT have the same display name + var table = IsCHT ? G7_CHT : G7_CHS; foreach (char chr in inputstr) - { - var index = Array.IndexOf(table, chr); - var val = index > -1 ? (char) (ofs + index) : chr; - str.Append(val); - } + str.Append(table.TryGetValue(chr, out int index) ? (char)(index + Gen7_ZH_Ofs) : chr); return str.ToString(); } @@ -524,16 +519,14 @@ private static string ConvertBin2StringG7_zh(string inputstr) } /// - /// Shifts a character from the CHS/CHT character tables + /// Shifts a character from the Chinese character tables /// /// Input value to shift /// Shifted character private static ushort Getg7zhChar(ushort val) { - if (Gen7_CHS_Ofs <= val && val < Gen7_CHS_Ofs + Gen7_CHS.Length) // within CHS char table - return Gen7_CHS[val - Gen7_CHS_Ofs]; - if (Gen7_CHT_Ofs <= val && val < Gen7_CHT_Ofs + Gen7_CHT.Length) // within CHT char table - return Gen7_CHT[val - Gen7_CHT_Ofs]; + if (Gen7_ZH_Ofs <= val && val < Gen7_ZH_Ofs + Gen7_ZH.Length) + return Gen7_ZH[val - Gen7_ZH_Ofs]; return val; // regular character } @@ -1923,10 +1916,22 @@ private static byte SetG3Char(ushort chr, bool jp) .ToDictionary(pair => pair.value, pair => pair.index); #region Gen 7 Chinese Character Tables - private static readonly char[] Gen7_CHS = Util.GetStringList("Char", "zh")[0].ToCharArray(); - private const ushort Gen7_CHS_Ofs = 0xE800; - private static readonly char[] Gen7_CHT = Util.GetStringList("Char", "zh2")[0].ToCharArray(); - private const ushort Gen7_CHT_Ofs = 0xEB0F; + private static readonly char[] Gen7_ZH = Util.GetStringList("Char", "zh")[0].ToCharArray(); + private const ushort Gen7_ZH_Ofs = 0xE800; + private const ushort SM_ZHCharTable_Size = 0x30F; + private const ushort USUM_CHS_Size = 0x4; + private const ushort USUM_CHT_Size = 0x5; + private static bool getisG7CHSChar(int idx) => idx < SM_ZHCharTable_Size || SM_ZHCharTable_Size * 2 <= idx && idx < SM_ZHCharTable_Size * 2 + USUM_CHS_Size; + + private static readonly Dictionary G7_CHS = Gen7_ZH + .Select((value, index) => new { value, index }) + .Where(pair => getisG7CHSChar(pair.index)) + .ToDictionary(pair => pair.value, pair => pair.index); + + private static readonly Dictionary G7_CHT = Gen7_ZH + .Select((value, index) => new { value, index }) + .Where(pair => !getisG7CHSChar(pair.index)) + .ToDictionary(pair => pair.value, pair => pair.index); #endregion /// diff --git a/PKHeX.Core/PersonalInfo/PersonalInfo.cs b/PKHeX.Core/PersonalInfo/PersonalInfo.cs index 3d075e969..c8cd09e6e 100644 --- a/PKHeX.Core/PersonalInfo/PersonalInfo.cs +++ b/PKHeX.Core/PersonalInfo/PersonalInfo.cs @@ -93,7 +93,7 @@ public int FormeIndex(int species, int forme) return species; if (FormStatsIndex <= 0) // no formes present return species; - if (forme > FormeCount) // beyond range of species' formes + if (forme >= FormeCount) // beyond range of species' formes return species; return FormStatsIndex + forme - 1; diff --git a/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs b/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs index ad74020ba..08f0ed460 100644 --- a/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs +++ b/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs @@ -20,10 +20,7 @@ public PersonalInfoSM(byte[] data) SpecialTutors = new[] { - GetBits(Data.Skip(0x3C).Take(0x04).ToArray()), - GetBits(Data.Skip(0x40).Take(0x04).ToArray()), - GetBits(Data.Skip(0x44).Take(0x04).ToArray()), - GetBits(Data.Skip(0x48).Take(0x04).ToArray()), + GetBits(Data.Skip(0x3C).Take(0x0A).ToArray()), }; } public override byte[] Write() @@ -31,9 +28,6 @@ public override byte[] Write() SetBits(TMHM).CopyTo(Data, 0x28); SetBits(TypeTutors).CopyTo(Data, 0x38); SetBits(SpecialTutors[0]).CopyTo(Data, 0x3C); - SetBits(SpecialTutors[1]).CopyTo(Data, 0x40); - SetBits(SpecialTutors[2]).CopyTo(Data, 0x44); - SetBits(SpecialTutors[3]).CopyTo(Data, 0x48); return Data; } diff --git a/PKHeX.Core/PersonalInfo/PersonalTable.cs b/PKHeX.Core/PersonalInfo/PersonalTable.cs index d1613f890..91eec1bbd 100644 --- a/PKHeX.Core/PersonalInfo/PersonalTable.cs +++ b/PKHeX.Core/PersonalInfo/PersonalTable.cs @@ -15,7 +15,7 @@ public class PersonalTable /// /// Personal Table used in . /// - public static readonly PersonalTable USUM = GetTable("sm", GameVersion.USUM); + public static readonly PersonalTable USUM = GetTable("uu", GameVersion.USUM); /// /// Personal Table used in . /// diff --git a/PKHeX.Core/Resources/byte/eggmove_uu.pkl b/PKHeX.Core/Resources/byte/eggmove_uu.pkl index dd77a7ebe..8f9fb0178 100644 Binary files a/PKHeX.Core/Resources/byte/eggmove_uu.pkl and b/PKHeX.Core/Resources/byte/eggmove_uu.pkl differ diff --git a/PKHeX.Core/Resources/byte/encounter_um.pkl b/PKHeX.Core/Resources/byte/encounter_um.pkl index 2914ce735..4b758a125 100644 Binary files a/PKHeX.Core/Resources/byte/encounter_um.pkl and b/PKHeX.Core/Resources/byte/encounter_um.pkl differ diff --git a/PKHeX.Core/Resources/byte/encounter_um_sos.pkl b/PKHeX.Core/Resources/byte/encounter_um_sos.pkl new file mode 100644 index 000000000..c707614f7 Binary files /dev/null and b/PKHeX.Core/Resources/byte/encounter_um_sos.pkl differ diff --git a/PKHeX.Core/Resources/byte/encounter_us.pkl b/PKHeX.Core/Resources/byte/encounter_us.pkl index f16853185..76fa962b6 100644 Binary files a/PKHeX.Core/Resources/byte/encounter_us.pkl and b/PKHeX.Core/Resources/byte/encounter_us.pkl differ diff --git a/PKHeX.Core/Resources/byte/encounter_us_sos.pkl b/PKHeX.Core/Resources/byte/encounter_us_sos.pkl new file mode 100644 index 000000000..cabd42081 Binary files /dev/null and b/PKHeX.Core/Resources/byte/encounter_us_sos.pkl differ diff --git a/PKHeX.Core/Resources/byte/evos_uu.pkl b/PKHeX.Core/Resources/byte/evos_uu.pkl index b9154d6b8..baa815ab3 100644 Binary files a/PKHeX.Core/Resources/byte/evos_uu.pkl and b/PKHeX.Core/Resources/byte/evos_uu.pkl differ diff --git a/PKHeX.Core/Resources/byte/lvlmove_uu.pkl b/PKHeX.Core/Resources/byte/lvlmove_uu.pkl index 40cafd1d3..79426875a 100644 Binary files a/PKHeX.Core/Resources/byte/lvlmove_uu.pkl and b/PKHeX.Core/Resources/byte/lvlmove_uu.pkl differ diff --git a/PKHeX.Core/Resources/byte/personal_uu b/PKHeX.Core/Resources/byte/personal_uu index 57989e926..9c1235132 100644 Binary files a/PKHeX.Core/Resources/byte/personal_uu and b/PKHeX.Core/Resources/byte/personal_uu differ diff --git a/PKHeX.Core/Resources/text/de/text_Abilities_de.txt b/PKHeX.Core/Resources/text/de/text_Abilities_de.txt index 437630c6f..3c7567acd 100644 --- a/PKHeX.Core/Resources/text/de/text_Abilities_de.txt +++ b/PKHeX.Core/Resources/text/de/text_Abilities_de.txt @@ -230,4 +230,5 @@ Nebel-Erzeuger Gras-Erzeuger Metallprotektor Phantomschutz -Prismarüstung \ No newline at end of file +Prismarüstung +Zerebralmacht \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/de/text_Forms_de.txt b/PKHeX.Core/Resources/text/de/text_Forms_de.txt index 5157542b5..8e7b2b906 100644 --- a/PKHeX.Core/Resources/text/de/text_Forms_de.txt +++ b/PKHeX.Core/Resources/text/de/text_Forms_de.txt @@ -1061,3 +1061,8 @@ Entlarvte Original +Partner +Abend +Abend +Morgen +Ultra \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/de/text_Games_de.txt b/PKHeX.Core/Resources/text/de/text_Games_de.txt index fd2e7673b..6da84df98 100644 --- a/PKHeX.Core/Resources/text/de/text_Games_de.txt +++ b/PKHeX.Core/Resources/text/de/text_Games_de.txt @@ -30,8 +30,8 @@ Omega Rubin Sonne Mond - - +Ultrasonne +Ultramond GO Rote Blaue [INT]/Grüne [JP] diff --git a/PKHeX.Core/Resources/text/de/text_Items_de.txt b/PKHeX.Core/Resources/text/de/text_Items_de.txt index 4f468b4c0..a0432a7cb 100644 --- a/PKHeX.Core/Resources/text/de/text_Items_de.txt +++ b/PKHeX.Core/Resources/text/de/text_Items_de.txt @@ -1,4 +1,4 @@ -Keiner +Kein Meisterball Hyperball Superball @@ -918,4 +918,43 @@ Psycho-Disc Eis-Disc Drachen-Disc Unlicht-Disc -Feen-Disc \ No newline at end of file +Feen-Disc +Solgalium Z +Lunalium Z +Ultranecronium Z +Mimigmium Z +Wolwerockium Z +Grandirasium Z +Solgalium Z +Lunalium Z +Ultranecronium Z +Mimigmium Z +Wolwerockium Z +Grandirasium Z +Z-Kraftring +Rosa Blatt +Oranges Blatt +Blaues Blatt +Rotes Blatt +Grünes Blatt +Gelbes Blatt +Violettes Blatt +Regenbogenblüte +Gewitterorden +Necrosol +Necrolun +Necrosol +Necrolun +Elimas Normium Z +Nachlassball +Brutbon +Schnäppchenbon +Preisgeldbon +EP-Bon +Freundschaftsbon +Lockbon +Schutzbon +KP-Bon +AP-Bon +Statuswertebon +Fangbon \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/de/text_Moves_de.txt b/PKHeX.Core/Resources/text/de/text_Moves_de.txt index 32e17834c..568ddb78d 100644 --- a/PKHeX.Core/Resources/text/de/text_Moves_de.txt +++ b/PKHeX.Core/Resources/text/de/text_Moves_de.txt @@ -717,4 +717,13 @@ Tränendrüse Elektropikser Naturzorn Multi-Angriff -Tausendfacher Donnerblitz \ No newline at end of file +Tausendfacher Donnerblitz +Knallkopf +Plasmafäuste +Photonen-Geysir +Licht des Erlöschens +Schmetternde Sonnenwalze +Geballter Mondlaser +Herzliche Knuddelkloppe +Fataler Steinregen +Rasselnder Seelentanz \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/de/text_Species_de.txt b/PKHeX.Core/Resources/text/de/text_Species_de.txt index b37f0923e..dd0f50326 100644 --- a/PKHeX.Core/Resources/text/de/text_Species_de.txt +++ b/PKHeX.Core/Resources/text/de/text_Species_de.txt @@ -800,4 +800,9 @@ Katagami Schlingking Necrozma Magearna -Marshadow \ No newline at end of file +Marshadow +Venicro +Agoyon +Muramura +Kopplosio +Zeraora \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/de/text_sm_00000_de.txt b/PKHeX.Core/Resources/text/de/text_sm_00000_de.txt index 1256c80ee..1812fe8a0 100644 --- a/PKHeX.Core/Resources/text/de/text_sm_00000_de.txt +++ b/PKHeX.Core/Resources/text/de/text_sm_00000_de.txt @@ -108,7 +108,7 @@ Route 10 Route 11 -Küste von Ula-Ula +Strand von Ula-Ula Route 13 @@ -188,7 +188,46 @@ Kampfbaum Æther-Paradies -Ultradimension +Ultratiefsee Malihe City -Kap am Stadtrand \ No newline at end of file +Kap am Stadtrand +Mele-Mele +Akala +Ula-Ula +Poni +Big Wave Beach + +Strandhöhle + +Kantai-Strand + +Strand von Poni + +Ultrametropolis + +Metropo Tower + +Ultrakraftwerk + +Ultratal + +Ultrawüste + +Ultrawald + +Ultradschungel + +Ultrawolkenkratzer + +Ultradimension Zero + +Rocket-Schloss + +Tunnel in der Ebene + +Pikachu-Tal + +Route 1 +Trainerschule +Spaltberg-Tunnel diff --git a/PKHeX.Core/Resources/text/de/text_sm_30000_de.txt b/PKHeX.Core/Resources/text/de/text_sm_30000_de.txt index 6f536eb0a..6a5fd3a04 100644 --- a/PKHeX.Core/Resources/text/de/text_sm_30000_de.txt +++ b/PKHeX.Core/Resources/text/de/text_sm_30000_de.txt @@ -13,4 +13,5 @@ Pokémon GO Kanto-Region Hoenn-Region Alola-Region -Pokémon-Resort \ No newline at end of file +Pokémon-Resort +Johto-Region \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/de/text_tradeusum_de.txt b/PKHeX.Core/Resources/text/de/text_tradeusum_de.txt new file mode 100644 index 000000000..35231e5e0 --- /dev/null +++ b/PKHeX.Core/Resources/text/de/text_tradeusum_de.txt @@ -0,0 +1,14 @@ +Gewalter +Funky +Bärbel +Bokra +Stumpfel +Schalotte +Bolle +Hilahila +Kihe +Yuichi +Keeyan +Hepa +Kumu +Huhu \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/en/text_Abilities_en.txt b/PKHeX.Core/Resources/text/en/text_Abilities_en.txt index fe7c94295..7383e9b68 100644 --- a/PKHeX.Core/Resources/text/en/text_Abilities_en.txt +++ b/PKHeX.Core/Resources/text/en/text_Abilities_en.txt @@ -230,4 +230,5 @@ Misty Surge Grassy Surge Full Metal Body Shadow Shield -Prism Armor \ No newline at end of file +Prism Armor +Neuroforce \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/en/text_Forms_en.txt b/PKHeX.Core/Resources/text/en/text_Forms_en.txt index 1a91d7e7e..9e543bded 100644 Binary files a/PKHeX.Core/Resources/text/en/text_Forms_en.txt and b/PKHeX.Core/Resources/text/en/text_Forms_en.txt differ diff --git a/PKHeX.Core/Resources/text/en/text_Games_en.txt b/PKHeX.Core/Resources/text/en/text_Games_en.txt index 72af943fe..126c3bf8b 100644 --- a/PKHeX.Core/Resources/text/en/text_Games_en.txt +++ b/PKHeX.Core/Resources/text/en/text_Games_en.txt @@ -30,8 +30,8 @@ Omega Ruby Sun Moon - - +Ultra Sun +Ultra Moon GO Red Blue [INT]/Green [JP] diff --git a/PKHeX.Core/Resources/text/en/text_Items_en.txt b/PKHeX.Core/Resources/text/en/text_Items_en.txt index 6134c0168..5e688928b 100644 --- a/PKHeX.Core/Resources/text/en/text_Items_en.txt +++ b/PKHeX.Core/Resources/text/en/text_Items_en.txt @@ -918,4 +918,43 @@ Psychic Memory Ice Memory Dragon Memory Dark Memory -Fairy Memory \ No newline at end of file +Fairy Memory +Solganium Z +Lunalium Z +Ultranecrozium Z +Mimikium Z +Lycanium Z +Kommonium Z +Solganium Z +Lunalium Z +Ultranecrozium Z +Mimikium Z +Lycanium Z +Kommonium Z +Z-Power Ring +Pink Petal +Orange Petal +Blue Petal +Red Petal +Green Petal +Yellow Petal +Purple Petal +Rainbow Flower +Surge Badge +N-Solarizer +N-Lunarizer +N-Solarizer +N-Lunarizer +Ilima’s Normalium Z +Left Poké Ball +Roto Hatch +Roto Bargain +Roto Prize Money +Roto Exp. Points +Roto Friendship +Roto Encounter +Roto Stealth +Roto HP Restore +Roto PP Restore +Roto Boost +Roto Catch \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/en/text_Moves_en.txt b/PKHeX.Core/Resources/text/en/text_Moves_en.txt index 5c69232ec..10ea28009 100644 --- a/PKHeX.Core/Resources/text/en/text_Moves_en.txt +++ b/PKHeX.Core/Resources/text/en/text_Moves_en.txt @@ -717,4 +717,13 @@ Tearful Look Zing Zap Nature’s Madness Multi-Attack -10,000,000 Volt Thunderbolt \ No newline at end of file +10,000,000 Volt Thunderbolt +Mind Blown +Plasma Fists +Photon Geyser +Light That Burns the Sky +Searing Sunraze Smash +Menacing Moonraze Maelstrom +Let’s Snuggle Forever +Splintered Stormshards +Clangorous Soulblaze \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/en/text_Species_en.txt b/PKHeX.Core/Resources/text/en/text_Species_en.txt index 6fc31f3bd..19b5605ba 100644 --- a/PKHeX.Core/Resources/text/en/text_Species_en.txt +++ b/PKHeX.Core/Resources/text/en/text_Species_en.txt @@ -800,4 +800,9 @@ Kartana Guzzlord Necrozma Magearna -Marshadow \ No newline at end of file +Marshadow +Poipole +Naganadel +Stakataka +Blacephalon +Zeraora \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/en/text_sm_00000_en.txt b/PKHeX.Core/Resources/text/en/text_sm_00000_en.txt index ee8319d70..6f0a6e327 100644 --- a/PKHeX.Core/Resources/text/en/text_sm_00000_en.txt +++ b/PKHeX.Core/Resources/text/en/text_sm_00000_en.txt @@ -108,7 +108,7 @@ Route 10 Route 11 -Secluded Shore +Ula’ula Beach Route 13 @@ -188,7 +188,46 @@ Battle Tree Aether Paradise -Ultra Space +Ultra Deep Sea Malie City -Outer Cape \ No newline at end of file +Outer Cape +Melemele +Akala +Ula’ula +Poni +Big Wave Beach + +Sandy Cave + +Heahea Beach + +Poni Beach + +Ultra Megalopolis + +Megalo Tower + +Ultra Plant + +Ultra Crater + +Ultra Desert + +Ultra Forest + +Ultra Jungle + +Ultra Ruin + +Ultra Space Wilds + +Team Rocket’s Castle + +Plains Grotto + +Pikachu Valley + +Route 1 +Trainers’ School +Dividing Peak Tunnel diff --git a/PKHeX.Core/Resources/text/en/text_sm_30000_en.txt b/PKHeX.Core/Resources/text/en/text_sm_30000_en.txt index d72a92473..739123c6f 100644 --- a/PKHeX.Core/Resources/text/en/text_sm_30000_en.txt +++ b/PKHeX.Core/Resources/text/en/text_sm_30000_en.txt @@ -13,4 +13,5 @@ Pokémon GO the Kanto region the Hoenn region the Alola region -Poké Pelago \ No newline at end of file +Poké Pelago +the Johto region \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/en/text_tradeusum_en.txt b/PKHeX.Core/Resources/text/en/text_tradeusum_en.txt new file mode 100644 index 000000000..bf86564cc --- /dev/null +++ b/PKHeX.Core/Resources/text/en/text_tradeusum_en.txt @@ -0,0 +1,14 @@ +Cha +Noinoi +Babo +Arbo +Tumptump +Solle +Professor +Hila +Kihei +Yuichi +Miyo +Sill +Kumu +Anga \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/es/text_Abilities_es.txt b/PKHeX.Core/Resources/text/es/text_Abilities_es.txt index 36214c0bc..2411dfd37 100644 --- a/PKHeX.Core/Resources/text/es/text_Abilities_es.txt +++ b/PKHeX.Core/Resources/text/es/text_Abilities_es.txt @@ -230,4 +230,5 @@ Nebulogénesis Herbogénesis Guardia Metálica Guardia Espectro -Armadura Prisma \ No newline at end of file +Armadura Prisma +Fuerza Cerebral \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/es/text_Forms_es.txt b/PKHeX.Core/Resources/text/es/text_Forms_es.txt index 2234bb973..371ae36f6 100644 Binary files a/PKHeX.Core/Resources/text/es/text_Forms_es.txt and b/PKHeX.Core/Resources/text/es/text_Forms_es.txt differ diff --git a/PKHeX.Core/Resources/text/es/text_Games_es.txt b/PKHeX.Core/Resources/text/es/text_Games_es.txt index 5de73b3da..722830ade 100644 --- a/PKHeX.Core/Resources/text/es/text_Games_es.txt +++ b/PKHeX.Core/Resources/text/es/text_Games_es.txt @@ -30,8 +30,8 @@ Rubí Omega Sol Luna - - +Ultrasol +Ultraluna GO Roja Azul [INT]/Verde [JP] diff --git a/PKHeX.Core/Resources/text/es/text_Items_es.txt b/PKHeX.Core/Resources/text/es/text_Items_es.txt index 1eb478c6e..f9852659f 100644 --- a/PKHeX.Core/Resources/text/es/text_Items_es.txt +++ b/PKHeX.Core/Resources/text/es/text_Items_es.txt @@ -1,4 +1,4 @@ -Ninguno +Ningún Master Ball Ultra Ball Super Ball @@ -918,4 +918,43 @@ Disco Psíquico Disco Hielo Disco Dragón Disco Siniestro -Disco Hada \ No newline at end of file +Disco Hada +Solgaleostal Z +Lunalastal Z +Ultranecrostal Z +Mimikyustal Z +Lycanrostal Z +Kommostal Z +Solgaleostal Z +Lunalastal Z +Ultranecrostal Z +Mimikyustal Z +Lycanrostal Z +Kommostal Z +Superpulsera Z +Pétalo Rosa +Pétalo Naranja +Pétalo Azul +Pétalo Rojo +Pétalo Verde +Pétalo Amarillo +Pétalo Violeta +Flor Irisada +Medalla Fulgor +Necrosol +Necroluna +Necrosol +Necroluna +Cristal Z (Liam) +Poké Ball Ajena +Cupón Eclosión +Cupón Rebaja +Cupón Botín +Cupón Exp +Cupón Amistad +Cupón Reclamo +Cupón Sigilo +Cupón PS +Cupón PP +Cupón Refuerzo +Cupón Captura \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/es/text_Moves_es.txt b/PKHeX.Core/Resources/text/es/text_Moves_es.txt index 32eece2a6..8403b31ac 100644 --- a/PKHeX.Core/Resources/text/es/text_Moves_es.txt +++ b/PKHeX.Core/Resources/text/es/text_Moves_es.txt @@ -717,4 +717,13 @@ Ojos Llorosos Electropunzada Furia Natural Multiataque -Gigarrayo Fulminante \ No newline at end of file +Gigarrayo Fulminante +Cabeza Sorpresa +Puños Plasma +Géiser Fotónico +Fotodestrucción Apocalíptica +Embestida Solar +Deflagración Lunar +Somanta Amistosa +Tempestad Rocosa +Estruendo Implacable \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/es/text_Species_es.txt b/PKHeX.Core/Resources/text/es/text_Species_es.txt index 70efdd4f2..5f4da308a 100644 --- a/PKHeX.Core/Resources/text/es/text_Species_es.txt +++ b/PKHeX.Core/Resources/text/es/text_Species_es.txt @@ -800,4 +800,9 @@ Kartana Guzzlord Necrozma Magearna -Marshadow \ No newline at end of file +Marshadow +Poipole +Naganadel +Stakataka +Blacephalon +Zeraora \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/es/text_sm_00000_es.txt b/PKHeX.Core/Resources/text/es/text_sm_00000_es.txt index e18021f47..7962f8cea 100644 --- a/PKHeX.Core/Resources/text/es/text_sm_00000_es.txt +++ b/PKHeX.Core/Resources/text/es/text_sm_00000_es.txt @@ -108,7 +108,7 @@ Ruta 10 Ruta 11 -Playa Menor +Playa de Ula-Ula Ruta 13 @@ -188,7 +188,46 @@ Isla Exeggutor Paraíso Æther -Ultraespacio +Ultraabismo Ciudad Malíe -Cabo de las Afueras \ No newline at end of file +Cabo de las Afueras +Melemele +Akala +Ula-Ula +Poni +Playa Big Wave + +Cueva Costera + +Playa de Kantai + +Playa de Poni + +Ultrópolis + +Torre Ultrópolis + +Ultragenerador + +Ultravalle + +Ultradesierto + +Ultrabosque + +Ultrajungla + +Ultraurbe + +Ultraespacio Cero + +Castillo Team Rocket + +Gruta de la Llanura + +Valle de los Pikachu + +Ruta 1 +Escuela Entrenadores +Túnel del Volcán diff --git a/PKHeX.Core/Resources/text/es/text_sm_30000_es.txt b/PKHeX.Core/Resources/text/es/text_sm_30000_es.txt index 8337b4819..b58bdf48a 100644 --- a/PKHeX.Core/Resources/text/es/text_sm_30000_es.txt +++ b/PKHeX.Core/Resources/text/es/text_sm_30000_es.txt @@ -13,4 +13,5 @@ Pokémon GO Kanto Hoenn Alola -Poké Resort \ No newline at end of file +Poké Resort +Johto \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/es/text_tradeusum_es.txt b/PKHeX.Core/Resources/text/es/text_tradeusum_es.txt new file mode 100644 index 000000000..37ccf85fb --- /dev/null +++ b/PKHeX.Core/Resources/text/es/text_tradeusum_es.txt @@ -0,0 +1,14 @@ +Vengador +Tabion +Barbo +Serpi +Tronquilo +Viscosín +Torete +Hila +Kike +Yuichi +Yann +Epi +Kumu +Tito \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/fr/text_Abilities_fr.txt b/PKHeX.Core/Resources/text/fr/text_Abilities_fr.txt index f86ff3820..1b8095166 100644 --- a/PKHeX.Core/Resources/text/fr/text_Abilities_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_Abilities_fr.txt @@ -230,4 +230,5 @@ Créa-Brume Créa-Herbe Métallo-Garde Spectro-Bouclier -Prisme-Armure \ No newline at end of file +Prisme-Armure +Cérébro-Force \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/fr/text_Forms_fr.txt b/PKHeX.Core/Resources/text/fr/text_Forms_fr.txt index 1cc560b51..b3d7df7e4 100644 Binary files a/PKHeX.Core/Resources/text/fr/text_Forms_fr.txt and b/PKHeX.Core/Resources/text/fr/text_Forms_fr.txt differ diff --git a/PKHeX.Core/Resources/text/fr/text_Games_fr.txt b/PKHeX.Core/Resources/text/fr/text_Games_fr.txt index e1a9d5181..d8d36d888 100644 --- a/PKHeX.Core/Resources/text/fr/text_Games_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_Games_fr.txt @@ -30,8 +30,8 @@ Rubis Oméga Soleil Lune - - +Ultra-Soleil +Ultra-Lune GO Rouge Bleue [INT]/Vert [JP] diff --git a/PKHeX.Core/Resources/text/fr/text_Items_fr.txt b/PKHeX.Core/Resources/text/fr/text_Items_fr.txt index 64f524e81..0cb9e6542 100644 --- a/PKHeX.Core/Resources/text/fr/text_Items_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_Items_fr.txt @@ -918,4 +918,43 @@ ROM Psy ROM Glace ROM Dragon ROM Ténèbres -ROM Fée \ No newline at end of file +ROM Fée +Solgazélite +Lunazélite +Ultranécrozélite +Mimiquizélite +Lougarozélite +Ékaïzélite +Solgazélite +Lunazélite +Ultranécrozélite +Mimiquizélite +Lougarozélite +Ékaïzélite +Super Bracelet Z +Pétale Rose +Pétale Orange +Pétale Bleu +Pétale Rouge +Pétale Vert +Pétale Jaune +Pétale Violet +Fleur 7 Couleurs +Fulguro-Badge +Necrosol +Necroluna +Necrosol +Necroluna +Cristal Z Althéo +Poké Ball donnée +Moti-Couveuse +Moti-Promo +Moti-Magot +Moti-Exp +Moti-Cœur +Moti-Appât +Moti-Camouflage +Moti-Récup’ PV +Moti-Récup’ PP +Moti-Soutien +Moti-Capture \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/fr/text_Moves_fr.txt b/PKHeX.Core/Resources/text/fr/text_Moves_fr.txt index b55d9f0d0..3d76e09ef 100644 --- a/PKHeX.Core/Resources/text/fr/text_Moves_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_Moves_fr.txt @@ -717,4 +717,13 @@ Larme à l’Œil Électrikipik Ire de la Nature Coup Varia-Type -Giga-Tonnerre \ No newline at end of file +Giga-Tonnerre +Caboche-Kaboum +Plasma Punch +Photo-Geyser +Apocalypsis Luminis +Hélio-Choc Dévastateur +Rayons Séléno-Explosifs +Patati-Patattrape +Hurlement des Roches-Lames +Dracacophonie Flamboyante \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/fr/text_Species_fr.txt b/PKHeX.Core/Resources/text/fr/text_Species_fr.txt index e5d91e310..050d5d81d 100644 --- a/PKHeX.Core/Resources/text/fr/text_Species_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_Species_fr.txt @@ -800,4 +800,9 @@ Katagami Engloutyran Necrozma Magearna -Marshadow \ No newline at end of file +Marshadow +Vémini +Mandrillon +Ama-Ama +Pierroteknik +Zeraora \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/fr/text_sm_00000_fr.txt b/PKHeX.Core/Resources/text/fr/text_sm_00000_fr.txt index 8a602eafb..1c9aeee81 100644 --- a/PKHeX.Core/Resources/text/fr/text_sm_00000_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_sm_00000_fr.txt @@ -108,7 +108,7 @@ Route 10 Route 11 -Côte Sauvage +Plage d’Ula-Ula Route 13 @@ -188,7 +188,46 @@ Arbre de Combat Paradis Æther -Ultra-Dimension +Ultra-Abysses Malié -Cap Passiloin \ No newline at end of file +Cap Passiloin +Mele-Mele +Akala +Ula-Ula +Poni +Plage Big Wave + +Grotte de la Plage + +Plage d’Ho’ohale + +Plage de Poni + +Ultra-Mégalopole + +Tour Mégalopole + +Ultra-Centrale + +Ultra-Vallée + +Ultra-Désert + +Ultra-Forêt + +Ultra-Jungle + +Ultra-Gratte-Ciel + +Ultra-Dimension Zéro + +Château Rocket + +Grotte de la Plaine + +Plaine des Pikachu + +Route 1 +École de Dresseurs +Tunnel Perce-Mont diff --git a/PKHeX.Core/Resources/text/fr/text_sm_30000_fr.txt b/PKHeX.Core/Resources/text/fr/text_sm_30000_fr.txt index 0bff0c240..922c10d6c 100644 --- a/PKHeX.Core/Resources/text/fr/text_sm_30000_fr.txt +++ b/PKHeX.Core/Resources/text/fr/text_sm_30000_fr.txt @@ -13,4 +13,5 @@ Pokémon GO Kanto Hoenn Alola -Poké Loisir \ No newline at end of file +Poké Loisir +Johto \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/fr/text_tradeusum_fr.txt b/PKHeX.Core/Resources/text/fr/text_tradeusum_fr.txt new file mode 100644 index 000000000..b02682c95 --- /dev/null +++ b/PKHeX.Core/Resources/text/fr/text_tradeusum_fr.txt @@ -0,0 +1,14 @@ +Luchabrutal +Ionel +Boubouille +Le Roy +Jérôme +Coquillette +Institutaur +Hilahila +Kihe +Arnold +Josette +Hepa +Kumu +Inaina \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/it/text_Abilities_it.txt b/PKHeX.Core/Resources/text/it/text_Abilities_it.txt index 54807badf..56080541a 100644 --- a/PKHeX.Core/Resources/text/it/text_Abilities_it.txt +++ b/PKHeX.Core/Resources/text/it/text_Abilities_it.txt @@ -230,4 +230,5 @@ Nebbiogenesi Erbogenesi Metalprotezione Spettroguardia -Scudoprisma \ No newline at end of file +Scudoprisma +Cerebroforza \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/it/text_Forms_it.txt b/PKHeX.Core/Resources/text/it/text_Forms_it.txt index 0e652534e..48fe21a4f 100644 Binary files a/PKHeX.Core/Resources/text/it/text_Forms_it.txt and b/PKHeX.Core/Resources/text/it/text_Forms_it.txt differ diff --git a/PKHeX.Core/Resources/text/it/text_Games_it.txt b/PKHeX.Core/Resources/text/it/text_Games_it.txt index 765016b58..bdc33cbd4 100644 --- a/PKHeX.Core/Resources/text/it/text_Games_it.txt +++ b/PKHeX.Core/Resources/text/it/text_Games_it.txt @@ -30,8 +30,8 @@ Rubino Omega Sole Luna - - +Ultrasole +Ultraluna GO Rossa Blu [INT]/Verde [JP] diff --git a/PKHeX.Core/Resources/text/it/text_Items_it.txt b/PKHeX.Core/Resources/text/it/text_Items_it.txt index 4e93cdc96..338ed77de 100644 --- a/PKHeX.Core/Resources/text/it/text_Items_it.txt +++ b/PKHeX.Core/Resources/text/it/text_Items_it.txt @@ -918,4 +918,43 @@ ROM Psico ROM Ghiaccio ROM Drago ROM Buio -ROM Folletto \ No newline at end of file +ROM Folletto +Solgaleium Z +Lunalium Z +Ultranecrozium Z +Mimikyum Z +Lycanrochium Z +Kommonium Z +Solgaleium Z +Lunalium Z +Ultranecrozium Z +Mimikyum Z +Lycanrochium Z +Kommonium Z +Supercerchio Z +Petalo rosa +Petalo arancione +Petalo azzurro +Petalo rosso +Petalo verde +Petalo giallo +Petalo violetto +Fiore arcobaleno +Medaglia Tonante +Necrosolix +Necrolunix +Necrosolix +Necrolunix +Normium Z Liam +Poké Ball altrui +Cova’n’roll +Sconto’n’roll +Soldi’n’roll +Esp’n’roll +Affetto’n’roll +Incontra’n’roll +Repelle’n’roll +PS’n’roll +PP’n’roll +Stat’n’roll +Acchiappa’n’roll \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/it/text_Moves_it.txt b/PKHeX.Core/Resources/text/it/text_Moves_it.txt index 907c34183..0f6526199 100644 --- a/PKHeX.Core/Resources/text/it/text_Moves_it.txt +++ b/PKHeX.Core/Resources/text/it/text_Moves_it.txt @@ -717,4 +717,13 @@ Occhionilucidi Elettropizzico Ira della Natura Multiattacco -Iperfulmine \ No newline at end of file +Iperfulmine +Sbalorditesta +Pugni Plasma +Geyser Fotonico +Fotodistruzione Apocalittica +Supercollisione Solare +Deflagrazione Lunare +Dolcesacco di Botte +Litotempesta Radiale +Dracofonia Divampante \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/it/text_Species_it.txt b/PKHeX.Core/Resources/text/it/text_Species_it.txt index d5381a1c1..a3e81d291 100644 --- a/PKHeX.Core/Resources/text/it/text_Species_it.txt +++ b/PKHeX.Core/Resources/text/it/text_Species_it.txt @@ -800,4 +800,9 @@ Kartana Guzzlord Necrozma Magearna -Marshadow \ No newline at end of file +Marshadow +Poipole +Naganadel +Stakataka +Blacephalon +Zeraora \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/it/text_sm_00000_it.txt b/PKHeX.Core/Resources/text/it/text_sm_00000_it.txt index 3f1f6907f..ecdebf24e 100644 --- a/PKHeX.Core/Resources/text/it/text_sm_00000_it.txt +++ b/PKHeX.Core/Resources/text/it/text_sm_00000_it.txt @@ -108,7 +108,7 @@ Percorso 10 Percorso 11 -Lido di Ula Ula +Spiaggia di Ula Ula Percorso 13 @@ -188,7 +188,46 @@ Albero della Lotta Æther Paradise -Ultramondo +Ultrabisso Malie -Promontorio di Malie \ No newline at end of file +Promontorio di Malie +Mele Mele +Akala +Ula Ula +Poni +Spiaggia Big Wave + +Caverna Costiera + +Spiaggia di Kantai + +Spiaggia di Poni + +Ultramegalopoli + +Torre Megalopoli + +Ultracentrale + +Ultravalle + +Ultradeserto + +Ultraforesta + +Ultragiungla + +Ultragglomerato + +Ultramondo Ignoto + +Castello Team Rocket + +Grotta Prateria + +Valle dei Pikachu + +Percorso 1 +Scuola Allenatori +Tunnel del Vulcano diff --git a/PKHeX.Core/Resources/text/it/text_sm_30000_it.txt b/PKHeX.Core/Resources/text/it/text_sm_30000_it.txt index 78ca30a7f..a2720a06c 100644 --- a/PKHeX.Core/Resources/text/it/text_sm_30000_it.txt +++ b/PKHeX.Core/Resources/text/it/text_sm_30000_it.txt @@ -13,4 +13,5 @@ Pokémon GO Kanto Hoenn Alola -Poké Resort \ No newline at end of file +Poké Resort +Johto \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/it/text_tradeusum_it.txt b/PKHeX.Core/Resources/text/it/text_tradeusum_it.txt new file mode 100644 index 000000000..e357a418e --- /dev/null +++ b/PKHeX.Core/Resources/text/it/text_tradeusum_it.txt @@ -0,0 +1,14 @@ +Luchano +Tabion +Barbuccia +Arby +Tumpin +Shelly +Prof +Hilahila +Kihe +Pinuccio +Lalla +Hepa +Kumu +Huhu \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ja/text_Abilities_ja.txt b/PKHeX.Core/Resources/text/ja/text_Abilities_ja.txt index 1c24b11ab..3a5488a8d 100644 --- a/PKHeX.Core/Resources/text/ja/text_Abilities_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_Abilities_ja.txt @@ -230,4 +230,5 @@ グラスメイカー メタルプロテクト ファントムガード -プリズムアーマー \ No newline at end of file +プリズムアーマー +ブレインフォース \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ja/text_Forms_ja.txt b/PKHeX.Core/Resources/text/ja/text_Forms_ja.txt index 3af9178dc..156506c95 100644 Binary files a/PKHeX.Core/Resources/text/ja/text_Forms_ja.txt and b/PKHeX.Core/Resources/text/ja/text_Forms_ja.txt differ diff --git a/PKHeX.Core/Resources/text/ja/text_Games_ja.txt b/PKHeX.Core/Resources/text/ja/text_Games_ja.txt index ef06a74e5..c82f35352 100644 --- a/PKHeX.Core/Resources/text/ja/text_Games_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_Games_ja.txt @@ -30,8 +30,8 @@ Y サン ムーン - - +ウルトラサン +ウルトラムーン GO 赤 青 [INT]/緑 [JP] diff --git a/PKHeX.Core/Resources/text/ja/text_Items_ja.txt b/PKHeX.Core/Resources/text/ja/text_Items_ja.txt index 41756b368..70d026889 100644 --- a/PKHeX.Core/Resources/text/ja/text_Items_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_Items_ja.txt @@ -918,4 +918,43 @@ アイスメモリ ドラゴンメモリ ダークメモリ -フェアリーメモリ \ No newline at end of file +フェアリーメモリ +ソルガレオZ +ルナアーラZ +ウルトラネクロZ +ミミッキュZ +ルガルガンZ +ジャラランガZ +ソルガレオZ +ルナアーラZ +ウルトラネクロZ +ミミッキュZ +ルガルガンZ +ジャラランガZ +Zパワーリング +ももいろはなびら +だいだいはなびら +あおのはなびら +あかのはなびら +みどりのはなびら +きいろのはなびら +むらさきはなびら +にじいろのはな +だいだいバッジ +ネクロプラスソル +ネクロプラスルナ +ネクロプラスソル +ネクロプラスルナ +イリマのノーマルZ +のこされたボール +タマゴふかポン +やすうりポン +おこづかいポン +けいけんポン +なつきポン +みっけポン +かくれポン +HPかいふくポン +PPかいふくポン +おうえんポン +つかまえポン \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ja/text_Moves_ja.txt b/PKHeX.Core/Resources/text/ja/text_Moves_ja.txt index 5fbe7bf11..eb1f33576 100644 --- a/PKHeX.Core/Resources/text/ja/text_Moves_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_Moves_ja.txt @@ -717,4 +717,13 @@ びりびりちくちく しぜんのいかり マルチアタック -1000まんボルト \ No newline at end of file +1000まんボルト +ビックリヘッド +プラズマフィスト +フォトンゲイザー +てんこがすめつぼうのひかり +サンシャインスマッシャー +ムーンライトブラスター +ぽかぼかフレンドタイム +ラジアルエッジストーム +ブレイジングソウルビート \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ja/text_Species_ja.txt b/PKHeX.Core/Resources/text/ja/text_Species_ja.txt index 260f617a3..6c0715891 100644 --- a/PKHeX.Core/Resources/text/ja/text_Species_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_Species_ja.txt @@ -1,4 +1,4 @@ -タマゴ +タマゴ フシギダネ フシギソウ フシギバナ @@ -800,4 +800,9 @@ アクジキング ネクロズマ マギアナ -マーシャドー \ No newline at end of file +マーシャドー +ベベノム +アーゴヨン +ツンデツンデ +ズガドーン +ゼラオラ \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ja/text_sm_00000_ja.txt b/PKHeX.Core/Resources/text/ja/text_sm_00000_ja.txt index 7d5b7cdc6..056445d85 100644 --- a/PKHeX.Core/Resources/text/ja/text_sm_00000_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_sm_00000_ja.txt @@ -108,7 +108,7 @@ 11ばんどうろ -ウラウラうらかいがん +ウラウラビーチ 13ばんどうろ @@ -188,7 +188,46 @@ エーテルパラダイス -ウルトラスペース +ウルトラディープシー マリエシティ -はずれのみさき \ No newline at end of file +はずれのみさき +メレメレ +アーカラ +ウラウラ +ポニ +ビッグウェーブビーチ + +はまべのほらあな + +カンタイビーチ + +ポニのビーチ + +ウルトラメガロポリス + +メガロタワー + +ウルトラプラント + +ウルトラバレー + +ウルトラデザート + +ウルトラフォレスト + +ウルトラジャングル + +ウルトラビルディング + +ウルトラスペースゼロ + +ロケットだんのしろ + +こうやのよこあな + +ピカチュウのたに + +1ばんどうろ +トレーナーズスクール +ワカツダケトンネル diff --git a/PKHeX.Core/Resources/text/ja/text_sm_30000_ja.txt b/PKHeX.Core/Resources/text/ja/text_sm_30000_ja.txt index 02e2648e7..866efe1c1 100644 --- a/PKHeX.Core/Resources/text/ja/text_sm_30000_ja.txt +++ b/PKHeX.Core/Resources/text/ja/text_sm_30000_ja.txt @@ -13,4 +13,5 @@ Pokémon GO カントーちほう ホウエンちほう アローラちほう -ポケリゾート \ No newline at end of file +ポケリゾート +ジョウトちほう \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ja/text_tradeusum_ja.txt b/PKHeX.Core/Resources/text/ja/text_tradeusum_ja.txt new file mode 100644 index 000000000..97fa0b8c2 --- /dev/null +++ b/PKHeX.Core/Resources/text/ja/text_tradeusum_ja.txt @@ -0,0 +1,14 @@ +オーガー +りくひさ +レナレナ +ロイ +ワーイ +バブコ +きょうじゅ +ヒラヒラ +キヘ +ユイッチー +キーヤン +ヘパ +クム +フフー \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ko/text_Abilities_ko.txt b/PKHeX.Core/Resources/text/ko/text_Abilities_ko.txt index 2d9655496..b2161fd33 100644 --- a/PKHeX.Core/Resources/text/ko/text_Abilities_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_Abilities_ko.txt @@ -230,4 +230,5 @@ AR시스템 그래스메이커 메탈프로텍트 스펙터가드 -프리즘아머 \ No newline at end of file +프리즘아머 +브레인포스 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ko/text_Forms_ko.txt b/PKHeX.Core/Resources/text/ko/text_Forms_ko.txt index 8407a7b90..e1332275a 100644 Binary files a/PKHeX.Core/Resources/text/ko/text_Forms_ko.txt and b/PKHeX.Core/Resources/text/ko/text_Forms_ko.txt differ diff --git a/PKHeX.Core/Resources/text/ko/text_Games_ko.txt b/PKHeX.Core/Resources/text/ko/text_Games_ko.txt index 314da6930..008c433a8 100644 --- a/PKHeX.Core/Resources/text/ko/text_Games_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_Games_ko.txt @@ -30,8 +30,8 @@ Y 썬 문 - - +울트라썬 +울트라문 고 레드 블루 [INT]/그린 [JP] diff --git a/PKHeX.Core/Resources/text/ko/text_Items_ko.txt b/PKHeX.Core/Resources/text/ko/text_Items_ko.txt index 91d240cc8..365c58faf 100644 --- a/PKHeX.Core/Resources/text/ko/text_Items_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_Items_ko.txt @@ -918,4 +918,43 @@ Z링 아이스메모리 드래곤메모리 다크메모리 -페어리메모리 \ No newline at end of file +페어리메모리 +솔가레오Z +루나아라Z +울트라네크로Z +따라큐Z +루가루암Z +짜랑고우거Z +솔가레오Z +루나아라Z +울트라네크로Z +따라큐Z +루가루암Z +짜랑고우거Z +Z파워링 +담홍꽃잎 +주황꽃잎 +파랑꽃잎 +빨강꽃잎 +초록꽃잎 +노랑꽃잎 +보라꽃잎 +무지개꽃 +주황배지 +네크로플러스솔 +네크로플러스루나 +네크로플러스솔 +네크로플러스루나 +일리마의 노말Z +남겨진 볼 +알부화캡슐토이 +할인캡슐토이 +용돈캡슐토이 +경험캡슐토이 +친밀도캡슐토이 +발견캡슐토이 +숨기캡슐토이 +HP회복캡슐토이 +PP회복캡슐토이 +응원캡슐토이 +잡기캡슐토이 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ko/text_Moves_ko.txt b/PKHeX.Core/Resources/text/ko/text_Moves_ko.txt index f2b96e38d..17f6ee7bd 100644 --- a/PKHeX.Core/Resources/text/ko/text_Moves_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_Moves_ko.txt @@ -717,4 +717,13 @@ DD래리어트 찌리리따끔따끔 자연의분노 멀티어택 -1000만볼트 \ No newline at end of file +1000만볼트 +깜짝헤드 +플라스마피스트 +포톤가이저 +하늘을태우는멸망의빛 +선샤인스매셔 +문라이트블래스터 +투닥투닥프렌드타임 +레이디얼에지스톰 +브레이징소울비트 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ko/text_Species_ko.txt b/PKHeX.Core/Resources/text/ko/text_Species_ko.txt index c82fd37a3..4ab4c9596 100644 --- a/PKHeX.Core/Resources/text/ko/text_Species_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_Species_ko.txt @@ -800,4 +800,9 @@ 악식킹 네크로즈마 마기아나 -마샤도 \ No newline at end of file +마샤도 +베베놈 +아고용 +차곡차곡 +두파팡 +제라오라 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ko/text_sm_00000_ko.txt b/PKHeX.Core/Resources/text/ko/text_sm_00000_ko.txt index 5cda70b58..4a0ee246b 100644 --- a/PKHeX.Core/Resources/text/ko/text_sm_00000_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_sm_00000_ko.txt @@ -108,7 +108,7 @@ 11번도로 -울라울라 뒤쪽 해안 +울라울라비치 13번도로 @@ -188,7 +188,46 @@ 에테르파라다이스 -울트라스페이스 +울트라딥시 말리에시티 -외곽해안가 \ No newline at end of file +외곽해안가 +멜레멜레 +아칼라 +울라울라 +포니 +빅웨이브비치 + +해변 동굴 + +환대비치 + +포니비치 + +울트라메가로폴리스 + +메가로타워 + +울트라플랜트 + +울트라밸리 + +울트라데저트 + +울트라포레스트 + +울트라정글 + +울트라빌딩 + +울트라스페이스제로 + +로켓단의 성 + +황야 옆굴 + +피카츄 골짜기 + +1번도로 +트레이너스쿨 +경계터널 diff --git a/PKHeX.Core/Resources/text/ko/text_sm_30000_ko.txt b/PKHeX.Core/Resources/text/ko/text_sm_30000_ko.txt index 35499466d..aef7e43c0 100644 --- a/PKHeX.Core/Resources/text/ko/text_sm_30000_ko.txt +++ b/PKHeX.Core/Resources/text/ko/text_sm_30000_ko.txt @@ -13,4 +13,5 @@ Pokémon GO 관동지방 호연지방 알로라지방 -포켓리조트 \ No newline at end of file +포켓리조트 +성도지방 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/ko/text_tradeusum_ko.txt b/PKHeX.Core/Resources/text/ko/text_tradeusum_ko.txt new file mode 100644 index 000000000..deb91b065 --- /dev/null +++ b/PKHeX.Core/Resources/text/ko/text_tradeusum_ko.txt @@ -0,0 +1,14 @@ +차부 +자뱃 +꼬롱꼬롱 +도이 +와이 +추르르 +교수 +히라히라 +키헤 +유일 +기안 +헤파 +쿠무 +후후 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/script/const_usum_en.txt b/PKHeX.Core/Resources/text/script/const_usum_en.txt new file mode 100644 index 000000000..62c311d72 --- /dev/null +++ b/PKHeX.Core/Resources/text/script/const_usum_en.txt @@ -0,0 +1,5 @@ +148 Starter 00:Rowlet,01:Litten,02:Popplio +432 Tapu Koko 03:Battleable,04:Defeated,05:Captured +433 Tapu Lele 01:Battleable,02:Defeated,03:Captured +434 Tapu Bulu 01:Battleable,02:Defeated,03:Captured +404 Tapu Fini 03:Battleable,04:Defeated,05:Captured \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/script/flags_oras_en.txt b/PKHeX.Core/Resources/text/script/flags_oras_en.txt index 6b6697f39..3808aab35 100644 --- a/PKHeX.Core/Resources/text/script/flags_oras_en.txt +++ b/PKHeX.Core/Resources/text/script/flags_oras_en.txt @@ -19,7 +19,7 @@ 2834 (OR) Latias Captured 0420 (AS) Latios Defeated 2835 (AS) Latios Captured -2915 Eon Ticket Event Completed +2915 Eon Ticket Event Completed 0945 Deoxys Defeated @ Sky Tower 2842 Deoxys Captured @ Sky Tower 0173 Raikou Defeated diff --git a/PKHeX.Core/Resources/text/script/flags_sm_en.txt b/PKHeX.Core/Resources/text/script/flags_sm_en.txt index 8941b22e4..f4a8291da 100644 --- a/PKHeX.Core/Resources/text/script/flags_sm_en.txt +++ b/PKHeX.Core/Resources/text/script/flags_sm_en.txt @@ -1,5 +1,7 @@ 3100 Is Alolan Champion + Magearna Event Active -3487 Received Magearna Gift +3487 Received Gift Magearna +0493 Received Gift Porygon +0504 Received Gift Aerodactyl 1216 Received Gift Cosmog -0499 Received Gift Type:Null -0160 Moone[0] / Sunne Portal [1] \ No newline at end of file +0499 Received Gift Type: Null +0160 Moone [0] / Sunne Portal [1] \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/script/flags_usum_en.txt b/PKHeX.Core/Resources/text/script/flags_usum_en.txt new file mode 100644 index 000000000..7d68031db --- /dev/null +++ b/PKHeX.Core/Resources/text/script/flags_usum_en.txt @@ -0,0 +1,39 @@ +0493 Received Gift Porygon +0504 Received Gift Aerodactyl +4420 Articuno Captured +4421 Zapdos Captured +4422 Moltres Captured +4423 Mewtwo Captured +4260 (US) Raikou Captured +4261 (UM) Entei Captured +4262 Suicune Captured +4263 (UM) Lugia Captured +4264 (US) Ho-Oh Captured +4285 Regirock Captured +4286 Regice Captured +4287 Registeel Captured +4283 (UM) Latias Captured +4284 (US) Latios Captured +4289 (UM) Kyogre Captured +4288 (US) Groudon Captured +4290 Rayquaza Captured +4265 Uxie Captured +4266 Mesprit Captured +4267 Azelf Captured +4268 (US) Dialga Captured +4269 (UM) Palkia Captured +4270 (US) Heatran Captured +4271 (UM) Regigigas Captured +4272 Giratina Captured +4273 Cresselia Captured +4274 Cobalion Captured +4275 Terrakion Captured +4276 Virizion Captured +4277 (US) Tornadus Captured +4278 (UM) Thundurus Captured +4279 (US) Reshiram Captured +4280 (UM) Zekrom Captured +4281 Landorus Captured +4282 Kyurem Captured +4424 (US) Xerneas Captured +4425 (UM) Yveltal Captured \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Abilities_zh.txt b/PKHeX.Core/Resources/text/zh/text_Abilities_zh.txt index 3038a93f5..289c55092 100644 --- a/PKHeX.Core/Resources/text/zh/text_Abilities_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_Abilities_zh.txt @@ -230,4 +230,5 @@ 青草制造者 金属防护 幻影防守 -棱镜装甲 \ No newline at end of file +棱镜装甲 +脑核之力 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Char_zh.txt b/PKHeX.Core/Resources/text/zh/text_Char_zh.txt index 713e87865..1573b9e1f 100644 --- a/PKHeX.Core/Resources/text/zh/text_Char_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_Char_zh.txt @@ -1 +1 @@ -蛋妙蛙种子草花小火龙恐喷杰尼龟卡咪水箭绿毛虫铁甲蛹巴大蝶独角壳针蜂波比鸟拉达烈雀嘴阿柏蛇怪皮丘雷穿山鼠王多兰娜后朗力诺可西六尾九胖丁超音蝠走路臭霸派斯特球摩鲁蛾地三喵猫老鸭哥猴暴蒂狗风速蚊香蝌蚪君泳士凯勇基胡腕豪喇叭芽口呆食玛瑙母毒刺拳石隆岩马焰兽磁合一葱嘟利海狮白泥舌贝鬼通耿催眠貘引梦人钳蟹巨霹雳电顽弹椰树嘎啦飞腿郎快头瓦双犀牛钻吉蔓藤袋墨金鱼星宝魔墙偶天螳螂迷唇姐击罗肯泰鲤普百变伊布边菊化盔镰刀翼急冻闪你哈克幻叶月桂竺葵锯鳄蓝立咕夜鹰芭瓢安圆丝蛛叉字灯笼古然咩羊茸美丽露才皇毽棉长手向日蜻蜓乌沼太阳亮黑暗鸦妖未知图腾果翁麒麟奇榛佛托土弟蝎钢千壶赫狃熊圈熔蜗猪珊瑚炮章桶信使翅戴加象顿Ⅱ惊鹿犬无畏战舞娃奶罐幸福公炎帝幼沙班洛亚凤时木守宫森林蜥蜴稚鸡壮跃狼纹直冲茧狩猎盾粉莲童帽乐河橡实鼻狡猾傲骨燕鸥莉奈朵溜糖雨蘑菇斗笠懒獭过动猿请假居忍面者脱妞吼爆幕下掌朝北优雅勾魂眼那恰姆落正拍负萤甜蔷薇溶吞牙鲨鲸驼煤炭跳噗晃斑颚蚁漠仙歌青绵七夕鼬斩饭匙鳅鲶虾兵螯秤念触摇篮羽丑纳飘浮泡隐怨影诅咒巡灵彷徨热带铃勃梭雪冰护豹珍珠樱空棘爱心哑属艾欧盖固坐祈代希苗台猛曼拿儿狸法师箱蟀勒伦琴含羞苞槌城结贵妇绅蜜女帕兹潜兔随卷耳魅东施铛响坦铜镜钟盆聒噪陆尖咬不良骷荧光霓虹自舔狂远Z由卢席恩骑色霏莱谢米尔宙提主暖炒武刃丸剑探步哨约扒酷冷蚀豆鸽高雉幔庞滚蝙螺钉差搬运匠修建蟾蜍投摔打包保足蜈蚣车轮精根裙野蛮鲈混流氓红倒狒殿滑巾征哭具死神棺原肋始祖破灰尘索沫栗德单卵细胞造鹅倍四季萌哎呀败轻蜘坚齿组麻鳗宇烛幽晶斧嚏几何敏捷功夫父赤驹劈司令炸雄秃丫首恶燃烧毕云酋迪耶塔赛里狐呱贺掘彩蓓洁能鞘芳芙妮好鱿贼脚铠垃藻臂枪伞咚碎黏钥朽南瓜嗡哲裴格枭狙射炽咆哮虎漾壬笃啄铳少强锹农胜虻鬃弱坏驴仔重挽滴伪睡罩盗着竹疗环智挥猩掷胆噬堡爷参性:银伴陨枕戈谜拟Q磨舵鳞杖璞・鸣哞鳍科莫迦虚吾肌费束辉纸御机夏 \ No newline at end of file +蛋妙蛙种子草花小火龙恐喷杰尼龟卡咪水箭绿毛虫铁甲蛹巴大蝶独角壳针蜂波比鸟拉达烈雀嘴阿柏蛇怪皮丘雷穿山鼠王多兰娜后朗力诺可西六尾九胖丁超音蝠走路臭霸派斯特球摩鲁蛾地三喵猫老鸭哥猴暴蒂狗风速蚊香蝌蚪君泳士凯勇基胡腕豪喇叭芽口呆食玛瑙母毒刺拳石隆岩马焰兽磁合一葱嘟利海狮白泥舌贝鬼通耿催眠貘引梦人钳蟹巨霹雳电顽弹椰树嘎啦飞腿郎快头瓦双犀牛钻吉蔓藤袋墨金鱼星宝魔墙偶天螳螂迷唇姐击罗肯泰鲤普百变伊布边菊化盔镰刀翼急冻闪你哈克幻叶月桂竺葵锯鳄蓝立咕夜鹰芭瓢安圆丝蛛叉字灯笼古然咩羊茸美丽露才皇毽棉长手向日蜻蜓乌沼太阳亮黑暗鸦妖未知图腾果翁麒麟奇榛佛托土弟蝎钢千壶赫狃熊圈熔蜗猪珊瑚炮章桶信使翅戴加象顿Ⅱ惊鹿犬无畏战舞娃奶罐幸福公炎帝幼沙班洛亚凤时木守宫森林蜥蜴稚鸡壮跃狼纹直冲茧狩猎盾粉莲童帽乐河橡实鼻狡猾傲骨燕鸥莉奈朵溜糖雨蘑菇斗笠懒獭过动猿请假居忍面者脱妞吼爆幕下掌朝北优雅勾魂眼那恰姆落正拍负萤甜蔷薇溶吞牙鲨鲸驼煤炭跳噗晃斑颚蚁漠仙歌青绵七夕鼬斩饭匙鳅鲶虾兵螯秤念触摇篮羽丑纳飘浮泡隐怨影诅咒巡灵彷徨热带铃勃梭雪冰护豹珍珠樱空棘爱心哑属艾欧盖固坐祈代希苗台猛曼拿儿狸法师箱蟀勒伦琴含羞苞槌城结贵妇绅蜜女帕兹潜兔随卷耳魅东施铛响坦铜镜钟盆聒噪陆尖咬不良骷荧光霓虹自舔狂远Z由卢席恩骑色霏莱谢米尔宙提主暖炒武刃丸剑探步哨约扒酷冷蚀豆鸽高雉幔庞滚蝙螺钉差搬运匠修建蟾蜍投摔打包保足蜈蚣车轮精根裙野蛮鲈混流氓红倒狒殿滑巾征哭具死神棺原肋始祖破灰尘索沫栗德单卵细胞造鹅倍四季萌哎呀败轻蜘坚齿组麻鳗宇烛幽晶斧嚏几何敏捷功夫父赤驹劈司令炸雄秃丫首恶燃烧毕云酋迪耶塔赛里狐呱贺掘彩蓓洁能鞘芳芙妮好鱿贼脚铠垃藻臂枪伞咚碎黏钥朽南瓜嗡哲裴格枭狙射炽咆哮虎漾壬笃啄铳少强锹农胜虻鬃弱坏驴仔重挽滴伪睡罩盗着竹疗环智挥猩掷胆噬堡爷参性:银伴陨枕戈谜拟Q磨舵鳞杖璞・鸣哞鳍科莫迦虚吾肌费束辉纸御机夏蛋妙蛙種子草花小火龍恐噴傑尼龜卡咪水箭綠毛蟲鐵甲蛹巴大蝶獨角殼針蜂波比鳥拉達烈雀嘴阿柏蛇怪皮丘雷穿山鼠王多蘭娜后朗力諾可西六尾九胖丁超音蝠走路臭霸派斯特球摩魯蛾地三喵貓老鴨哥猴爆蒂狗風速蚊香蝌蚪君泳士凱勇基胡腕豪喇叭芽口呆食瑪瑙母毒刺拳石隆岩馬焰獸磁合一蔥嘟利海獅白泥舌貝鬼通耿催眠貘引夢人鉗蟹巨霹靂電頑彈椰樹嘎啦飛腿郎快頭瓦雙犀牛鑽吉蔓藤袋墨金魚星寶魔牆偶天螳螂迷唇姐擊羅肯泰鯉暴普百變伊布邊菊化盔鐮刀翼急凍閃你哈克幻葉月桂竺葵鋸鱷藍立咕夜鷹芭瓢安圓絲蛛叉字燈籠古然咩羊茸美麗露才皇毽棉長手向日蜻蜓烏沼太陽亮黑暗鴉妖未知圖騰果翁麒麟奇榛佛托土弟蠍鋼千壺赫狃熊圈熔蝸豬珊瑚炮章桶信使翅戴加象頓Ⅱ驚鹿犬無畏戰舞娃奶罐幸福公炎帝幼沙班洛亞鳳時木守宮森林蜥蜴稚雞壯躍狼紋直衝繭狩獵盾粉蓮童帽樂河橡實鼻狡猾傲骨燕鷗莉奈朵溜糖雨蘑菇斗笠懶獺過動猿請假居忍面者脫妞吼幕下掌朝北優雅勾魂眼那恰姆落正拍負螢甜薔薇溶吞牙鯊鯨駝煤炭跳噗晃斑顎蟻漠仙歌青綿七夕鼬斬飯匙鰍鯰蝦兵螯秤念觸搖籃羽醜納飄浮泡隱怨影詛咒巡靈彷徨熱帶鈴勃梭雪冰護豹珍珠櫻空棘愛心啞屬艾歐蓋固坐祈代希苗台猛曼拿兒狸法師箱蟀勒倫琴含羞苞槌城結貴婦紳蜜女帕茲潛兔隨捲耳魅東施鐺響坦銅鏡鐘盆聒噪陸尖咬不良骷光霓虹自舔狂遠Z由盧席恩騎色霏萊謝米爾宙提主暖炒武刃丸劍探步哨約扒酷冷蝕豆鴿高雉幔龐滾蝙螺釘差搬運匠修建蟾蜍投摔打包保足蜈蚣車輪毬精根裙野蠻鱸混流氓紅倒狒殿滑巾徵哭具死神棺原肋始祖破灰塵索沫栗德單卵細胞造鵝倍四季萌哎呀敗輕蜘堅齒組麻鰻宇燭幽晶斧嚏幾何敏捷功夫父赤駒劈司令炸雄禿丫首惡燃燒畢雲酋迪耶塔賽里狐呱賀掘彩蓓潔能鞘芳芙妮好魷賊腳鎧垃藻臂槍傘咚碎黏鑰朽南瓜嗡哲裴格梟狙射熾咆哮虎漾壬篤啄銃少強鍬農勝虻鬃弱壞驢仔重挽滴偽睡罩盜著竹療環智揮猩擲膽噬堡爺參性:銀伴隕枕戈謎擬Q磨舵鱗杖璞・鳴哞鰭科莫迦虛吾肌費束輝紙御機夏垒磊砰奥壘磊砰丑奧 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Char_zh2.txt b/PKHeX.Core/Resources/text/zh/text_Char_zh2.txt deleted file mode 100644 index e01869e31..000000000 --- a/PKHeX.Core/Resources/text/zh/text_Char_zh2.txt +++ /dev/null @@ -1 +0,0 @@ -蛋妙蛙種子草花小火龍恐噴傑尼龜卡咪水箭綠毛蟲鐵甲蛹巴大蝶獨角殼針蜂波比鳥拉達烈雀嘴阿柏蛇怪皮丘雷穿山鼠王多蘭娜后朗力諾可西六尾九胖丁超音蝠走路臭霸派斯特球摩魯蛾地三喵貓老鴨哥猴爆蒂狗風速蚊香蝌蚪君泳士凱勇基胡腕豪喇叭芽口呆食瑪瑙母毒刺拳石隆岩馬焰獸磁合一蔥嘟利海獅白泥舌貝鬼通耿催眠貘引夢人鉗蟹巨霹靂電頑彈椰樹嘎啦飛腿郎快頭瓦雙犀牛鑽吉蔓藤袋墨金魚星寶魔牆偶天螳螂迷唇姐擊羅肯泰鯉暴普百變伊布邊菊化盔鐮刀翼急凍閃你哈克幻葉月桂竺葵鋸鱷藍立咕夜鷹芭瓢安圓絲蛛叉字燈籠古然咩羊茸美麗露才皇毽棉長手向日蜻蜓烏沼太陽亮黑暗鴉妖未知圖騰果翁麒麟奇榛佛托土弟蠍鋼千壺赫狃熊圈熔蝸豬珊瑚炮章桶信使翅戴加象頓Ⅱ驚鹿犬無畏戰舞娃奶罐幸福公炎帝幼沙班洛亞鳳時木守宮森林蜥蜴稚雞壯躍狼紋直衝繭狩獵盾粉蓮童帽樂河橡實鼻狡猾傲骨燕鷗莉奈朵溜糖雨蘑菇斗笠懶獺過動猿請假居忍面者脫妞吼幕下掌朝北優雅勾魂眼那恰姆落正拍負螢甜薔薇溶吞牙鯊鯨駝煤炭跳噗晃斑顎蟻漠仙歌青綿七夕鼬斬飯匙鰍鯰蝦兵螯秤念觸搖籃羽醜納飄浮泡隱怨影詛咒巡靈彷徨熱帶鈴勃梭雪冰護豹珍珠櫻空棘愛心啞屬艾歐蓋固坐祈代希苗台猛曼拿兒狸法師箱蟀勒倫琴含羞苞槌城結貴婦紳蜜女帕茲潛兔隨捲耳魅東施鐺響坦銅鏡鐘盆聒噪陸尖咬不良骷光霓虹自舔狂遠Z由盧席恩騎色霏萊謝米爾宙提主暖炒武刃丸劍探步哨約扒酷冷蝕豆鴿高雉幔龐滾蝙螺釘差搬運匠修建蟾蜍投摔打包保足蜈蚣車輪毬精根裙野蠻鱸混流氓紅倒狒殿滑巾徵哭具死神棺原肋始祖破灰塵索沫栗德單卵細胞造鵝倍四季萌哎呀敗輕蜘堅齒組麻鰻宇燭幽晶斧嚏幾何敏捷功夫父赤駒劈司令炸雄禿丫首惡燃燒畢雲酋迪耶塔賽里狐呱賀掘彩蓓潔能鞘芳芙妮好魷賊腳鎧垃藻臂槍傘咚碎黏鑰朽南瓜嗡哲裴格梟狙射熾咆哮虎漾壬篤啄銃少強鍬農勝虻鬃弱壞驢仔重挽滴偽睡罩盜著竹療環智揮猩擲膽噬堡爺參性:銀伴隕枕戈謎擬Q磨舵鱗杖璞・鳴哞鰭科莫迦虛吾肌費束輝紙御機夏 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Forms_zh.txt b/PKHeX.Core/Resources/text/zh/text_Forms_zh.txt index e40d3cee4..2a1079fc1 100644 Binary files a/PKHeX.Core/Resources/text/zh/text_Forms_zh.txt and b/PKHeX.Core/Resources/text/zh/text_Forms_zh.txt differ diff --git a/PKHeX.Core/Resources/text/zh/text_Games_zh.txt b/PKHeX.Core/Resources/text/zh/text_Games_zh.txt index f68732254..12f5a04c6 100644 --- a/PKHeX.Core/Resources/text/zh/text_Games_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_Games_zh.txt @@ -30,8 +30,8 @@ Y 太阳 月亮 - - +究極之日 +究極之月 GO 红 蓝 [国际]/绿 [日] diff --git a/PKHeX.Core/Resources/text/zh/text_Items_zh.txt b/PKHeX.Core/Resources/text/zh/text_Items_zh.txt index 646e280c1..057723abf 100644 --- a/PKHeX.Core/Resources/text/zh/text_Items_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_Items_zh.txt @@ -918,4 +918,43 @@ 冰雪存储碟 龙存储碟 黑暗存储碟 -妖精存储碟 \ No newline at end of file +妖精存储碟 +索尔迦雷欧Z +露奈雅拉Z +究极奈克洛Z +谜拟QZ +鬃岩狼人Z +杖尾鳞甲龙Z +索尔迦雷欧Z +露奈雅拉Z +究极奈克洛Z +谜拟QZ +鬃岩狼人Z +杖尾鳞甲龙Z +Z强力手环 +粉红花瓣 +橙色花瓣 +蓝色花瓣 +红色花瓣 +绿色花瓣 +黄色花瓣 +紫色花瓣 +虹色之花 +桔色徽章 +奈克洛索尔合体器 +奈克洛露奈合体器 +奈克洛索尔合体器 +奈克洛露奈合体器 +伊利马的一般Z +留下的精灵球 +孵蛋碰碰 +优惠碰碰 +零花钱碰碰 +经验碰碰 +亲密碰碰 +相遇碰碰 +隐身碰碰 +HP回复碰碰 +PP回复碰碰 +加油碰碰 +捕捉碰碰 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Moves_zh.txt b/PKHeX.Core/Resources/text/zh/text_Moves_zh.txt index 44282a68d..aa9877ec3 100644 --- a/PKHeX.Core/Resources/text/zh/text_Moves_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_Moves_zh.txt @@ -717,4 +717,13 @@ 麻麻刺刺 自然之怒 多属性攻击 -千万伏特 \ No newline at end of file +千万伏特 +惊爆大头 +等离子闪电拳 +光子喷涌 +焚天灭世炽光爆 +日光回旋下苍穹 +月华飞溅落灵霄 +亲密无间大乱揍 +狼啸石牙飓风暴 +炽魂热舞烈音爆 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Species_zh.txt b/PKHeX.Core/Resources/text/zh/text_Species_zh.txt index 97ffb7197..a16d3dea9 100644 --- a/PKHeX.Core/Resources/text/zh/text_Species_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_Species_zh.txt @@ -1,4 +1,4 @@ -蛋 +蛋 妙蛙种子 妙蛙草 妙蛙花 @@ -800,4 +800,9 @@ 恶食大王 奈克洛兹玛 玛机雅娜 -玛夏多 \ No newline at end of file +玛夏多 +毒贝比 +四颚针龙 +垒磊石 +砰头小丑 +捷拉奥拉 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_Species_zh2.txt b/PKHeX.Core/Resources/text/zh/text_Species_zh2.txt index 48cadb702..cfc50ba0a 100644 --- a/PKHeX.Core/Resources/text/zh/text_Species_zh2.txt +++ b/PKHeX.Core/Resources/text/zh/text_Species_zh2.txt @@ -1,4 +1,4 @@ -蛋 +蛋 妙蛙種子 妙蛙草 妙蛙花 @@ -800,4 +800,9 @@ 惡食大王 奈克洛茲瑪 瑪機雅娜 -瑪夏多 \ No newline at end of file +瑪夏多 +毒貝比 +四顎針龍 +壘磊石 +砰頭小丑 +捷拉奧拉 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_sm_00000_zh.txt b/PKHeX.Core/Resources/text/zh/text_sm_00000_zh.txt index c7e98d348..07376f1c4 100644 --- a/PKHeX.Core/Resources/text/zh/text_sm_00000_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_sm_00000_zh.txt @@ -108,7 +108,7 @@ 11号道路 -乌拉乌拉后海岸 +乌拉乌拉海滩 13号道路 @@ -188,7 +188,46 @@ 以太乐园 -究极空间 +究极深海 马利埃静市 -市郊海角 \ No newline at end of file +市郊海角 +美乐美乐 +阿卡拉 +乌拉乌拉 +波尼 +大浪海滩 + +海滩洞穴 + +慷待海滩 + +波尼海滩 + +究极大都会 + +究极大都会塔 + +究极发电厂 + +究极峡谷 + +究极沙漠 + +究极森林 + +究极丛林 + +究极大厦 + +究极空间零地带 + +火箭队城堡 + +旷野洞窟 + +皮卡丘山谷 + +1号道路 +训练家学校 +分隔岭隧道 diff --git a/PKHeX.Core/Resources/text/zh/text_sm_30000_zh.txt b/PKHeX.Core/Resources/text/zh/text_sm_30000_zh.txt index c6eb4478c..b17960bd4 100644 --- a/PKHeX.Core/Resources/text/zh/text_sm_30000_zh.txt +++ b/PKHeX.Core/Resources/text/zh/text_sm_30000_zh.txt @@ -13,4 +13,5 @@ Pokémon GO 关都地区 丰缘地区 阿罗拉地区 -宝可度假地 \ No newline at end of file +宝可度假地 +城都地区 \ No newline at end of file diff --git a/PKHeX.Core/Resources/text/zh/text_tradeusum_zh.txt b/PKHeX.Core/Resources/text/zh/text_tradeusum_zh.txt new file mode 100644 index 000000000..56b7b9998 --- /dev/null +++ b/PKHeX.Core/Resources/text/zh/text_tradeusum_zh.txt @@ -0,0 +1,14 @@ +Lucha +FMFly +Ni-Ni +Roy +LeLe +Yiya +Prof. +Hila +Kihei +Yuchi +Kiyan +Hepa +Kumu +Huhu \ No newline at end of file diff --git a/PKHeX.Core/Saves/MemeCrypto/MemeCrypto.cs b/PKHeX.Core/Saves/MemeCrypto/MemeCrypto.cs index c8dd105ac..8766109d4 100644 --- a/PKHeX.Core/Saves/MemeCrypto/MemeCrypto.cs +++ b/PKHeX.Core/Saves/MemeCrypto/MemeCrypto.cs @@ -147,9 +147,10 @@ public static byte[] Resign7(byte[] sav7) return null; // Save Chunks are 0x200 bytes each; Memecrypto signature is 0x100 bytes into the 2nd to last chunk. - int ChecksumTableOffset = sav7.Length - 0x200; - int MemeCryptoOffset = ChecksumTableOffset - 0x100; - const int ChecksumSignatureLength = 0x140; + var isUSUM = sav7.Length == SaveUtil.SIZE_G7USUM; + var ChecksumTableOffset = sav7.Length - 0x200; + var MemeCryptoOffset = isUSUM ? 0x6C100 : 0x6BB00; + var ChecksumSignatureLength = isUSUM ? 0x150 : 0x140; const int MemeCryptoSignatureLength = 0x80; var outSav = (byte[])sav7.Clone(); diff --git a/PKHeX.Core/Saves/SAV7.cs b/PKHeX.Core/Saves/SAV7.cs index 8c153e6bb..65f4093c1 100644 --- a/PKHeX.Core/Saves/SAV7.cs +++ b/PKHeX.Core/Saves/SAV7.cs @@ -61,15 +61,15 @@ public SAV7(byte[] data = null) public override int Generation => 7; protected override int GiftCountMax => 48; protected override int GiftFlagMax => 0x100 * 8; - protected override int EventFlagMax => 3968; - protected override int EventConstMax => (EventFlag - EventConst) / 2; + protected override int EventFlagMax => USUM ? 4928 : 3968; + protected override int EventConstMax => 1000; public override int OTLength => 12; public override int NickLength => 12; public override int MaxMoveID => SM ? Legal.MaxMoveID_7 : Legal.MaxMoveID_7_USUM; - public override int MaxSpeciesID => SM ? Legal.MaxSpeciesID_7 : Legal.MaxMoveID_7_USUM; + public override int MaxSpeciesID => SM ? Legal.MaxSpeciesID_7 : Legal.MaxSpeciesID_7_USUM; public override int MaxItemID => SM ? Legal.MaxItemID_7 : Legal.MaxItemID_7_USUM; - public override int MaxAbilityID => Legal.MaxAbilityID_7; + public override int MaxAbilityID => SM ? Legal.MaxAbilityID_7 : Legal.MaxAbilityID_7_USUM; public override int MaxBallID => Legal.MaxBallID_7; // 26 public override int MaxGameID => Legal.MaxGameID_7; @@ -114,9 +114,10 @@ private void GetBlockInfo() // clear memecrypto sig if (Blocks.Length > MemeCryptoBlock) new byte[0x80].CopyTo(Data, Blocks[MemeCryptoBlock].Offset + 0x100); + } - private const int MemeCryptoBlock = 36; // todo + private const int MemeCryptoBlock = 36; private bool CanReadChecksums() { if (Blocks.Length < MemeCryptoBlock) @@ -194,82 +195,96 @@ public override string ChecksumInfo private void GetSAVOffsets() { - if (SM) + if (!Exportable) // Empty input { - /* 00 */ Bag = 0x00000; // [DE0] MyItem - /* 01 */ Trainer1 = 0x00E00; // [07C] Situation - /* 02 */ // = 0x01000; // [014] RandomGroup - /* 03 */ TrainerCard = 0x01200; // [0C0] MyStatus - /* 04 */ Party = 0x01400; // [61C] PokePartySave - /* 05 */ EventConst = 0x01C00; // [E00] EventWork - /* 06 */ PokeDex = 0x02A00; // [F78] ZukanData - /* 07 */ GTS = 0x03A00; // [228] GtsData - /* 08 */ Fused = 0x03E00; // [104] UnionPokemon - /* 09 */ Misc = 0x04000; // [200] Misc - /* 10 */ Trainer2 = 0x04200; // [020] FieldMenu - /* 11 */ ConfigSave = 0x04400; // [004] ConfigSave - /* 12 */ AdventureInfo = 0x04600; // [058] GameTime - /* 13 */ PCLayout = 0x04800; // [5E6] BOX - /* 14 */ Box = 0x04E00; // [36600] BoxPokemon - /* 15 */ Resort = 0x3B400; // [572C] ResortSave - /* 16 */ PlayTime = 0x40C00; // [008] PlayTime - /* 17 */ Overworld = 0x40E00; // [1080] FieldMoveModelSave - /* 18 */ Fashion = 0x42000; // [1A08] Fashion - /* 19 */ // = 0x43C00; // [6408] JoinFestaPersonalSave - /* 20 */ // = 0x4A200; // [6408] JoinFestaPersonalSave - /* 21 */ JoinFestaData = 0x50800; // [3998] JoinFestaDataSave - /* 22 */ // = 0x54200; // [100] BerrySpot - /* 23 */ // = 0x54400; // [100] FishingSpot - /* 24 */ // = 0x54600; // [10528] LiveMatchData - /* 25 */ // = 0x64C00; // [204] BattleSpotData - /* 26 */ PokeFinderSave = 0x65000; // [B60] PokeFinderSave - /* 27 */ WondercardFlags= 0x65C00; // [3F50] MysteryGiftSave - /* 28 */ Record = 0x69C00; // [358] Record - /* 29 */ // = 0x6A000; // [728] ValidationSave - /* 30 */ // = 0x6A800; // [200] GameSyncSave - /* 31 */ // = 0x6AA00; // [718] PokeDiarySave - /* 32 */ BattleTree = 0x6B200; // [1FC] BattleInstSave - /* 33 */ Daycare = 0x6B400; // [200] Sodateya - /* 34 */ // = 0x6B600; // [120] WeatherSave - /* 35 */ QRSaveData = 0x6B800; // [1C8] QRReaderSaveData - /* 36 */ // = 0x6BA00; // [200] TurtleSalmonSave - - EventFlag = EventConst + 0x7D0; - - OFS_PouchHeldItem = Bag + 0; // 430 (Case 0) - OFS_PouchKeyItem = Bag + 0x6B8; // 184 (Case 4) - OFS_PouchTMHM = Bag + 0x998; // 108 (Case 2) - OFS_PouchMedicine = Bag + 0xB48; // 64 (Case 1) - OFS_PouchBerry = Bag + 0xC48; // 72 (Case 3) - OFS_PouchZCrystals = Bag + 0xD68; // 30 (Case 5) - - PokeDexLanguageFlags = PokeDex + 0x550; - WondercardData = WondercardFlags + 0x100; - - BattleBoxFlags = PCLayout + 0x4C4; - PCBackgrounds = PCLayout + 0x5C0; - LastViewedBox = PCLayout + 0x5E3; - PCFlags = PCLayout + 0x5E0; - - HoF = 0x25C0; // Inside EventWork (const/flag) block - - FashionLength = 0x1A08; - - TeamCount = 6; - LockedSlots = new int[6*TeamCount]; - TeamSlots = new int[6*TeamCount]; + // Set bare minimum values for empty sav compatibility (based on S/M offsets) + Trainer1 = 0x00E00; + TrainerCard = 0x01200; + Party = 0x01400; + Box = 0x04E00; + PCLayout = 0x04800; + BattleBoxFlags = PCLayout + 0x4C4; + PCBackgrounds = PCLayout + 0x5C0; + LastViewedBox = PCLayout + 0x5E3; + PCFlags = PCLayout + 0x5E0; + return; } - else if (USUM) + + /* 00 */ Bag = Blocks[00].Offset; // 0x00000 // [DE0] MyItem + /* 01 */ Trainer1 = Blocks[01].Offset; // 0x00E00 // [07C] Situation + /* 02 */ // = Blocks[02].Offset; // 0x01000 // [014] RandomGroup + /* 03 */ TrainerCard = Blocks[03].Offset; // 0x01200 // [0C0] MyStatus + /* 04 */ Party = Blocks[04].Offset; // 0x01400 // [61C] PokePartySave + /* 05 */ EventConst = Blocks[05].Offset; // 0x01C00 // [E00] EventWork + /* 06 */ PokeDex = Blocks[06].Offset; // 0x02A00 // [F78] ZukanData + /* 07 */ GTS = Blocks[07].Offset; // 0x03A00 // [228] GtsData + /* 08 */ Fused = Blocks[08].Offset; // 0x03E00 // [104] UnionPokemon + /* 09 */ Misc = Blocks[09].Offset; // 0x04000 // [200] Misc + /* 10 */ Trainer2 = Blocks[10].Offset; // 0x04200 // [020] FieldMenu + /* 11 */ ConfigSave = Blocks[11].Offset; // 0x04400 // [004] ConfigSave + /* 12 */ AdventureInfo = Blocks[12].Offset; // 0x04600 // [058] GameTime + /* 13 */ PCLayout = Blocks[13].Offset; // 0x04800 // [5E6] BOX + /* 14 */ Box = Blocks[14].Offset; // 0x04E00 // [36600] BoxPokemon + /* 15 */ Resort = Blocks[15].Offset; // 0x3B400 // [572C] ResortSave + /* 16 */ PlayTime = Blocks[16].Offset; // 0x40C00 // [008] PlayTime + /* 17 */ Overworld = Blocks[17].Offset; // 0x40E00 // [1080] FieldMoveModelSave + /* 18 */ Fashion = Blocks[18].Offset; // 0x42000 // [1A08] Fashion + /* 19 */ // = Blocks[19].Offset; // 0x43C00 // [6408] JoinFestaPersonalSave + /* 20 */ // = Blocks[20].Offset; // 0x4A200 // [6408] JoinFestaPersonalSave + /* 21 */ JoinFestaData = Blocks[21].Offset; // 0x50800 // [3998] JoinFestaDataSave + /* 22 */ // = Blocks[22].Offset; // 0x54200 // [100] BerrySpot + /* 23 */ // = Blocks[23].Offset; // 0x54400 // [100] FishingSpot + /* 24 */ // = Blocks[24].Offset; // 0x54600 // [10528] LiveMatchData + /* 25 */ // = Blocks[25].Offset; // 0x64C00 // [204] BattleSpotData + /* 26 */ PokeFinderSave = Blocks[26].Offset; // 0x65000 // [B60] PokeFinderSave + /* 27 */ WondercardFlags= Blocks[27].Offset; // 0x65C00 // [3F50] MysteryGiftSave + /* 28 */ Record = Blocks[28].Offset; // 0x69C00 // [358] Record + /* 29 */ // = Blocks[29].Offset; // 0x6A000 // [728] ValidationSave + /* 30 */ // = Blocks[30].Offset; // 0x6A800 // [200] GameSyncSave + /* 31 */ // = Blocks[31].Offset; // 0x6AA00 // [718] PokeDiarySave + /* 32 */ BattleTree = Blocks[32].Offset; // 0x6B200 // [1FC] BattleInstSave + /* 33 */ Daycare = Blocks[33].Offset; // 0x6B400 // [200] Sodateya + /* 34 */ // = Blocks[34].Offset; // 0x6B600 // [120] WeatherSave + /* 35 */ QRSaveData = Blocks[35].Offset; // 0x6B800 // [1C8] QRReaderSaveData + /* 36 */ // = Blocks[36].Offset; // 0x6BA00 // [200] TurtleSalmonSave + + EventFlag = EventConst + EventConstMax * 2; // After Event Const (u16)*n + HoF = EventFlag + EventFlagMax / 8; // After Event Flags (1b)*(1u8/8b)*n + + OFS_PouchHeldItem = Bag + 0; // 430 (Case 0) + OFS_PouchKeyItem = Bag + 0x6B8; // 184 (Case 4) + OFS_PouchTMHM = Bag + 0x998; // 108 (Case 2) + OFS_PouchMedicine = Bag + 0xB48; // 64 (Case 1) + OFS_PouchBerry = Bag + 0xC48; // 72 (Case 3) + OFS_PouchZCrystals = Bag + 0xD68; // 30 (Case 5) + + PokeDexLanguageFlags = PokeDex + 0x550; + WondercardData = WondercardFlags + 0x100; + + BattleBoxFlags = PCLayout + 0x4C4; + PCBackgrounds = PCLayout + 0x5C0; + LastViewedBox = PCLayout + 0x5E3; + PCFlags = PCLayout + 0x5E0; + + + FashionLength = 0x1A08; + + TeamCount = 6; + LockedSlots = new int[6*TeamCount]; + TeamSlots = new int[6*TeamCount]; + if (USUM) { - // todo - TeamCount = 6; - LockedSlots = new int[6*TeamCount]; - TeamSlots = new int[6*TeamCount]; - } - else // Empty input - { - Party = 0x0; - Box = Party + SIZE_PARTY * 6 + 0x1000; + // slight differences + /* 37 */ // = Blocks[37].Offset; BattleFesSave + /* 38 */ // = Blocks[38].Offset; FinderStudioSave + + OFS_PouchHeldItem = Bag + 0; // 427 (Case 0) + OFS_PouchKeyItem = OFS_PouchHeldItem + 4*427; // 198 (Case 4) + OFS_PouchTMHM = OFS_PouchKeyItem + 4*198; // 108 (Case 2) + OFS_PouchMedicine = OFS_PouchTMHM + 4*108; // 60 (Case 1) + OFS_PouchBerry = OFS_PouchMedicine + 4*60; // 67 (Case 3) + OFS_PouchZCrystals = OFS_PouchBerry + 4*67; // 35 (Case 5) + OFS_BattleItems = OFS_PouchZCrystals + 4*35; // 11 (Case 6) } } @@ -331,6 +346,8 @@ public override GameVersion Version { case 30: return GameVersion.SN; case 31: return GameVersion.MN; + case 32: return GameVersion.US; + case 33: return GameVersion.UM; } return GameVersion.Unknown; } @@ -719,7 +736,8 @@ public int GetRecord(int recordID) public void SetRecord(int recordID, int value) { int ofs = GetRecordOffset(recordID); - int max = GetRecordMax(recordID); + var maxes = USUM ? RecordMaxType_USUM: RecordMaxType_SM; + int max = GetRecordMax(recordID, maxes); if (value > max) value = max; if (recordID < 100) @@ -736,9 +754,9 @@ public int GetRecordOffset(int recordID) return -1; } - public static int GetRecordMax(int recordID) => recordID < 200 ? RecordMax[RecordMaxType[recordID]] : 0; + public static int GetRecordMax(int recordID, int[] maxes = null) => recordID < 200 ? RecordMax[(maxes ?? RecordMaxType_USUM)[recordID]] : 0; private static readonly int[] RecordMax = {999999999, 9999999, 999999, 99999, 65535, 9999, 999}; - private static readonly int[] RecordMaxType = + private static readonly int[] RecordMaxType_SM = { 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -762,6 +780,30 @@ public int GetRecordOffset(int recordID) 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, }; + private static readonly int[] RecordMaxType_USUM = + { + 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 0, 0, 0, 2, 2, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, + 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 4, 4, 4, 5, 5, 4, 5, 5 + }; public ushort PokeFinderCameraVersion { @@ -812,14 +854,27 @@ public override InventoryPouch[] Inventory { get { - InventoryPouch[] pouch = + InventoryPouch[] pouch; + if (SM) + pouch = new[] { new InventoryPouch(InventoryType.Medicine, Legal.Pouch_Medicine_SM, 999, OFS_PouchMedicine), new InventoryPouch(InventoryType.Items, Legal.Pouch_Items_SM, 999, OFS_PouchHeldItem), new InventoryPouch(InventoryType.TMHMs, Legal.Pouch_TMHM_SM, 1, OFS_PouchTMHM), new InventoryPouch(InventoryType.Berries, Legal.Pouch_Berries_SM, 999, OFS_PouchBerry), - new InventoryPouch(InventoryType.KeyItems, USUM ? Legal.Pouch_Key_USUM : Legal.Pouch_Key_SM, 1, OFS_PouchKeyItem), - new InventoryPouch(InventoryType.ZCrystals, USUM ? Legal.Pouch_ZCrystal_USUM : Legal.Pouch_ZCrystal_SM, 1, OFS_PouchZCrystals), + new InventoryPouch(InventoryType.KeyItems, Legal.Pouch_Key_SM, 1, OFS_PouchKeyItem), + new InventoryPouch(InventoryType.ZCrystals, Legal.Pouch_ZCrystal_SM, 1, OFS_PouchZCrystals), + }; + else // USUM + pouch = new[] + { + new InventoryPouch(InventoryType.Medicine, Legal.Pouch_Medicine_SM, 999, OFS_PouchMedicine), + new InventoryPouch(InventoryType.Items, Legal.Pouch_Items_SM, 999, OFS_PouchHeldItem), + new InventoryPouch(InventoryType.TMHMs, Legal.Pouch_TMHM_SM, 1, OFS_PouchTMHM), + new InventoryPouch(InventoryType.Berries, Legal.Pouch_Berries_SM, 999, OFS_PouchBerry), + new InventoryPouch(InventoryType.KeyItems, Legal.Pouch_Key_USUM, 1, OFS_PouchKeyItem), + new InventoryPouch(InventoryType.ZCrystals, Legal.Pouch_ZCrystal_USUM, 1, OFS_PouchZCrystals), + new InventoryPouch(InventoryType.BattleItems, Legal.Pouch_Roto_USUM, 999, OFS_BattleItems), }; foreach (var p in pouch) p.GetPouch7(ref Data); @@ -992,7 +1047,9 @@ protected override void SetDex(PKM pkm) int fc = Personal[pkm.Species].FormeCount; if (fc > 1) // actually has forms { - int f = SaveUtil.GetDexFormIndexSM(pkm.Species, fc, MaxSpeciesID - 1); + int f = USUM + ? SaveUtil.GetDexFormIndexUSUM(pkm.Species, fc, MaxSpeciesID - 1) + : SaveUtil.GetDexFormIndexSM(pkm.Species, fc, MaxSpeciesID - 1); if (f >= 0) // bit index valid bitIndex = f + form; } @@ -1030,7 +1087,7 @@ protected override void SetPartyValues(PKM pkm, bool isParty) ((PK7)pkm).FormDuration = duration; } - private static bool SanitizeFormsToIterate(int species, out int formStart, out int formEnd, int formIn) + private bool SanitizeFormsToIterate(int species, out int formStart, out int formEnd, int formIn) { // 004AA370 in Moon // Simplified in terms of usage -- only overrides to give all the battle forms for a pkm @@ -1039,14 +1096,26 @@ private static bool SanitizeFormsToIterate(int species, out int formStart, out i switch (species) { case 351: // Castform + case 778 when USUM: // Mimikyu formStart = 0; formEnd = 3; return true; + + case 020: // Raticate + case 105 when USUM: // Marowak + formStart = 0; + formEnd = 2; + return true; + case 421: // Cherrim case 555: // Darmanitan case 648: // Meloetta case 746: // Wishiwashi case 778: // Mimikyu + case 743 when USUM: // Ribombee + case 744 when USUM: // Rockruff + case 752 when USUM: // Araquanid + case 777 when USUM: // Togedemaru formStart = 0; formEnd = 1; return true; @@ -1197,6 +1266,14 @@ private void LoadLockedSlots() Array.Resize(ref TeamSlots, teamCount); } + private int FusedCount => USUM ? 3 : 1; + public int GetFusedSlotOffset(int slot) + { + if (Fused < 0 || slot < 0 || slot >= FusedCount) + return -1; + return Fused + SIZE_PARTY * slot; // 0x104*slot + } + public override int DaycareSeedSize => 32; // 128 bits public override int GetDaycareSlotOffset(int loc, int slot) { @@ -1376,32 +1453,17 @@ public override string MiscSaveInfo() return string.Join(Environment.NewLine, Blocks.Select(b => $"{b.ID:00}: {b.Offset:X5}-{b.Offset + b.Length:X5}, {b.Length:X5}")); } - public byte BallThrowTypeUnlocked - { - get => (byte)(((BitConverter.ToUInt16(Data, 0x23F4) << 4) >> 10) << 2); - set - { - ushort flags = (ushort)(BitConverter.ToUInt16(Data, 0x23F4) & 0xF03F); - flags |= (ushort)((value & 0xFC) << 4); - BitConverter.GetBytes(flags).CopyTo(Data, 0x23F4); - } - } - public byte BallThrowTypeLearned - { - get => (byte)((Data[0x2583] & 0x7F) << 1); - set => Data[0x2583] = (byte)((Data[0x2583] & 0x80) | ((value & 0xFE) >> 1)); - } - public byte BattleTreeSuperUnlocked - { - get => (byte)(Data[0x23F9] >> 5); - set => Data[0x23F9] = (byte)((Data[0x23F9] & 0x1F) | ((value & 0x07) << 5)); - } public bool MegaUnlocked { get => (Data[TrainerCard + 0x78] & 0x01) != 0; set => Data[TrainerCard + 0x78] = (byte)((Data[TrainerCard + 0x78] & 0xFE) | (value ? 1 : 0)); // in battle // Data[0x1F22] = (byte)((Data[0x1F22] & 0xFE) | (value ? 1 : 0)); // event } + public bool ZMoveUnlocked + { + get => (Data[TrainerCard + 0x78] & 2) != 0; + set => Data[TrainerCard + 0x78] = (byte)((Data[TrainerCard + 0x78] & ~2) | (value ? 2 : 0)); // in battle + } public override string GetString(int Offset, int Count) => StringConverter.GetString7(Data, Offset, Count); public override byte[] SetString(string value, int maxLength, int PadToSize = 0, ushort PadWith = 0) diff --git a/PKHeX.Core/Saves/SaveUtil.cs b/PKHeX.Core/Saves/SaveUtil.cs index 1b392a468..a05470357 100644 --- a/PKHeX.Core/Saves/SaveUtil.cs +++ b/PKHeX.Core/Saves/SaveUtil.cs @@ -13,7 +13,7 @@ public static class SaveUtil { public const int BEEF = 0x42454546; - public const int SIZE_G7USUM = 999_999_999; + public const int SIZE_G7USUM = 0x6CC00; public const int SIZE_G7SM = 0x6BE00; public const int SIZE_G6XY = 0x65600; public const int SIZE_G6ORAS = 0x76000; @@ -728,7 +728,37 @@ private static void CheckHeaderFooter(ref byte[] input, ref byte[] header, ref b }; private static readonly ushort[] formtable_USUM = // u16 species, u16 formcount { - // todo + 0x0003, 0x0002, 0x0006, 0x0003, 0x0009, 0x0002, 0x000F, 0x0002, + 0x0012, 0x0002, 0x0013, 0x0002, 0x0014, 0x0003, 0x0019, 0x0008, + 0x001A, 0x0002, 0x001B, 0x0002, 0x001C, 0x0002, 0x0025, 0x0002, + 0x0026, 0x0002, 0x0032, 0x0002, 0x0033, 0x0002, 0x0034, 0x0002, + 0x0035, 0x0002, 0x0041, 0x0002, 0x004A, 0x0002, 0x004B, 0x0002, + 0x004C, 0x0002, 0x0050, 0x0002, 0x0058, 0x0002, 0x0059, 0x0002, + 0x005E, 0x0002, 0x0067, 0x0002, 0x0069, 0x0003, 0x0073, 0x0002, + 0x007F, 0x0002, 0x0082, 0x0002, 0x008E, 0x0002, 0x0096, 0x0003, + 0x00B5, 0x0002, 0x00C9, 0x001C, 0x00D0, 0x0002, 0x00D4, 0x0002, + 0x00D6, 0x0002, 0x00E5, 0x0002, 0x00F8, 0x0002, 0x00FE, 0x0002, + 0x0101, 0x0002, 0x0104, 0x0002, 0x011A, 0x0002, 0x012E, 0x0002, + 0x012F, 0x0002, 0x0132, 0x0002, 0x0134, 0x0002, 0x0136, 0x0002, + 0x013F, 0x0002, 0x0143, 0x0002, 0x014E, 0x0002, 0x015F, 0x0004, + 0x0162, 0x0002, 0x0167, 0x0002, 0x016A, 0x0002, 0x0175, 0x0002, + 0x0178, 0x0002, 0x017C, 0x0002, 0x017D, 0x0002, 0x017E, 0x0002, + 0x017F, 0x0002, 0x0180, 0x0002, 0x0182, 0x0004, 0x019C, 0x0003, + 0x019D, 0x0003, 0x019E, 0x0003, 0x01A5, 0x0002, 0x01A6, 0x0002, + 0x01A7, 0x0002, 0x01AC, 0x0002, 0x01BD, 0x0002, 0x01C0, 0x0002, + 0x01CC, 0x0002, 0x01DB, 0x0002, 0x01DF, 0x0006, 0x01E7, 0x0002, + 0x01EC, 0x0002, 0x01ED, 0x0012, 0x0213, 0x0002, 0x0226, 0x0002, + 0x022B, 0x0002, 0x0249, 0x0004, 0x024A, 0x0004, 0x0281, 0x0002, + 0x0282, 0x0002, 0x0285, 0x0002, 0x0286, 0x0003, 0x0287, 0x0002, + 0x0288, 0x0002, 0x0289, 0x0005, 0x0292, 0x0003, 0x0298, 0x0014, + 0x0299, 0x0014, 0x029A, 0x0014, 0x029D, 0x0005, 0x029E, 0x0006, + 0x029F, 0x0005, 0x02A4, 0x000A, 0x02A6, 0x0002, 0x02A9, 0x0002, + 0x02C6, 0x0004, 0x02C7, 0x0004, 0x02CC, 0x0002, 0x02CE, 0x0005, + 0x02CF, 0x0002, 0x02D0, 0x0002, 0x02DF, 0x0002, 0x02E2, 0x0002, + 0x02E5, 0x0004, 0x02E7, 0x0002, 0x02E8, 0x0002, 0x02E9, 0x0003, + 0x02EA, 0x0002, 0x02F0, 0x0002, 0x02F2, 0x0002, 0x02F6, 0x0002, + 0x0305, 0x0012, 0x0306, 0x000E, 0x0309, 0x0002, 0x030A, 0x0004, + 0x0310, 0x0002, 0x0320, 0x0004, 0x0321, 0x0002 }; private static int GetDexFormBitIndex(int species, int formct, int start, IReadOnlyList formtable) { diff --git a/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs b/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs index 2fe7b261f..adc89e0ef 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs @@ -341,7 +341,10 @@ private void SaveMisc4(PKM pk) private void LoadMisc6(PKM pk) { TB_EC.Text = $"{pk.EncryptionConstant:X8}"; - CB_Ability.SelectedIndex = pk.AbilityNumber < 6 ? pk.AbilityNumber >> 1 : 0; // with some simple error handling + int abil = pk.AbilityNumber < 6 ? pk.AbilityNumber >> 1 : 0; + if (CB_Ability.Items.Count <= abil) + abil = CB_Ability.Items.Count - 1; + CB_Ability.SelectedIndex = abil; // with some simple error handling DEV_Ability.SelectedValue = pk.Ability; TB_AbilityNumber.Text = pk.AbilityNumber.ToString(); diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.Designer.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.Designer.cs index ec6efc306..918005357 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.Designer.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.Designer.cs @@ -31,6 +31,7 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAVEditor)); this.tabBoxMulti = new System.Windows.Forms.TabControl(); this.Tab_Box = new System.Windows.Forms.TabPage(); + this.Box = new PKHeX.WinForms.Controls.BoxEditor(); this.Tab_PartyBattle = new System.Windows.Forms.TabPage(); this.PAN_BattleBox = new System.Windows.Forms.Panel(); this.PB_Locked = new System.Windows.Forms.PictureBox(); @@ -103,14 +104,13 @@ private void InitializeComponent() this.B_OUTPasserby = new System.Windows.Forms.Button(); this.B_CGearSkin = new System.Windows.Forms.Button(); this.B_OpenPokeBeans = new System.Windows.Forms.Button(); - this.B_OpenZygardeCells = new System.Windows.Forms.Button(); + this.B_CellsStickers = new System.Windows.Forms.Button(); this.B_OpenMiscEditor = new System.Windows.Forms.Button(); this.B_OpenHoneyTreeEditor = new System.Windows.Forms.Button(); this.B_OpenFriendSafari = new System.Windows.Forms.Button(); this.B_OpenRTCEditor = new System.Windows.Forms.Button(); this.B_OpenUGSEditor = new System.Windows.Forms.Button(); this.B_Roamer = new System.Windows.Forms.Button(); - this.Box = new PKHeX.WinForms.Controls.BoxEditor(); this.tabBoxMulti.SuspendLayout(); this.Tab_Box.SuspendLayout(); this.Tab_PartyBattle.SuspendLayout(); @@ -175,6 +175,17 @@ private void InitializeComponent() this.Tab_Box.Text = "Box"; this.Tab_Box.UseVisualStyleBackColor = true; // + // Box + // + this.Box.AllowDrop = true; + this.Box.CurrentBox = -1; + this.Box.FlagIllegal = false; + this.Box.Location = new System.Drawing.Point(26, 7); + this.Box.M = null; + this.Box.Name = "Box"; + this.Box.Size = new System.Drawing.Size(251, 185); + this.Box.TabIndex = 1; + // // Tab_PartyBattle // this.Tab_PartyBattle.Controls.Add(this.PAN_BattleBox); @@ -766,7 +777,7 @@ private void InitializeComponent() this.FLP_SAVtools.Controls.Add(this.B_OUTPasserby); this.FLP_SAVtools.Controls.Add(this.B_CGearSkin); this.FLP_SAVtools.Controls.Add(this.B_OpenPokeBeans); - this.FLP_SAVtools.Controls.Add(this.B_OpenZygardeCells); + this.FLP_SAVtools.Controls.Add(this.B_CellsStickers); this.FLP_SAVtools.Controls.Add(this.B_OpenMiscEditor); this.FLP_SAVtools.Controls.Add(this.B_OpenHoneyTreeEditor); this.FLP_SAVtools.Controls.Add(this.B_OpenFriendSafari); @@ -951,15 +962,15 @@ private void InitializeComponent() this.B_OpenPokeBeans.UseVisualStyleBackColor = true; this.B_OpenPokeBeans.Click += new System.EventHandler(this.B_OpenPokeBeans_Click); // - // B_OpenZygardeCells + // B_CellsStickers // - this.B_OpenZygardeCells.Location = new System.Drawing.Point(189, 148); - this.B_OpenZygardeCells.Name = "B_OpenZygardeCells"; - this.B_OpenZygardeCells.Size = new System.Drawing.Size(87, 23); - this.B_OpenZygardeCells.TabIndex = 26; - this.B_OpenZygardeCells.Text = "Zygarde Cells"; - this.B_OpenZygardeCells.UseVisualStyleBackColor = true; - this.B_OpenZygardeCells.Click += new System.EventHandler(this.B_OpenZygardeCells_Click); + this.B_CellsStickers.Location = new System.Drawing.Point(189, 148); + this.B_CellsStickers.Name = "B_CellsStickers"; + this.B_CellsStickers.Size = new System.Drawing.Size(87, 23); + this.B_CellsStickers.TabIndex = 26; + this.B_CellsStickers.Text = "Cells/Stickers"; + this.B_CellsStickers.UseVisualStyleBackColor = true; + this.B_CellsStickers.Click += new System.EventHandler(this.B_CellsStickers_Click); // // B_OpenMiscEditor // @@ -1021,17 +1032,6 @@ private void InitializeComponent() this.B_Roamer.UseVisualStyleBackColor = true; this.B_Roamer.Click += new System.EventHandler(this.B_Roamer_Click); // - // Box - // - this.Box.AllowDrop = true; - this.Box.CurrentBox = -1; - this.Box.FlagIllegal = false; - this.Box.Location = new System.Drawing.Point(26, 7); - this.Box.M = null; - this.Box.Name = "Box"; - this.Box.Size = new System.Drawing.Size(251, 185); - this.Box.TabIndex = 1; - // // SAVEditor // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -1160,7 +1160,7 @@ private void InitializeComponent() private System.Windows.Forms.Button B_OUTPasserby; private System.Windows.Forms.Button B_CGearSkin; private System.Windows.Forms.Button B_OpenPokeBeans; - private System.Windows.Forms.Button B_OpenZygardeCells; + private System.Windows.Forms.Button B_CellsStickers; private System.Windows.Forms.Button B_OpenMiscEditor; private System.Windows.Forms.Button B_OpenHoneyTreeEditor; private System.Windows.Forms.Button B_OpenFriendSafari; diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs index f35ef618e..0892ea7aa 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs @@ -515,7 +515,7 @@ private void B_SaveBoxBin_Click(object sender, EventArgs e) private void B_OpenPokeblocks_Click(object sender, EventArgs e) => new SAV_PokeBlockORAS(SAV).ShowDialog(); private void B_OpenSuperTraining_Click(object sender, EventArgs e) => new SAV_SuperTrain(SAV).ShowDialog(); private void B_OpenSecretBase_Click(object sender, EventArgs e) => new SAV_SecretBase(SAV).ShowDialog(); - private void B_OpenZygardeCells_Click(object sender, EventArgs e) => new SAV_ZygardeCell(SAV).ShowDialog(); + private void B_CellsStickers_Click(object sender, EventArgs e) => new SAV_ZygardeCell(SAV).ShowDialog(); private void B_LinkInfo_Click(object sender, EventArgs e) => new SAV_Link6(SAV).ShowDialog(); private void B_Roamer_Click(object sender, EventArgs e) => new SAV_Roamer3(SAV).ShowDialog(); private void B_OpenEventFlags_Click(object sender, EventArgs e) @@ -599,7 +599,7 @@ private void B_OpenPokedex_Click(object sender, EventArgs e) new SAV_PokedexXY(SAV).ShowDialog(); break; case 7: - if (SAV.SM) + if (SAV.SM || SAV.USUM) new SAV_PokedexSM(SAV).ShowDialog(); break; } @@ -695,7 +695,7 @@ private void B_OUTHallofFame_Click(object sender, EventArgs e) { if (SAV.Generation == 6) new SAV_HallOfFame(SAV).ShowDialog(); - else if (SAV.SM) + else if (SAV.Generation == 7) new SAV_HallOfFame7(SAV).ShowDialog(); } private void B_CGearSkin_Click(object sender, EventArgs e) @@ -986,7 +986,7 @@ private void ToggleViewSubEditors(SaveFile sav) B_OpenSecretBase.Enabled = sav.HasSecretBase; B_OpenPokepuffs.Enabled = sav.HasPuff; B_OpenPokeBeans.Enabled = sav.Generation == 7; - B_OpenZygardeCells.Enabled = sav.Generation == 7; + B_CellsStickers.Enabled = sav.Generation == 7; B_OUTPasserby.Enabled = sav.HasPSS; B_OpenBoxLayout.Enabled = sav.HasBoxWallpapers; B_OpenWondercards.Enabled = sav.HasWondercards; diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.resx b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.resx index 9784e19d8..7e8350711 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.resx +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.resx @@ -469,7 +469,7 @@ True - + True diff --git a/PKHeX.WinForms/PKHeX.WinForms.csproj b/PKHeX.WinForms/PKHeX.WinForms.csproj index dcd90ba14..177137c61 100644 --- a/PKHeX.WinForms/PKHeX.WinForms.csproj +++ b/PKHeX.WinForms/PKHeX.WinForms.csproj @@ -734,6 +734,23 @@ + + + + + + + + + + + + + + + + + diff --git a/PKHeX.WinForms/Properties/Resources.Designer.cs b/PKHeX.WinForms/Properties/Resources.Designer.cs index 6d0b71dad..4fc6ba3e3 100644 --- a/PKHeX.WinForms/Properties/Resources.Designer.cs +++ b/PKHeX.WinForms/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace PKHeX.WinForms.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -2330,6 +2330,16 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _25_7c { + get { + object obj = ResourceManager.GetObject("_25_7c", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -9300,6 +9310,16 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _744_1 { + get { + object obj = ResourceManager.GetObject("_744_1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -9320,6 +9340,16 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _745_2 { + get { + object obj = ResourceManager.GetObject("_745_2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -10110,6 +10140,36 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _800_1 { + get { + object obj = ResourceManager.GetObject("_800_1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _800_2 { + get { + object obj = ResourceManager.GetObject("_800_2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _800_3 { + get { + object obj = ResourceManager.GetObject("_800_3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -10140,6 +10200,56 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _803 { + get { + object obj = ResourceManager.GetObject("_803", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _804 { + get { + object obj = ResourceManager.GetObject("_804", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _805 { + get { + object obj = ResourceManager.GetObject("_805", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _806 { + get { + object obj = ResourceManager.GetObject("_806", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _807 { + get { + object obj = ResourceManager.GetObject("_807", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -12334,15 +12444,13 @@ internal class Resources { /// Looks up a localized string similar to PKHeX - By Kaphotics ///http://projectpokemon.org/pkhex /// - ///17/05/30 - New Update: - /// - Program Internals: - /// - - PKHeX now uses C# 7 language features. - /// - - PKHeX.Core is now a .NET Standard class library. + ///17/10/17 - New Update: /// - Legality: - /// - - Changed: Refactored internals to better handle matching of encounters and future plans. - /// - - Added: PIDIV method detection. For now, the only legality flagging present is for Cosseum/XD starters. - /// - - Added: More legality check flagging. Thanks javierhimura & wwwwwwzx! - /// - Main Window: /// [rest of string was truncated]";. + /// - - Fixed: Gen4 Cute Charm PIDIV detection for species that change gender ratios upon evolution (Combee etc). + /// - - Fixed: Gen6/7 Traded eggs change the origin version to the hatcher's version when hatched. Updated affected logic. + /// - - Changed: Gen2->Gen7 and Gen2->Gen1->Gen7 transfer detection & checking improved. + /// - - Changed: Another round of legality check updates. Thanks (so many different users)! + /// - Adde [rest of string was truncated]";. /// internal static string changelog { get { @@ -17200,6 +17308,66 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap item_921 { + get { + object obj = ResourceManager.GetObject("item_921", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap item_922 { + get { + object obj = ResourceManager.GetObject("item_922", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap item_923 { + get { + object obj = ResourceManager.GetObject("item_923", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap item_924 { + get { + object obj = ResourceManager.GetObject("item_924", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap item_925 { + get { + object obj = ResourceManager.GetObject("item_925", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap item_926 { + get { + object obj = ResourceManager.GetObject("item_926", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -17381,7 +17549,7 @@ internal class Resources { } /// - /// Looks up a localized string similar to 20170530. + /// Looks up a localized string similar to 20171017. /// internal static string ProgramVersion { get { diff --git a/PKHeX.WinForms/Properties/Resources.resx b/PKHeX.WinForms/Properties/Resources.resx index f60aa5fac..f2c36c395 100644 --- a/PKHeX.WinForms/Properties/Resources.resx +++ b/PKHeX.WinForms/Properties/Resources.resx @@ -5956,4 +5956,55 @@ ..\Resources\img\Pokemon Sprites\490-e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\img\Pokemon Sprites\25-7c.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\744-1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\745-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\800-1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\800-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\800-3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\803.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\804.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\805.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\806.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\Pokemon Sprites\807.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\item\item_921.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\item\item_922.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\item\item_923.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\item\item_924.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\item\item_925.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\item\item_926.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/25-7c.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/25-7c.png new file mode 100644 index 000000000..a4d5a3165 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/25-7c.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/744-1.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/744-1.png new file mode 100644 index 000000000..b8a8bfbb6 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/744-1.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/745-2.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/745-2.png new file mode 100644 index 000000000..d60e2ed6d Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/745-2.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-1.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-1.png new file mode 100644 index 000000000..c031ed3f5 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-1.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-2.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-2.png new file mode 100644 index 000000000..fc7029ec2 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-2.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-3.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-3.png new file mode 100644 index 000000000..5d8e5abac Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/800-3.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/803.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/803.png new file mode 100644 index 000000000..82bad1e84 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/803.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/804.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/804.png new file mode 100644 index 000000000..630220205 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/804.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/805.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/805.png new file mode 100644 index 000000000..1fd2d582d Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/805.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/806.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/806.png new file mode 100644 index 000000000..460d370b6 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/806.png differ diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/807.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/807.png new file mode 100644 index 000000000..e7c9f348f Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/807.png differ diff --git a/PKHeX.WinForms/Resources/img/item/item_921.png b/PKHeX.WinForms/Resources/img/item/item_921.png new file mode 100644 index 000000000..be2b15131 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/item/item_921.png differ diff --git a/PKHeX.WinForms/Resources/img/item/item_922.png b/PKHeX.WinForms/Resources/img/item/item_922.png new file mode 100644 index 000000000..556c671e5 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/item/item_922.png differ diff --git a/PKHeX.WinForms/Resources/img/item/item_923.png b/PKHeX.WinForms/Resources/img/item/item_923.png new file mode 100644 index 000000000..a678676e3 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/item/item_923.png differ diff --git a/PKHeX.WinForms/Resources/img/item/item_924.png b/PKHeX.WinForms/Resources/img/item/item_924.png new file mode 100644 index 000000000..872fc4e58 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/item/item_924.png differ diff --git a/PKHeX.WinForms/Resources/img/item/item_925.png b/PKHeX.WinForms/Resources/img/item/item_925.png new file mode 100644 index 000000000..d29501ac0 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/item/item_925.png differ diff --git a/PKHeX.WinForms/Resources/img/item/item_926.png b/PKHeX.WinForms/Resources/img/item/item_926.png new file mode 100644 index 000000000..da184d978 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/item/item_926.png differ diff --git a/PKHeX.WinForms/Subforms/SAV_Database.cs b/PKHeX.WinForms/Subforms/SAV_Database.cs index 39bf11e17..02fe6d26a 100644 --- a/PKHeX.WinForms/Subforms/SAV_Database.cs +++ b/PKHeX.WinForms/Subforms/SAV_Database.cs @@ -363,8 +363,11 @@ void addPKM(PKM pk) .Concat(SAV.BoxData.Where(pk => pk.Species != 0)) // Fetch from save file .Where(pk => pk.ChecksumValid && pk.Species != 0 && pk.Sanity == 0) .Distinct()); - - BeginInvoke(new MethodInvoker(() => SetResults(RawDB))); + try + { + BeginInvoke(new MethodInvoker(() => SetResults(RawDB))); + } + catch { /* Window Closed? */ } } // IO Usage diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs index dec905429..414b9a152 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs @@ -41,7 +41,7 @@ public SAV_PokedexSM(SaveFile sav) int c = SAV.Personal[i].FormeCount; for (int j = 0; j < c; j++) { - int x = SaveUtil.GetDexFormIndexSM(i, c, j); + int x = SAV.USUM ? SaveUtil.GetDexFormIndexUSUM(i, c, j) : SaveUtil.GetDexFormIndexSM(i, c, j); if (x == -1 || j == 0) continue; baseSpecies.Add(i); @@ -112,7 +112,7 @@ private void ChangeLBForms(object sender, EventArgs e) int fc = SAV.Personal[bspecies].FormeCount; if (fc > 1) // actually has forms { - int f = SaveUtil.GetDexFormIndexSM(bspecies, fc, SAV.MaxSpeciesID - 1); + int f = SAV.USUM ? SaveUtil.GetDexFormIndexUSUM(bspecies, fc, SAV.MaxSpeciesID - 1) : SaveUtil.GetDexFormIndexSM(bspecies, fc, SAV.MaxSpeciesID - 1); if (f >= 0) // bit index valid species = f + form + 1; else @@ -156,7 +156,7 @@ private bool FillLBForms() if (fc <= 1) return true; - int f = SaveUtil.GetDexFormIndexSM(bspecies, fc, SAV.MaxSpeciesID - 1); + int f = SAV.USUM ? SaveUtil.GetDexFormIndexUSUM(bspecies, fc, SAV.MaxSpeciesID - 1) : SaveUtil.GetDexFormIndexSM(bspecies, fc, SAV.MaxSpeciesID - 1); if (f < 0) return true; // bit index valid diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.Designer.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.Designer.cs index 5825998ad..863747c53 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.Designer.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.Designer.cs @@ -104,6 +104,8 @@ private void InitializeComponent() this.L_SinglesC = new System.Windows.Forms.Label(); this.TC_Editor = new System.Windows.Forms.TabControl(); this.Tab_Overview = new System.Windows.Forms.TabPage(); + this.CB_Vivillon = new System.Windows.Forms.ComboBox(); + this.L_Vivillon = new System.Windows.Forms.Label(); this.B_GenTID = new System.Windows.Forms.Button(); this.L_G7TID = new System.Windows.Forms.Label(); this.MT_G7TID = new System.Windows.Forms.MaskedTextBox(); @@ -164,6 +166,18 @@ private void InitializeComponent() this.NUD_RCStreak0 = new System.Windows.Forms.NumericUpDown(); this.L_CStreak0 = new System.Windows.Forms.Label(); this.Tab_Misc = new System.Windows.Forms.TabPage(); + this.CHK_UnlockMega = new System.Windows.Forms.CheckBox(); + this.L_BallThrowType = new System.Windows.Forms.Label(); + this.CB_BallThrowType = new System.Windows.Forms.ComboBox(); + this.CB_BallThrowTypeListMode = new System.Windows.Forms.ComboBox(); + this.LB_BallThrowTypeUnlocked = new System.Windows.Forms.ListBox(); + this.LB_BallThrowTypeLearned = new System.Windows.Forms.ListBox(); + this.L_Stamps = new System.Windows.Forms.Label(); + this.LB_Stamps = new System.Windows.Forms.ListBox(); + this.L_DaysFromRefreshed = new System.Windows.Forms.Label(); + this.NUD_DaysFromRefreshed = new System.Windows.Forms.NumericUpDown(); + this.L_PlazaName = new System.Windows.Forms.Label(); + this.TB_PlazaName = new System.Windows.Forms.TextBox(); this.CB_Fashion = new System.Windows.Forms.ComboBox(); this.L_SkinColor = new System.Windows.Forms.Label(); this.CB_SkinColor = new System.Windows.Forms.ComboBox(); @@ -178,20 +192,7 @@ private void InitializeComponent() this.NUD_ThumbsTotal = new System.Windows.Forms.NumericUpDown(); this.L_ThumbsTotal = new System.Windows.Forms.Label(); this.B_Fashion = new System.Windows.Forms.Button(); - this.TB_PlazaName = new System.Windows.Forms.TextBox(); - this.L_PlazaName = new System.Windows.Forms.Label(); - this.L_Vivillon = new System.Windows.Forms.Label(); - this.CB_Vivillon = new System.Windows.Forms.ComboBox(); - this.L_DaysFromRefreshed = new System.Windows.Forms.Label(); - this.NUD_DaysFromRefreshed = new System.Windows.Forms.NumericUpDown(); - this.L_BallThrowType = new System.Windows.Forms.Label(); - this.CB_BallThrowType = new System.Windows.Forms.ComboBox(); - this.CB_BallThrowTypeListMode = new System.Windows.Forms.ComboBox(); - this.LB_BallThrowTypeUnlocked = new System.Windows.Forms.ListBox(); - this.LB_BallThrowTypeLearned = new System.Windows.Forms.ListBox(); - this.L_Stamps = new System.Windows.Forms.Label(); - this.LB_Stamps = new System.Windows.Forms.ListBox(); - this.CHK_UnlockMega = new System.Windows.Forms.CheckBox(); + this.CHK_UnlockZMove = new System.Windows.Forms.CheckBox(); this.TC_Editor.SuspendLayout(); this.Tab_Overview.SuspendLayout(); this.GB_Stats.SuspendLayout(); @@ -562,7 +563,9 @@ private void InitializeComponent() this.CB_Game.FormattingEnabled = true; this.CB_Game.Items.AddRange(new object[] { "Sun", - "Moon"}); + "Moon", + "US", + "UM"}); this.CB_Game.Location = new System.Drawing.Point(141, 51); this.CB_Game.Name = "CB_Game"; this.CB_Game.Size = new System.Drawing.Size(51, 21); @@ -869,6 +872,24 @@ private void InitializeComponent() this.Tab_Overview.Text = "Overview"; this.Tab_Overview.UseVisualStyleBackColor = true; // + // CB_Vivillon + // + this.CB_Vivillon.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_Vivillon.FormattingEnabled = true; + this.CB_Vivillon.Location = new System.Drawing.Point(85, 98); + this.CB_Vivillon.Name = "CB_Vivillon"; + this.CB_Vivillon.Size = new System.Drawing.Size(93, 21); + this.CB_Vivillon.TabIndex = 65; + // + // L_Vivillon + // + this.L_Vivillon.Location = new System.Drawing.Point(-1, 101); + this.L_Vivillon.Name = "L_Vivillon"; + this.L_Vivillon.Size = new System.Drawing.Size(80, 12); + this.L_Vivillon.TabIndex = 64; + this.L_Vivillon.Text = "Vivillon:"; + this.L_Vivillon.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // // B_GenTID // this.B_GenTID.Location = new System.Drawing.Point(124, 75); @@ -1346,7 +1367,7 @@ private void InitializeComponent() this.CHK_UnlockSuperMulti.AutoSize = true; this.CHK_UnlockSuperMulti.Location = new System.Drawing.Point(144, 18); this.CHK_UnlockSuperMulti.Name = "CHK_UnlockSuperMulti"; - this.CHK_UnlockSuperMulti.Size = new System.Drawing.Size(49, 16); + this.CHK_UnlockSuperMulti.Size = new System.Drawing.Size(48, 17); this.CHK_UnlockSuperMulti.TabIndex = 2; this.CHK_UnlockSuperMulti.Text = "Multi"; this.CHK_UnlockSuperMulti.UseVisualStyleBackColor = true; @@ -1356,7 +1377,7 @@ private void InitializeComponent() this.CHK_UnlockSuperDoubles.AutoSize = true; this.CHK_UnlockSuperDoubles.Location = new System.Drawing.Point(73, 18); this.CHK_UnlockSuperDoubles.Name = "CHK_UnlockSuperDoubles"; - this.CHK_UnlockSuperDoubles.Size = new System.Drawing.Size(65, 16); + this.CHK_UnlockSuperDoubles.Size = new System.Drawing.Size(65, 17); this.CHK_UnlockSuperDoubles.TabIndex = 1; this.CHK_UnlockSuperDoubles.Text = "Doubles"; this.CHK_UnlockSuperDoubles.UseVisualStyleBackColor = true; @@ -1366,7 +1387,7 @@ private void InitializeComponent() this.CHK_UnlockSuperSingles.AutoSize = true; this.CHK_UnlockSuperSingles.Location = new System.Drawing.Point(6, 18); this.CHK_UnlockSuperSingles.Name = "CHK_UnlockSuperSingles"; - this.CHK_UnlockSuperSingles.Size = new System.Drawing.Size(61, 16); + this.CHK_UnlockSuperSingles.Size = new System.Drawing.Size(60, 17); this.CHK_UnlockSuperSingles.TabIndex = 0; this.CHK_UnlockSuperSingles.Text = "Singles"; this.CHK_UnlockSuperSingles.UseVisualStyleBackColor = true; @@ -1649,6 +1670,7 @@ private void InitializeComponent() // // Tab_Misc // + this.Tab_Misc.Controls.Add(this.CHK_UnlockZMove); this.Tab_Misc.Controls.Add(this.CHK_UnlockMega); this.Tab_Misc.Controls.Add(this.L_BallThrowType); this.Tab_Misc.Controls.Add(this.CB_BallThrowType); @@ -1674,6 +1696,132 @@ private void InitializeComponent() this.Tab_Misc.Text = "Misc"; this.Tab_Misc.UseVisualStyleBackColor = true; // + // CHK_UnlockMega + // + this.CHK_UnlockMega.AutoSize = true; + this.CHK_UnlockMega.Location = new System.Drawing.Point(6, 256); + this.CHK_UnlockMega.Name = "CHK_UnlockMega"; + this.CHK_UnlockMega.Size = new System.Drawing.Size(90, 17); + this.CHK_UnlockMega.TabIndex = 72; + this.CHK_UnlockMega.Text = "Unlock Mega"; + this.CHK_UnlockMega.UseVisualStyleBackColor = true; + // + // L_BallThrowType + // + this.L_BallThrowType.Location = new System.Drawing.Point(144, 50); + this.L_BallThrowType.Name = "L_BallThrowType"; + this.L_BallThrowType.Size = new System.Drawing.Size(117, 20); + this.L_BallThrowType.TabIndex = 65; + this.L_BallThrowType.Text = "Ball Throw Type:"; + this.L_BallThrowType.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // CB_BallThrowType + // + this.CB_BallThrowType.FormattingEnabled = true; + this.CB_BallThrowType.Location = new System.Drawing.Point(267, 51); + this.CB_BallThrowType.Name = "CB_BallThrowType"; + this.CB_BallThrowType.Size = new System.Drawing.Size(109, 21); + this.CB_BallThrowType.TabIndex = 66; + // + // CB_BallThrowTypeListMode + // + this.CB_BallThrowTypeListMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_BallThrowTypeListMode.FormattingEnabled = true; + this.CB_BallThrowTypeListMode.Items.AddRange(new object[] { + "unlocked list", + "learned list"}); + this.CB_BallThrowTypeListMode.Location = new System.Drawing.Point(154, 76); + this.CB_BallThrowTypeListMode.Name = "CB_BallThrowTypeListMode"; + this.CB_BallThrowTypeListMode.Size = new System.Drawing.Size(107, 21); + this.CB_BallThrowTypeListMode.TabIndex = 67; + this.CB_BallThrowTypeListMode.SelectedIndexChanged += new System.EventHandler(this.UpdateBattleStyle); + // + // LB_BallThrowTypeUnlocked + // + this.LB_BallThrowTypeUnlocked.FormattingEnabled = true; + this.LB_BallThrowTypeUnlocked.Location = new System.Drawing.Point(267, 74); + this.LB_BallThrowTypeUnlocked.Name = "LB_BallThrowTypeUnlocked"; + this.LB_BallThrowTypeUnlocked.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; + this.LB_BallThrowTypeUnlocked.Size = new System.Drawing.Size(109, 43); + this.LB_BallThrowTypeUnlocked.TabIndex = 68; + this.LB_BallThrowTypeUnlocked.SelectedIndexChanged += new System.EventHandler(this.UpdateBallThrowTypeUnlocked); + // + // LB_BallThrowTypeLearned + // + this.LB_BallThrowTypeLearned.FormattingEnabled = true; + this.LB_BallThrowTypeLearned.Location = new System.Drawing.Point(267, 74); + this.LB_BallThrowTypeLearned.Name = "LB_BallThrowTypeLearned"; + this.LB_BallThrowTypeLearned.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; + this.LB_BallThrowTypeLearned.Size = new System.Drawing.Size(109, 43); + this.LB_BallThrowTypeLearned.TabIndex = 69; + this.LB_BallThrowTypeLearned.Visible = false; + this.LB_BallThrowTypeLearned.SelectedIndexChanged += new System.EventHandler(this.UpdateBallThrowTypeLearned); + // + // L_Stamps + // + this.L_Stamps.AutoSize = true; + this.L_Stamps.Location = new System.Drawing.Point(214, 174); + this.L_Stamps.Name = "L_Stamps"; + this.L_Stamps.Size = new System.Drawing.Size(45, 13); + this.L_Stamps.TabIndex = 70; + this.L_Stamps.Text = "Stamps:"; + this.L_Stamps.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // LB_Stamps + // + this.LB_Stamps.FormattingEnabled = true; + this.LB_Stamps.Location = new System.Drawing.Point(217, 194); + this.LB_Stamps.Name = "LB_Stamps"; + this.LB_Stamps.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; + this.LB_Stamps.Size = new System.Drawing.Size(159, 43); + this.LB_Stamps.TabIndex = 71; + // + // L_DaysFromRefreshed + // + this.L_DaysFromRefreshed.Location = new System.Drawing.Point(144, 28); + this.L_DaysFromRefreshed.Name = "L_DaysFromRefreshed"; + this.L_DaysFromRefreshed.Size = new System.Drawing.Size(117, 18); + this.L_DaysFromRefreshed.TabIndex = 63; + this.L_DaysFromRefreshed.Text = "Days from Refreshed:"; + this.L_DaysFromRefreshed.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // NUD_DaysFromRefreshed + // + this.NUD_DaysFromRefreshed.Location = new System.Drawing.Point(267, 30); + this.NUD_DaysFromRefreshed.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.NUD_DaysFromRefreshed.Name = "NUD_DaysFromRefreshed"; + this.NUD_DaysFromRefreshed.Size = new System.Drawing.Size(42, 20); + this.NUD_DaysFromRefreshed.TabIndex = 64; + this.NUD_DaysFromRefreshed.Value = new decimal(new int[] { + 255, + 0, + 0, + 0}); + // + // L_PlazaName + // + this.L_PlazaName.AutoSize = true; + this.L_PlazaName.Location = new System.Drawing.Point(214, 130); + this.L_PlazaName.Name = "L_PlazaName"; + this.L_PlazaName.Size = new System.Drawing.Size(106, 13); + this.L_PlazaName.TabIndex = 62; + this.L_PlazaName.Text = "Festival Plaza Name:"; + this.L_PlazaName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // TB_PlazaName + // + this.TB_PlazaName.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TB_PlazaName.Location = new System.Drawing.Point(217, 150); + this.TB_PlazaName.MaxLength = 20; + this.TB_PlazaName.Name = "TB_PlazaName"; + this.TB_PlazaName.Size = new System.Drawing.Size(159, 20); + this.TB_PlazaName.TabIndex = 61; + this.TB_PlazaName.Text = "WWWWWWWWWWWWWWWWWWWW"; + // // CB_Fashion // this.CB_Fashion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -1844,152 +1992,15 @@ private void InitializeComponent() this.B_Fashion.UseVisualStyleBackColor = true; this.B_Fashion.Click += new System.EventHandler(this.B_Fashion_Click); // - // TB_PlazaName + // CHK_UnlockZMove // - this.TB_PlazaName.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.TB_PlazaName.Location = new System.Drawing.Point(217, 150); - this.TB_PlazaName.MaxLength = 20; - this.TB_PlazaName.Name = "TB_PlazaName"; - this.TB_PlazaName.Size = new System.Drawing.Size(159, 20); - this.TB_PlazaName.TabIndex = 61; - this.TB_PlazaName.Text = "WWWWWWWWWWWWWWWWWWWW"; - // - // L_PlazaName - // - this.L_PlazaName.AutoSize = true; - this.L_PlazaName.Location = new System.Drawing.Point(214, 130); - this.L_PlazaName.Name = "L_PlazaName"; - this.L_PlazaName.Size = new System.Drawing.Size(106, 13); - this.L_PlazaName.TabIndex = 62; - this.L_PlazaName.Text = "Festival Plaza Name:"; - this.L_PlazaName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // L_Vivillon - // - this.L_Vivillon.Location = new System.Drawing.Point(-1, 101); - this.L_Vivillon.Name = "L_Vivillon"; - this.L_Vivillon.Size = new System.Drawing.Size(80, 12); - this.L_Vivillon.TabIndex = 64; - this.L_Vivillon.Text = "Vivillon:"; - this.L_Vivillon.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // CB_Vivillon - // - this.CB_Vivillon.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CB_Vivillon.FormattingEnabled = true; - this.CB_Vivillon.Location = new System.Drawing.Point(85, 98); - this.CB_Vivillon.Name = "CB_Vivillon"; - this.CB_Vivillon.Size = new System.Drawing.Size(93, 20); - this.CB_Vivillon.TabIndex = 65; - // - // L_DaysFromRefreshed - // - this.L_DaysFromRefreshed.Location = new System.Drawing.Point(144, 28); - this.L_DaysFromRefreshed.Name = "L_DaysFromRefreshed"; - this.L_DaysFromRefreshed.Size = new System.Drawing.Size(117, 18); - this.L_DaysFromRefreshed.TabIndex = 63; - this.L_DaysFromRefreshed.Text = "Days from Refreshed:"; - this.L_DaysFromRefreshed.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // NUD_DaysFromRefreshed - // - this.NUD_DaysFromRefreshed.Location = new System.Drawing.Point(267, 30); - this.NUD_DaysFromRefreshed.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.NUD_DaysFromRefreshed.Name = "NUD_DaysFromRefreshed"; - this.NUD_DaysFromRefreshed.Size = new System.Drawing.Size(42, 19); - this.NUD_DaysFromRefreshed.TabIndex = 64; - this.NUD_DaysFromRefreshed.Value = new decimal(new int[] { - 255, - 0, - 0, - 0}); - // - // L_BallThrowType - // - this.L_BallThrowType.Location = new System.Drawing.Point(144, 50); - this.L_BallThrowType.Name = "L_BallThrowType"; - this.L_BallThrowType.Size = new System.Drawing.Size(117, 20); - this.L_BallThrowType.TabIndex = 65; - this.L_BallThrowType.Text = "Ball Throw Type:"; - this.L_BallThrowType.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // CB_BallThrowType - // - this.CB_BallThrowType.FormattingEnabled = true; - this.CB_BallThrowType.Location = new System.Drawing.Point(267, 51); - this.CB_BallThrowType.Name = "CB_BallThrowType"; - this.CB_BallThrowType.Size = new System.Drawing.Size(109, 21); - this.CB_BallThrowType.TabIndex = 66; - // - // CB_BallThrowTypeListMode - // - this.CB_BallThrowTypeListMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CB_BallThrowTypeListMode.FormattingEnabled = true; - this.CB_BallThrowTypeListMode.Items.AddRange(new object[] { - "unlocked list", - "learned list"}); - this.CB_BallThrowTypeListMode.Location = new System.Drawing.Point(154, 76); - this.CB_BallThrowTypeListMode.Name = "CB_BallThrowTypeListMode"; - this.CB_BallThrowTypeListMode.Size = new System.Drawing.Size(107, 21); - this.CB_BallThrowTypeListMode.TabIndex = 67; - this.CB_BallThrowTypeListMode.SelectedIndexChanged += new System.EventHandler(this.UpdateBattleStyle); - // - // LB_BallThrowTypeUnlocked - // - this.LB_BallThrowTypeUnlocked.FormattingEnabled = true; - this.LB_BallThrowTypeUnlocked.ItemHeight = 12; - this.LB_BallThrowTypeUnlocked.Location = new System.Drawing.Point(267, 74); - this.LB_BallThrowTypeUnlocked.Name = "LB_BallThrowTypeUnlocked"; - this.LB_BallThrowTypeUnlocked.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; - this.LB_BallThrowTypeUnlocked.Size = new System.Drawing.Size(109, 52); - this.LB_BallThrowTypeUnlocked.TabIndex = 68; - this.LB_BallThrowTypeUnlocked.SelectedIndexChanged += new System.EventHandler(this.UpdateBallThrowTypeUnlocked); - // - // LB_BallThrowTypeLearned - // - this.LB_BallThrowTypeLearned.FormattingEnabled = true; - this.LB_BallThrowTypeLearned.ItemHeight = 12; - this.LB_BallThrowTypeLearned.Location = new System.Drawing.Point(267, 74); - this.LB_BallThrowTypeLearned.Name = "LB_BallThrowTypeLearned"; - this.LB_BallThrowTypeLearned.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; - this.LB_BallThrowTypeLearned.Size = new System.Drawing.Size(109, 52); - this.LB_BallThrowTypeLearned.TabIndex = 69; - this.LB_BallThrowTypeLearned.Visible = false; - this.LB_BallThrowTypeLearned.SelectedIndexChanged += new System.EventHandler(this.UpdateBallThrowTypeLearned); - // - // L_Stamps - // - this.L_Stamps.AutoSize = true; - this.L_Stamps.Location = new System.Drawing.Point(214, 174); - this.L_Stamps.Name = "L_Stamps"; - this.L_Stamps.Size = new System.Drawing.Size(45, 13); - this.L_Stamps.TabIndex = 70; - this.L_Stamps.Text = "Stamps:"; - this.L_Stamps.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // LB_Stamps - // - this.LB_Stamps.FormattingEnabled = true; - this.LB_Stamps.ItemHeight = 12; - this.LB_Stamps.Location = new System.Drawing.Point(217, 194); - this.LB_Stamps.Name = "LB_Stamps"; - this.LB_Stamps.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; - this.LB_Stamps.Size = new System.Drawing.Size(159, 52); - this.LB_Stamps.TabIndex = 71; - // - // CHK_UnlockMega - // - this.CHK_UnlockMega.AutoSize = true; - this.CHK_UnlockMega.Location = new System.Drawing.Point(6, 256); - this.CHK_UnlockMega.Name = "CHK_UnlockMega"; - this.CHK_UnlockMega.Size = new System.Drawing.Size(90, 17); - this.CHK_UnlockMega.TabIndex = 72; - this.CHK_UnlockMega.Text = "Unlock Mega"; - this.CHK_UnlockMega.UseVisualStyleBackColor = true; + this.CHK_UnlockZMove.AutoSize = true; + this.CHK_UnlockZMove.Location = new System.Drawing.Point(6, 273); + this.CHK_UnlockZMove.Name = "CHK_UnlockZMove"; + this.CHK_UnlockZMove.Size = new System.Drawing.Size(105, 17); + this.CHK_UnlockZMove.TabIndex = 73; + this.CHK_UnlockZMove.Text = "Unlock Z Moves"; + this.CHK_UnlockZMove.UseVisualStyleBackColor = true; // // SAV_Trainer7 // @@ -2215,5 +2226,6 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox CHK_UnlockSuperDoubles; private System.Windows.Forms.CheckBox CHK_UnlockSuperSingles; private System.Windows.Forms.CheckBox CHK_UnlockMega; + private System.Windows.Forms.CheckBox CHK_UnlockZMove; } } diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs index ba9a49246..664ca73f4 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs @@ -107,7 +107,10 @@ private void GetComboBoxes() CB_Vivillon.ValueMember = "Value"; CB_Vivillon.DataSource = PKX.GetFormList(666, GameInfo.Strings.types, GameInfo.Strings.forms, Main.GenderSymbols).ToList(); - foreach (string t in BattleStyles) + var styles = new List(BattleStyles); + if (SAV.USUM) + styles.Add("Nihilist"); + foreach (string t in styles) { CB_BallThrowType.Items.Add(t); LB_BallThrowTypeUnlocked.Items.Add(t); @@ -137,11 +140,13 @@ private void GetTextBoxes() CB_Region.SelectedValue = SAV.SubRegion; CB_3DSReg.SelectedValue = SAV.ConsoleRegion; CB_Language.SelectedValue = SAV.Language; - if (SAV.AlolaTime == 0) - { - SAV.AlolaTime = 24 * 60 * 60; // Patch up any bad times from previous program versions. - } - CB_AlolaTime.SelectedValue = (int)SAV.AlolaTime; + var time = SAV.AlolaTime; + if (time == 0) + time = 24 * 60 * 60; // Patch up any bad times from previous program versions. + if (time == 9_999_999) + CB_AlolaTime.Enabled = false; // alola time doesn't exist yet + else + CB_AlolaTime.SelectedValue = (int)time; NUD_M.Value = SAV.M; // Sanity Check Map Coordinates @@ -209,29 +214,26 @@ private void GetTextBoxes() if (SAV.BallThrowType >= 0 && SAV.BallThrowType < CB_BallThrowType.Items.Count) CB_BallThrowType.SelectedIndex = SAV.BallThrowType; - byte bttu = SAV.BallThrowTypeUnlocked; LB_BallThrowTypeUnlocked.SetSelected(0, true); LB_BallThrowTypeUnlocked.SetSelected(1, true); for (int i = 2; i < LB_BallThrowTypeUnlocked.Items.Count; i++) - LB_BallThrowTypeUnlocked.SetSelected(i, (bttu & (1 << i)) != 0); + LB_BallThrowTypeUnlocked.SetSelected(i, SAV.GetEventFlag(292 + i)); - byte bttl = SAV.BallThrowTypeLearned; LB_BallThrowTypeLearned.SetSelected(0, true); for (int i = 1; i < LB_BallThrowTypeLearned.Items.Count; i++) - LB_BallThrowTypeLearned.SetSelected(i, (bttl & (1 << i)) != 0); - + LB_BallThrowTypeLearned.SetSelected(i, SAV.GetEventFlag(3479 + i)); CB_BallThrowTypeListMode.SelectedIndex = 0; uint stampBits = SAV.Stamps; for (int i = 0; i < LB_Stamps.Items.Count; i++) LB_Stamps.SetSelected(i, (stampBits & (1 << i)) != 0); - byte btsu = SAV.BattleTreeSuperUnlocked; - CHK_UnlockSuperSingles.Checked = (btsu & 1) != 0; - CHK_UnlockSuperDoubles.Checked = (btsu & (1 << 1)) != 0; - CHK_UnlockSuperMulti.Checked = (btsu & (1 << 2)) != 0; + CHK_UnlockSuperSingles.Checked = SAV.GetEventFlag(333); + CHK_UnlockSuperDoubles.Checked = SAV.GetEventFlag(334); + CHK_UnlockSuperMulti.Checked = SAV.GetEventFlag(335); CHK_UnlockMega.Checked = SAV.MegaUnlocked; + CHK_UnlockZMove.Checked = SAV.ZMoveUnlocked; } private void Save() { @@ -245,6 +247,7 @@ private void Save() SAV.Country = WinFormsUtil.GetIndex(CB_Country); SAV.ConsoleRegion = WinFormsUtil.GetIndex(CB_3DSReg); SAV.Language = WinFormsUtil.GetIndex(CB_Language); + if (CB_AlolaTime.Enabled) SAV.AlolaTime = (ulong)WinFormsUtil.GetIndex(CB_AlolaTime); SAV.OT = TB_OTName.Text; @@ -319,18 +322,23 @@ private void Save() if (CB_Vivillon.SelectedIndex >= 0) SAV.Vivillon = CB_Vivillon.SelectedIndex; SAV.DaysFromRefreshed = (byte)NUD_DaysFromRefreshed.Value; - SAV.BallThrowType = CB_BallThrowType.SelectedIndex; - SAV.BallThrowTypeUnlocked = (byte)GetBits(LB_BallThrowTypeUnlocked); - SAV.BallThrowTypeLearned = (byte)GetBits(LB_BallThrowTypeLearned); + if (CB_BallThrowType.SelectedIndex >= 0) + SAV.BallThrowType = CB_BallThrowType.SelectedIndex; + + for (int i = 2; i < LB_BallThrowTypeUnlocked.Items.Count; i++) + SAV.SetEventFlag(292 + i, LB_BallThrowTypeUnlocked.GetSelected(i)); + + for (int i = 1; i < LB_BallThrowTypeLearned.Items.Count; i++) + SAV.SetEventFlag(3479 + i, LB_BallThrowTypeLearned.GetSelected(i)); + SAV.Stamps = GetBits(LB_Stamps); - byte btsu = 0; - if (CHK_UnlockSuperSingles.Checked) btsu |= 1; - if (CHK_UnlockSuperDoubles.Checked) btsu |= 1 << 1; - if (CHK_UnlockSuperMulti.Checked) btsu |= 1 << 2; - SAV.BattleTreeSuperUnlocked = btsu; + SAV.SetEventFlag(333, CHK_UnlockSuperSingles.Checked); + SAV.SetEventFlag(334, CHK_UnlockSuperDoubles.Checked); + SAV.SetEventFlag(335, CHK_UnlockSuperMulti.Checked); SAV.MegaUnlocked = CHK_UnlockMega.Checked; + SAV.ZMoveUnlocked = CHK_UnlockZMove.Checked; } private static uint GetBits(ListBox listbox) { @@ -399,6 +407,11 @@ private void UpdateCountry(object sender, EventArgs e) } private void B_Fashion_Click(object sender, EventArgs e) { + if (SAV.USUM) + { + WinFormsUtil.Alert("Temporarily disabled, needs research for permissible values."); + return; + } var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Modifying Fashion Items will clear existing data", "Continue?"); if (DialogResult.Yes != prompt) return; diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.Designer.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.Designer.cs index 36f087325..4c54d47e1 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.Designer.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.Designer.cs @@ -66,7 +66,7 @@ private void InitializeComponent() this.dgv.Name = "dgv"; this.dgv.RowHeadersVisible = false; this.dgv.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; - this.dgv.Size = new System.Drawing.Size(400, 263); + this.dgv.Size = new System.Drawing.Size(480, 263); this.dgv.TabIndex = 0; // // dgv_ref @@ -94,7 +94,7 @@ private void InitializeComponent() // B_Cancel // this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.B_Cancel.Location = new System.Drawing.Point(337, 306); + this.B_Cancel.Location = new System.Drawing.Point(417, 306); this.B_Cancel.Name = "B_Cancel"; this.B_Cancel.Size = new System.Drawing.Size(75, 23); this.B_Cancel.TabIndex = 1; @@ -105,7 +105,7 @@ private void InitializeComponent() // B_Save // this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.B_Save.Location = new System.Drawing.Point(337, 281); + this.B_Save.Location = new System.Drawing.Point(417, 281); this.B_Save.Name = "B_Save"; this.B_Save.Size = new System.Drawing.Size(75, 23); this.B_Save.TabIndex = 2; @@ -174,7 +174,7 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(424, 341); + this.ClientSize = new System.Drawing.Size(504, 341); this.Controls.Add(this.L_Collected); this.Controls.Add(this.NUD_Collected); this.Controls.Add(this.B_GiveAll); @@ -185,10 +185,10 @@ private void InitializeComponent() this.Controls.Add(this.dgv); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; - this.MinimumSize = new System.Drawing.Size(440, 380); + this.MinimumSize = new System.Drawing.Size(520, 380); this.Name = "SAV_ZygardeCell"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Zygarde Cells"; + this.Text = "Cells/Sticker Editor"; ((System.ComponentModel.ISupportInitialize)(this.dgv)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_Cells)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_Collected)).EndInit(); diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs index dce172271..a46261aa6 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs @@ -32,6 +32,7 @@ public SAV_ZygardeCell(SaveFile sav) // Populate Grid dgv.Rows.Add(cellcount); + var locations = SAV.SM ? locationsSM : locationsUSUM; for (int i = 0; i < cellcount; i++) { if (cells[i] > 2) @@ -41,12 +42,14 @@ public SAV_ZygardeCell(SaveFile sav) dgv.Rows[i].Cells[1].Value = locations[i]; dgv.Rows[i].Cells[2].Value = states[cells[i]]; } + if (SAV.USUM) + L_Cells.Visible = NUD_Cells.Visible = false; } - private const int cellstotal = 0x142/2; - private const int cellscollected = 0x152/2; - private const int celloffset = 198; - private const int cellcount = 95; + private const int cellstotal = 161; + private const int cellscollected = 169; + private const int celloffset = 0xC6; + private int cellcount => SAV.USUM ? 100 : 95; private readonly string[] states = {"None", "Available", "Received"}; private void B_Save_Click(object sender, EventArgs e) @@ -92,7 +95,7 @@ private void B_GiveAll_Click(object sender, EventArgs e) #region locations -- lazy - private readonly string[] locations = + private readonly string[] locationsSM = { "Verdant Cave - Trial Site", "Ruins of Conflict - Outside", @@ -190,6 +193,109 @@ private void B_GiveAll_Click(object sender, EventArgs e) "Aether Foundation 1F - Entrance (Night)", "Aether Foundation 1F - Main Building", }; + private readonly string[] locationsUSUM = + { + "Hau'oli City (Shopping) - Salon (Outside)", + "Hau'oli City (Shopping) - Malasada Shop (Outside)", + "Hau'oli City (Shopping) - Ilima's House (2F)", + "Malie City - Library (1F)", + "Hau'oli City (Marina) - Pier", + "Route 2 - Southeast House", + "Hau'oli City (Shopping) - Ilima's House (Outside)", + "Hau'oli City (Shopping) - City Hall", + "Heahea City - Hotel (3F)", + "Route 2 - Berry Fields House", + "Route 2 - Berry Fields House (Outside)", + "Royal Avenue - Northeast", + "Hau'oli City (Shopping) - Pokemon Center (Outside)", + "Royal Avenue - South", + "Hokulani Observatory - Room", + "Hokulani Observatory - Reception", + "Hau'oli City (Shopping) - City Hall (Outside)", + "Konikoni City - Olivia's Jewelry Shop (2F)", + "Heahea City - Surfboard (Outside)", + "Po Town - Southwest", + "Hano Resort Lobby - Southwest Water", + "Hau'oli City (Shopping) - Northwest of Police Station", + "Hau'oli City (Marina) - Ferry Terminal (Outside)", + "Route 2 - Southeast House (Outside)", + "Route 2 - Pokemon Center (Outside)", + "Heahea City - West", + "Heahea City - Hotel West (Outside)", + "Heahea City - Hotel East (Outside)", + "Heahea City - Research Lab East (Outside)", + "Heahea City - Research Lab South (Outside)", + "Heahea City - Game Freak", + "Hokulani Observatory - Dead End", + "Heahea City - Game Freak Building (3F)", + "Heahea City - Research Lab", + "Heahea City - Hotel (1F)", + "Battle Royal Dome - 2F", + "Paniola Town - West", + "Paniola Town - Kiawe's House (1F)", + "Paniola Town - Kiawe's House (2F)", + "Paniola Ranch - Northwest", + "Paniola Ranch - Southeast", + "Hano Beach", + "Hano Resort - South", + "Hano Resort - North", + "Konikoni City Lighthouse (Through Diglett's Tunnel)", + "Battle Royal Dome - 1F", + "Route 8 - Aether Base (Outside)", + "Route 8 - Fossil Restoration Center (Outside)", + "Konikoni City - West", + "Konikoni City - Restaurant (1F)", + "Iki Town - Southwest", + "Hau'oli City (Shopping) - Ilima's House Pool", + "Wela Volcano Park - Rocks Behind Sign", + "Route 5 - South of Pokemon Center", + "Hano Beach - Below Sandygast", + "Malie City (Outer Cape) - Recycling Plant (Outside)", + "Malie City - Ferry Terminal (Outside)", + "Malie City - Apparel Shop (Outside)", + "Malie City - Salon (Outside)", + "Route 16 - Aether Base (Outside)", + "Blush Mountain - Power Plant (Outside)", + "Malie City - Library (2F)", + "Malie Garden - Northeast", + "Malie City - CommunityCenter", + "Hokulani Observatory - Outside", + "Mount Hokulani", + "Blush Mountain - Power Plant", + "Route 13", + "Route 14 - Front of Abandoned Megamart", + "Route 14 - North", + "Route 15 - Islet Surfboard (Outside)", + "Route 17 - Police Station (Outside)", + "Route 17 - Police Station", + "Po Town - Pokemon Center (Outside)", + "Exeggutor Island - Under Rock", + "Po Town - Shady House East (Outside)", + "Po Town - Pokemon Center", + "Po Town - Shady House (1F)", + "Route 13 - Motel (Outside)", + "Po Town - Shady House 2F (Outside)", + "Route 17 - South of Po Town", + "Ula'ula Meadow", + "Po Town - Shady House West Rocks (Outside) 1", + "Po Town - Shady House West Rocks (Outside) 2", + "Po Town - Shady House West Rocks (Outside) 3", + "Seafolk Village - Southeast Whiscash (Mina's Ship) (Outside)", + "Seafolk Village - Southwest Huntail", + "Seafolk Village - Southwest Huntail (Outside)", + "Seafolk Village - Southeast Whiscash (Mina's Ship)", + "Seafolk Village - West Wailord (Restaurant)", + "Seafolk Village - East Gyarados", + "Poni Wilds - Southeast", + "Ancient Poni Path - Hapu's House (Kitchen)", + "Seafolk Village - Northeast", + "Ancient Poni Path - Hapu's House (Bedroom)", + "Ancient Poni Path - Southwest", + "Ancient Poni Path - Hapu's House (Courtyard)", + "Ancient Poni Path - Hapu's House (Outside Behind Well)", + "Ancient Poni Path - Northeast", + "Battle Tree - Entrance", + }; #endregion } diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs index b8a9fdb70..c8ac2632d 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs @@ -114,6 +114,10 @@ private string[] GetStringList(string type) case GameVersion.MN: gamePrefix = "sm"; break; + case GameVersion.US: + case GameVersion.UM: + gamePrefix = "usum"; + break; case GameVersion.DP: gamePrefix = "dp"; break; @@ -434,6 +438,8 @@ private void DiffSaves() SaveFile s1 = SaveUtil.GetVariantSAV(File.ReadAllBytes(TB_OldSAV.Text)); SaveFile s2 = SaveUtil.GetVariantSAV(File.ReadAllBytes(TB_NewSAV.Text)); + if (s1 == null) { WinFormsUtil.Alert("Save 1 file invalid."); return; } + if (s2 == null) { WinFormsUtil.Alert("Save 2 file invalid."); return; } if (s1.GetType() != s2.GetType()) { WinFormsUtil.Alert("Save types are different.", $"S1: {s1.GetType().Name}", $"S2: {s2.GetType().Name}"); return; } if (s1.Version != s2.Version) { WinFormsUtil.Alert("Save versions are different.", $"S1: {s1.Version}", $"S2: {s2.Version}"); return; } @@ -451,9 +457,9 @@ private void DiffSaves() { if (oldBits[i] == newBits[i]) continue; if (newBits[i]) - tbIsSet += i.ToString("0000") + ","; + tbIsSet += $"{i:0000},"; else - tbUnSet += i.ToString("0000") + ","; + tbUnSet += $"{i:0000},"; } } catch (Exception e) diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs index 5ff031184..7f1a48469 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs @@ -197,7 +197,9 @@ private void SetBag(DataGridView dgv, InventoryPouch pouch) int c = 0; string item = dgv.Rows[i].Cells[c++].Value.ToString(); int itemindex = Array.IndexOf(itemlist, item); - if (itemindex <= 0) // Compression of Empty Slots + bool roto = pouch.Type == InventoryType.BattleItems && Legal.Pouch_Roto_USUM.Contains((ushort) itemindex); + + if (itemindex <= 0 && !roto) // Compression of Empty Slots continue; int.TryParse(dgv.Rows[i].Cells[c++].Value?.ToString(), out int itemcnt); @@ -217,7 +219,7 @@ private void SetBag(DataGridView dgv, InventoryPouch pouch) else itemcnt = pouch.MaxCount; // Cap at pouch maximum } - else if (itemcnt <= 0) + else if (itemcnt <= 0 && !roto) continue; // ignore item pouch.Items[ctr] = new InventoryItem { Index = itemindex, Count = itemcnt }; diff --git a/PKHeX.WinForms/Util/PKMUtil.cs b/PKHeX.WinForms/Util/PKMUtil.cs index 742994e87..185dbc9e3 100644 --- a/PKHeX.WinForms/Util/PKMUtil.cs +++ b/PKHeX.WinForms/Util/PKMUtil.cs @@ -49,6 +49,13 @@ public static Image GetSprite(int species, int form, int gender, int item, bool // Redrawing logic Image baseImage = (Image)Resources.ResourceManager.GetObject(file); + if (FormConverter.IsTotemForm(species, form)) + { + form = FormConverter.GetTotemBaseForm(species, form); + file = PKX.GetResourceStringSprite(species, form, gender, generation); + baseImage = (Image)Resources.ResourceManager.GetObject(file); + baseImage = ImageUtil.ToGrayscale(baseImage); + } if (baseImage == null) { baseImage = (Image) Resources.ResourceManager.GetObject($"_{species}"); diff --git a/Tests/PKHeX.Tests/Util/DataUtilTests.cs b/Tests/PKHeX.Tests/Util/DataUtilTests.cs index 1b0be184f..e258b0fa0 100644 --- a/Tests/PKHeX.Tests/Util/DataUtilTests.cs +++ b/Tests/PKHeX.Tests/Util/DataUtilTests.cs @@ -1,9 +1,4 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace PKHeX.Tests.Util { @@ -17,7 +12,7 @@ public class DataUtilTests public void TestGetPokemonNames() { var names = PKHeX.Core.Util.GetSpeciesList("en"); - Assert.AreEqual(803, names.Length); + Assert.AreEqual(808, names.Length); } } }