diff --git a/Legality/Checks.cs b/Legality/Checks.cs index 4d55eda33..5c33a70c4 100644 --- a/Legality/Checks.cs +++ b/Legality/Checks.cs @@ -30,7 +30,7 @@ namespace PKHeX { private LegalityCheck verifyGender() { - if (PersonalInfo.AO[pk6.Species].Gender == 255 && pk6.Gender != 2) + if (PersonalTable.AO[pk6.Species].Gender == 255 && pk6.Gender != 2) return new LegalityCheck(Severity.Invalid, "Genderless Pokémon should not have a gender."); return new LegalityCheck(); @@ -431,8 +431,7 @@ namespace PKHeX } private LegalityCheck verifyAbility() { - int index = PersonalInfo.AO[pk6.Species].FormeIndex(pk6.Species, pk6.AltForm); - int[] abilities = PersonalInfo.AO[index].Abilities; + int[] abilities = PersonalTable.AO.getAbilities(pk6.Species, pk6.AltForm); int abilval = Array.IndexOf(abilities, pk6.Ability); if (abilval < 0) return new LegalityCheck(Severity.Invalid, "Ability is not valid for species/form."); @@ -585,7 +584,7 @@ namespace PKHeX WC6 MatchedWC6 = EncounterMatch as WC6; if (MatchedWC6?.OT.Length > 0) // Has Event OT -- null propagation yields false if MatchedWC6=null { - if (pk6.OT_Friendship != PKX.getBaseFriendship(pk6.Species)) + if (pk6.OT_Friendship != PersonalTable.AO[pk6.Species].BaseFriendship) return new LegalityCheck(Severity.Invalid, "Event OT Friendship does not match base friendship."); if (pk6.OT_Affection != 0) return new LegalityCheck(Severity.Invalid, "Event OT Affection should be zero."); diff --git a/Legality/Core.cs b/Legality/Core.cs index 5075ce9d3..29fcad10c 100644 --- a/Legality/Core.cs +++ b/Legality/Core.cs @@ -405,8 +405,8 @@ namespace PKHeX } private static IEnumerable getLVLMoves(int species, int lvl, int formnum) { - int ind_XY = PersonalInfo.XY[species].FormeIndex(species, formnum); - int ind_AO = PersonalInfo.AO[species].FormeIndex(species, formnum); + int ind_XY = PersonalTable.XY.getFormeIndex(species, formnum); + int ind_AO = PersonalTable.AO.getFormeIndex(species, formnum); return LevelUpXY[ind_XY].getMoves(lvl).Concat(LevelUpAO[ind_AO].getMoves(lvl)); } private static IEnumerable getEncounterSlots(PK6 pk6) @@ -543,7 +543,7 @@ namespace PKHeX bool ORASTutors = Version == -1 || pk6.AO || !pk6.IsUntraded; if (FormChangeMoves.Contains(species)) // Deoxys & Shaymin & Giratina (others don't have extra but whatever) { - int formcount = PersonalInfo.AO[species].FormeCount; + int formcount = PersonalTable.AO[species].FormeCount; for (int i = 0; i < formcount; i++) r.AddRange(getMoves(species, lvl, i, ORASTutors, Version, LVL, Tutor, Machine)); if (Relearn) r.AddRange(pk6.RelearnMoves); @@ -568,8 +568,8 @@ namespace PKHeX List r = new List { 0 }; if (Version < 0 || Version == 0) { - int index = PersonalInfo.XY[species].FormeIndex(species, form); - PersonalInfo pi = PersonalInfo.XY[index]; + int index = PersonalTable.XY.getFormeIndex(species, form); + PersonalInfo pi = PersonalTable.XY.getFormeEntry(species, form); if (LVL) r.AddRange(LevelUpXY[index].getMoves(lvl)); if (Tutor) r.AddRange(getTutorMoves(species, form, ORASTutors)); @@ -577,8 +577,8 @@ namespace PKHeX } if (Version < 0 || Version == 1) { - int index = PersonalInfo.AO[species].FormeIndex(species, form); - PersonalInfo pi = PersonalInfo.AO[index]; + int index = PersonalTable.AO.getFormeIndex(species, form); + PersonalInfo pi = PersonalTable.AO.getFormeEntry(species, form); if (LVL) r.AddRange(LevelUpAO[index].getMoves(lvl)); if (Tutor) r.AddRange(getTutorMoves(species, form, ORASTutors)); @@ -588,13 +588,13 @@ namespace PKHeX } private static IEnumerable getEggMoves(int species, int formnum) { - int ind_XY = PersonalInfo.XY[species].FormeIndex(species, formnum); - int ind_AO = PersonalInfo.AO[species].FormeIndex(species, formnum); + int ind_XY = PersonalTable.XY.getFormeIndex(species, formnum); + int ind_AO = PersonalTable.AO.getFormeIndex(species, formnum); return EggMoveAO[ind_AO].Moves.Concat(EggMoveXY[ind_XY].Moves); } private static IEnumerable getTutorMoves(int species, int formnum, bool ORASTutors) { - PersonalInfoORAS pkAO = (PersonalInfoORAS) PersonalInfo.AO[PersonalInfo.AO[species].FormeIndex(species, formnum)]; + PersonalInfo pkAO = PersonalTable.AO.getFormeEntry(species, formnum); // Type Tutor List moves = TypeTutor.Where((t, i) => pkAO.TypeTutors[i]).ToList(); diff --git a/Legality/Data.cs b/Legality/Data.cs index 5e76c58a8..e2195585f 100644 --- a/Legality/Data.cs +++ b/Legality/Data.cs @@ -223,7 +223,7 @@ namespace PKHeX public bool XY = true; public bool ORAS = true; public bool? Shiny = false; - public bool OT = false; + public bool OT = true; // Receiver is OT? } public enum Nature { diff --git a/Legality/Tables.cs b/Legality/Tables.cs index 84437cf83..4ab3f3d22 100644 --- a/Legality/Tables.cs +++ b/Legality/Tables.cs @@ -762,8 +762,8 @@ namespace PKHeX new EncounterLink { Species = 378, Level = 50, RelearnMoves = new[] {85, 133, 58, 258 }, Ability = 4 }, // Regice new EncounterLink { Species = 379, Level = 50, RelearnMoves = new[] {442, 157, 356, 334 }, Ability = 4 }, // Registeel - new EncounterLink { Species = 208, Level = 40, Classic = false, Ability = 1, XY = false }, // Steelix - new EncounterLink { Species = 362, Level = 40, Classic = false, Ability = 1, XY = false }, // Glalie + new EncounterLink { Species = 208, Level = 40, Classic = false, Ability = 1, XY = false, OT = false }, // Steelix + new EncounterLink { Species = 362, Level = 40, Classic = false, Ability = 1, XY = false, OT = false }, // Glalie }; #endregion @@ -929,5 +929,23 @@ namespace PKHeX new[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // Region matching }; #endregion + + internal static readonly int[] MovePP_XY = + { + 00, + 35, 25, 10, 15, 20, 20, 15, 15, 15, 35, 30, 05, 10, 20, 30, 35, 35, 20, 15, 20, 20, 25, 20, 30, 05, 10, 15, 15, 15, 25, 20, 05, 35, 15, 20, 20, 10, 15, 30, 35, 20, 20, 30, 25, 40, 20, 15, 20, 20, 20, + 30, 25, 15, 30, 25, 05, 15, 10, 05, 20, 20, 20, 05, 35, 20, 25, 20, 20, 20, 15, 25, 15, 10, 20, 25, 10, 35, 30, 15, 10, 40, 10, 15, 30, 15, 20, 10, 15, 10, 05, 10, 10, 25, 10, 20, 40, 30, 30, 20, 20, + 15, 10, 40, 15, 10, 30, 10, 20, 10, 40, 40, 20, 30, 30, 20, 30, 10, 10, 20, 05, 10, 30, 20, 20, 20, 05, 15, 15, 20, 10, 15, 35, 20, 15, 10, 10, 30, 15, 40, 20, 15, 10, 05, 10, 30, 10, 15, 20, 15, 40, + 20, 10, 05, 15, 10, 10, 10, 15, 30, 30, 10, 10, 20, 10, 01, 01, 10, 25, 10, 05, 15, 25, 15, 10, 15, 30, 05, 40, 15, 10, 25, 10, 30, 10, 20, 10, 10, 10, 10, 10, 20, 05, 40, 05, 05, 15, 05, 10, 05, 10, + 10, 10, 10, 20, 20, 40, 15, 10, 20, 20, 25, 05, 15, 10, 05, 20, 15, 20, 25, 20, 05, 30, 05, 10, 20, 40, 05, 20, 40, 20, 15, 35, 10, 05, 05, 05, 15, 05, 20, 05, 05, 15, 20, 10, 05, 05, 15, 10, 15, 15, + 10, 10, 10, 20, 10, 10, 10, 10, 15, 15, 15, 10, 20, 20, 10, 20, 20, 20, 20, 20, 10, 10, 10, 20, 20, 05, 15, 10, 10, 15, 10, 20, 05, 05, 10, 10, 20, 05, 10, 20, 10, 20, 20, 20, 05, 05, 15, 20, 10, 15, + 20, 15, 10, 10, 15, 10, 05, 05, 10, 15, 10, 05, 20, 25, 05, 40, 15, 05, 40, 15, 20, 20, 05, 15, 20, 20, 15, 15, 05, 10, 30, 20, 30, 15, 05, 40, 15, 05, 20, 05, 15, 25, 25, 15, 20, 15, 20, 15, 20, 10, + 20, 20, 05, 05, 10, 05, 40, 10, 10, 05, 10, 10, 15, 10, 20, 15, 30, 10, 20, 05, 10, 10, 15, 10, 10, 05, 15, 05, 10, 10, 30, 20, 20, 10, 10, 05, 05, 10, 05, 20, 10, 20, 10, 15, 10, 20, 20, 20, 15, 15, + 10, 15, 15, 15, 10, 10, 10, 20, 10, 30, 05, 10, 15, 10, 10, 05, 20, 30, 10, 30, 15, 15, 15, 15, 30, 10, 20, 15, 10, 10, 20, 15, 05, 05, 15, 15, 05, 10, 05, 20, 05, 15, 20, 05, 20, 20, 20, 20, 10, 20, + 10, 15, 20, 15, 10, 10, 05, 10, 05, 05, 10, 05, 05, 10, 05, 05, 05, 15, 10, 10, 10, 10, 10, 10, 15, 20, 15, 10, 15, 10, 15, 10, 20, 10, 15, 10, 20, 20, 20, 20, 20, 15, 15, 15, 15, 15, 15, 20, 15, 10, + 15, 15, 15, 15, 10, 10, 10, 10, 10, 15, 15, 15, 15, 05, 05, 15, 05, 10, 10, 10, 20, 20, 20, 10, 10, 30, 15, 15, 10, 15, 25, 10, 15, 10, 10, 10, 20, 10, 10, 10, 10, 10, 15, 15, 05, 05, 10, 10, 10, 05, + 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, + }; } } diff --git a/Legality/Tables3.cs b/Legality/Tables3.cs index fb828819e..d94fa86f3 100644 --- a/Legality/Tables3.cs +++ b/Legality/Tables3.cs @@ -5,7 +5,7 @@ namespace PKHeX public static partial class Legal { // PKHeX Valid Array Storage - #region DP + #region RS internal static readonly ushort[] Pouch_Items_RS = { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 93, 94, 95, 96, 97, 98, 103, 104, 106, 107, 108, 109, 110, 111, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 254, 255, 256, 257, 258 }; @@ -24,13 +24,24 @@ namespace PKHeX internal static readonly ushort[] Pouch_Ball_RS = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; - internal static readonly ushort[] Pouch_Key_E = Pouch_Key_RS.Concat(new ushort[] { 375, 376 }).ToArray(); internal static readonly ushort[] Pouch_Key_FRLG = Pouch_Key_RS.Concat(new ushort[] { 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374 }).ToArray(); - + internal static readonly ushort[] Pouch_Key_E = Pouch_Key_FRLG.Concat(new ushort[] { 375, 376 }).ToArray(); + internal static readonly ushort[] Pouch_TMHM_RS = Pouch_TM_RS.Concat(Pouch_HM_RS).ToArray(); internal static readonly ushort[] HeldItems_RS = new ushort[1].Concat(Pouch_Items_RS).Concat(Pouch_Ball_RS).Concat(Pouch_Berries_RS).Concat(Pouch_TM_RS).ToArray(); #endregion - + internal static readonly int[] MovePP_RS = + { + 00, + 35, 25, 10, 15, 20, 20, 15, 15, 15, 35, 30, 05, 10, 30, 30, 35, 35, 20, 15, 20, 20, 10, 20, 30, 05, 25, 15, 15, 15, 25, 20, 05, 35, 15, 20, 20, 20, 15, 30, 35, 20, 20, 30, 25, 40, 20, 15, 20, 20, 20, + 30, 25, 15, 30, 25, 05, 15, 10, 05, 20, 20, 20, 05, 35, 20, 25, 20, 20, 20, 15, 20, 10, 10, 40, 25, 10, 35, 30, 15, 20, 40, 10, 15, 30, 15, 20, 10, 15, 10, 05, 10, 10, 25, 10, 20, 40, 30, 30, 20, 20, + 15, 10, 40, 15, 20, 30, 20, 20, 10, 40, 40, 30, 30, 30, 20, 30, 10, 10, 20, 05, 10, 30, 20, 20, 20, 05, 15, 10, 20, 15, 15, 35, 20, 15, 10, 20, 30, 15, 40, 20, 15, 10, 05, 10, 30, 10, 15, 20, 15, 40, + 40, 10, 05, 15, 10, 10, 10, 15, 30, 30, 10, 10, 20, 10, 01, 01, 10, 10, 10, 05, 15, 25, 15, 10, 15, 30, 05, 40, 15, 10, 25, 10, 30, 10, 20, 10, 10, 10, 10, 10, 20, 05, 40, 05, 05, 15, 05, 10, 05, 15, + 10, 05, 10, 20, 20, 40, 15, 10, 20, 20, 25, 05, 15, 10, 05, 20, 15, 20, 25, 20, 05, 30, 05, 10, 20, 40, 05, 20, 40, 20, 15, 35, 10, 05, 05, 05, 15, 05, 20, 05, 05, 15, 20, 10, 05, 05, 15, 15, 15, 15, + 10, 10, 10, 10, 10, 10, 10, 10, 15, 15, 15, 10, 20, 20, 10, 20, 20, 20, 20, 20, 10, 10, 10, 20, 20, 05, 15, 10, 10, 15, 10, 20, 05, 05, 10, 10, 20, 05, 10, 20, 10, 20, 20, 20, 05, 05, 15, 20, 10, 15, + 20, 15, 10, 10, 15, 10, 05, 05, 10, 15, 10, 05, 20, 25, 05, 40, 10, 05, 40, 15, 20, 20, 05, 15, 20, 30, 15, 15, 05, 10, 30, 20, 30, 15, 05, 40, 15, 05, 20, 05, 15, 25, 40, 15, 20, 15, 20, 15, 20, 10, + 20, 20, 05, 05, + }; } } diff --git a/Legality/Tables4.cs b/Legality/Tables4.cs index 1500a39ab..5ac132dc5 100644 --- a/Legality/Tables4.cs +++ b/Legality/Tables4.cs @@ -66,5 +66,20 @@ namespace PKHeX internal static readonly ushort[] HeldItems_HGSS = new ushort[1].Concat(Pouch_Items_HGSS).Concat(Pouch_Mail_HGSS).Concat(Pouch_Medicine_HGSS).Concat(Pouch_Berries_HGSS).Concat(Pouch_Ball_Pt).ToArray(); #endregion + + internal static readonly int[] MovePP_DP = + { + 00, + 35, 25, 10, 15, 20, 20, 15, 15, 15, 35, 30, 05, 10, 30, 30, 35, 35, 20, 15, 20, 20, 15, 20, 30, 05, 25, 15, 15, 15, 25, 20, 05, 35, 15, 20, 20, 20, 15, 30, 35, 20, 20, 30, 25, 40, 20, 15, 20, 20, 20, + 30, 25, 15, 30, 25, 05, 15, 10, 05, 20, 20, 20, 05, 35, 20, 25, 20, 20, 20, 15, 25, 15, 10, 40, 25, 10, 35, 30, 15, 20, 40, 10, 15, 30, 15, 20, 10, 15, 10, 05, 10, 10, 25, 10, 20, 40, 30, 30, 20, 20, + 15, 10, 40, 15, 10, 30, 20, 20, 10, 40, 40, 30, 30, 30, 20, 30, 10, 10, 20, 05, 10, 30, 20, 20, 20, 05, 15, 10, 20, 15, 15, 35, 20, 15, 10, 20, 30, 15, 40, 20, 15, 10, 05, 10, 30, 10, 15, 20, 15, 40, + 40, 10, 05, 15, 10, 10, 10, 15, 30, 30, 10, 10, 20, 10, 01, 01, 10, 10, 10, 05, 15, 25, 15, 10, 15, 30, 05, 40, 15, 10, 25, 10, 30, 10, 20, 10, 10, 10, 10, 10, 20, 05, 40, 05, 05, 15, 05, 10, 05, 15, + 10, 10, 10, 20, 20, 40, 15, 10, 20, 20, 25, 05, 15, 10, 05, 20, 15, 20, 25, 20, 05, 30, 05, 10, 20, 40, 05, 20, 40, 20, 15, 35, 10, 05, 05, 05, 15, 05, 20, 05, 05, 15, 20, 10, 05, 05, 15, 15, 15, 15, + 10, 10, 10, 20, 10, 10, 10, 10, 15, 15, 15, 10, 20, 20, 10, 20, 20, 20, 20, 20, 10, 10, 10, 20, 20, 05, 15, 10, 10, 15, 10, 20, 05, 05, 10, 10, 20, 05, 10, 20, 10, 20, 20, 20, 05, 05, 15, 20, 10, 15, + 20, 15, 10, 10, 15, 10, 05, 05, 10, 15, 10, 05, 20, 25, 05, 40, 10, 05, 40, 15, 20, 20, 05, 15, 20, 30, 15, 15, 05, 10, 30, 20, 30, 15, 05, 40, 15, 05, 20, 05, 15, 25, 40, 15, 20, 15, 20, 15, 20, 10, + 20, 20, 05, 05, 10, 05, 40, 10, 10, 05, 10, 10, 15, 10, 20, 30, 30, 10, 20, 05, 10, 10, 15, 10, 10, 05, 15, 05, 10, 10, 30, 20, 20, 10, 10, 05, 05, 10, 05, 20, 10, 20, 10, 15, 10, 20, 20, 20, 15, 15, + 10, 15, 20, 15, 10, 10, 10, 20, 05, 30, 05, 10, 15, 10, 10, 05, 20, 30, 10, 30, 15, 15, 15, 15, 30, 10, 20, 15, 10, 10, 20, 15, 05, 05, 15, 15, 05, 10, 05, 20, 05, 15, 20, 05, 20, 20, 20, 20, 10, 20, + 10, 15, 20, 15, 10, 10, 05, 10, 05, 05, 10, 05, 05, 10, 05, 05, 05, + }; } } diff --git a/Legality/Tables5.cs b/Legality/Tables5.cs index d6b09e99e..354a3e79d 100644 --- a/Legality/Tables5.cs +++ b/Legality/Tables5.cs @@ -25,5 +25,22 @@ namespace PKHeX internal static readonly ushort[] Pouch_Key_B2W2 = { 437, 442, 447, 450, 453, 458, 465, 466, 471, 504, 578, 616, 617, 621, 626, 627, 628, 630, 631, 632, 633, 634, 635, 636, 637, 638, }; + + internal static readonly int[] MovePP_BW = + { + 00, + 35, 25, 10, 15, 20, 20, 15, 15, 15, 35, 30, 05, 10, 30, 30, 35, 35, 20, 15, 20, 20, 15, 20, 30, 05, 25, 15, 15, 15, 25, 20, 05, 35, 15, 20, 20, 10, 15, 30, 35, 20, 20, 30, 25, 40, 20, 15, 20, 20, 20, + 30, 25, 15, 30, 25, 05, 15, 10, 05, 20, 20, 20, 05, 35, 20, 25, 20, 20, 20, 15, 25, 15, 10, 40, 25, 10, 35, 30, 15, 10, 40, 10, 15, 30, 15, 20, 10, 15, 10, 05, 10, 10, 25, 10, 20, 40, 30, 30, 20, 20, + 15, 10, 40, 15, 10, 30, 20, 20, 10, 40, 40, 30, 30, 30, 20, 30, 10, 10, 20, 05, 10, 30, 20, 20, 20, 05, 15, 15, 20, 15, 15, 35, 20, 15, 10, 10, 30, 15, 40, 20, 15, 10, 05, 10, 30, 10, 15, 20, 15, 40, + 40, 10, 05, 15, 10, 10, 10, 15, 30, 30, 10, 10, 20, 10, 01, 01, 10, 10, 10, 05, 15, 25, 15, 10, 15, 30, 05, 40, 15, 10, 25, 10, 30, 10, 20, 10, 10, 10, 10, 10, 20, 05, 40, 05, 05, 15, 05, 10, 05, 10, + 10, 10, 10, 20, 20, 40, 15, 10, 20, 20, 25, 05, 15, 10, 05, 20, 15, 20, 25, 20, 05, 30, 05, 10, 20, 40, 05, 20, 40, 20, 15, 35, 10, 05, 05, 05, 15, 05, 20, 05, 05, 15, 20, 10, 05, 05, 15, 10, 15, 15, + 10, 10, 10, 20, 10, 10, 10, 10, 15, 15, 15, 10, 20, 20, 10, 20, 20, 20, 20, 20, 10, 10, 10, 20, 20, 05, 15, 10, 10, 15, 10, 20, 05, 05, 10, 10, 20, 05, 10, 20, 10, 20, 20, 20, 05, 05, 15, 20, 10, 15, + 20, 15, 10, 10, 15, 10, 05, 05, 10, 15, 10, 05, 20, 25, 05, 40, 10, 05, 40, 15, 20, 20, 05, 15, 20, 30, 15, 15, 05, 10, 30, 20, 30, 15, 05, 40, 15, 05, 20, 05, 15, 25, 40, 15, 20, 15, 20, 15, 20, 10, + 20, 20, 05, 05, 10, 05, 40, 10, 10, 05, 10, 10, 15, 10, 20, 30, 30, 10, 20, 05, 10, 10, 15, 10, 10, 05, 15, 05, 10, 10, 30, 20, 20, 10, 10, 05, 05, 10, 05, 20, 10, 20, 10, 15, 10, 20, 20, 20, 15, 15, + 10, 15, 20, 15, 10, 10, 10, 20, 10, 30, 05, 10, 15, 10, 10, 05, 20, 30, 10, 30, 15, 15, 15, 15, 30, 10, 20, 15, 10, 10, 20, 15, 05, 05, 15, 15, 05, 10, 05, 20, 05, 15, 20, 05, 20, 20, 20, 20, 10, 20, + 10, 15, 20, 15, 10, 10, 05, 10, 05, 05, 10, 05, 05, 10, 05, 05, 05, 15, 10, 10, 10, 10, 10, 10, 15, 20, 15, 10, 15, 10, 15, 10, 20, 10, 15, 10, 20, 20, 20, 20, 20, 15, 15, 15, 15, 15, 15, 20, 15, 10, + 15, 15, 15, 15, 10, 10, 10, 10, 10, 15, 15, 15, 15, 05, 05, 15, 05, 10, 10, 10, 20, 20, 20, 10, 10, 30, 15, 15, 10, 15, 25, 10, 20, 10, 10, 10, 20, 10, 10, 10, 10, 10, 15, 15, 05, 05, 10, 10, 10, 05, + 05, 10, 05, 05, 15, 10, 05, 05, 05, + }; } } diff --git a/MainWindow/Main.Designer.cs b/MainWindow/Main.Designer.cs index e34d12b1d..d07b01920 100644 --- a/MainWindow/Main.Designer.cs +++ b/MainWindow/Main.Designer.cs @@ -181,8 +181,8 @@ this.Tab_OTMisc = new System.Windows.Forms.TabPage(); this.FLP_PKMEditors = new System.Windows.Forms.FlowLayoutPanel(); this.BTN_Ribbons = new System.Windows.Forms.Button(); - this.BTN_History = new System.Windows.Forms.Button(); this.BTN_Medals = new System.Windows.Forms.Button(); + this.BTN_History = new System.Windows.Forms.Button(); this.TB_EC = new System.Windows.Forms.TextBox(); this.GB_nOT = new System.Windows.Forms.GroupBox(); this.Label_CTGender = new System.Windows.Forms.Label(); @@ -355,6 +355,7 @@ this.B_OpenBerryField = new System.Windows.Forms.Button(); this.B_OpenSecretBase = new System.Windows.Forms.Button(); this.B_Pokeblocks = new System.Windows.Forms.Button(); + this.B_LinkInfo = new System.Windows.Forms.Button(); this.dragout = new System.Windows.Forms.PictureBox(); this.mnuL = new System.Windows.Forms.ContextMenuStrip(this.components); this.mnuLLegality = new System.Windows.Forms.ToolStripMenuItem(); @@ -2289,22 +2290,6 @@ this.BTN_Ribbons.UseVisualStyleBackColor = true; this.BTN_Ribbons.Click += new System.EventHandler(this.openRibbons); // - // BTN_History - // - this.BTN_History.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.BTN_History.AutoSize = true; - this.BTN_History.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.BTN_History.Location = new System.Drawing.Point(112, 1); - this.BTN_History.Margin = new System.Windows.Forms.Padding(1); - this.BTN_History.Name = "BTN_History"; - this.BTN_History.Size = new System.Drawing.Size(62, 23); - this.BTN_History.TabIndex = 6; - this.BTN_History.Text = "Memories"; - this.BTN_History.UseVisualStyleBackColor = true; - this.BTN_History.Click += new System.EventHandler(this.openHistory); - // // BTN_Medals // this.BTN_Medals.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -2321,6 +2306,22 @@ this.BTN_Medals.UseVisualStyleBackColor = true; this.BTN_Medals.Click += new System.EventHandler(this.openMedals); // + // BTN_History + // + this.BTN_History.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.BTN_History.AutoSize = true; + this.BTN_History.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.BTN_History.Location = new System.Drawing.Point(112, 1); + this.BTN_History.Margin = new System.Windows.Forms.Padding(1); + this.BTN_History.Name = "BTN_History"; + this.BTN_History.Size = new System.Drawing.Size(62, 23); + this.BTN_History.TabIndex = 6; + this.BTN_History.Text = "Memories"; + this.BTN_History.UseVisualStyleBackColor = true; + this.BTN_History.Click += new System.EventHandler(this.openHistory); + // // TB_EC // this.TB_EC.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -3022,7 +3023,7 @@ // // PAN_Box // - this.PAN_Box.BackgroundImage = global::PKHeX.Properties.Resources.box_wp16; + this.PAN_Box.BackgroundImage = global::PKHeX.Properties.Resources.box_wp16xy; this.PAN_Box.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.PAN_Box.Controls.Add(this.bpkx30); this.PAN_Box.Controls.Add(this.bpkx29); @@ -4187,6 +4188,7 @@ this.FLP_SAVtools.Controls.Add(this.B_OpenBerryField); this.FLP_SAVtools.Controls.Add(this.B_OpenSecretBase); this.FLP_SAVtools.Controls.Add(this.B_Pokeblocks); + this.FLP_SAVtools.Controls.Add(this.B_LinkInfo); this.FLP_SAVtools.Location = new System.Drawing.Point(6, 10); this.FLP_SAVtools.Name = "FLP_SAVtools"; this.FLP_SAVtools.Size = new System.Drawing.Size(297, 87); @@ -4335,6 +4337,16 @@ this.B_Pokeblocks.Visible = false; this.B_Pokeblocks.Click += new System.EventHandler(this.B_OpenPokeblocks_Click); // + // B_LinkInfo + // + this.B_LinkInfo.Location = new System.Drawing.Point(189, 119); + this.B_LinkInfo.Name = "B_LinkInfo"; + this.B_LinkInfo.Size = new System.Drawing.Size(87, 23); + this.B_LinkInfo.TabIndex = 23; + this.B_LinkInfo.Text = "Link Data"; + this.B_LinkInfo.UseVisualStyleBackColor = true; + this.B_LinkInfo.Click += new System.EventHandler(this.B_LinkInfo_Click); + // // dragout // this.dragout.BackColor = System.Drawing.Color.Transparent; @@ -4870,6 +4882,7 @@ private System.Windows.Forms.ToolStripMenuItem Menu_BatchEditor; private System.Windows.Forms.Button BTN_Medals; private System.Windows.Forms.FlowLayoutPanel FLP_PKMEditors; + private System.Windows.Forms.Button B_LinkInfo; } } diff --git a/MainWindow/Main.cs b/MainWindow/Main.cs index c3d92c579..47f20897c 100644 --- a/MainWindow/Main.cs +++ b/MainWindow/Main.cs @@ -86,13 +86,15 @@ namespace PKHeX // Box to Tabs D&D dragout.AllowDrop = true; + FLP_SAVtools.Scroll += Util.FlowLayoutPanelScroll; + // Load WC6 folder to legality refreshWC6DB(); #endregion #region Localize & Populate Fields string[] args = Environment.GetCommandLineArgs(); - string filename = args.Length > 0 ? Path.GetFileNameWithoutExtension(args[0]).ToLower() : ""; + string filename = args.Length > 0 ? Path.GetFileNameWithoutExtension(args[0])?.ToLower() : ""; HaX = filename.IndexOf("hax", StringComparison.Ordinal) >= 0; // Try and detect the language @@ -386,7 +388,7 @@ namespace PKHeX CB_Form.SelectedIndex = form; // Set Ability - int[] abilities = PKX.getAbilities(Set.Species, form); + int[] abilities = SAV.Personal.getAbilities(Set.Species, form); int ability = Array.IndexOf(abilities, Set.Ability); if (ability < 0) ability = 0; CB_Ability.SelectedIndex = ability; @@ -689,16 +691,42 @@ namespace PKHeX { Util.Error("Invalid save file loaded. Aborting.", path); return; } if (sav.Generation <= 3) // Japanese Save files are different. Get isJapanese { - var dr = Util.Prompt(MessageBoxButtons.YesNoCancel, $"Generation {sav.Generation} Save File detected.", "Does this file originate from a Japanese game?"); - if (dr == DialogResult.Cancel) + if (sav.Version == GameVersion.Unknown) + { + // Hacky cheats invalidated the Game Code value. + var drGame = Util.Prompt(MessageBoxButtons.YesNoCancel, + "Unknown Gen3 Game Detected. Select Origins:", + "Yes: Ruby / Sapphire" + Environment.NewLine + + "No: Emerald" + Environment.NewLine + + "Cancel: FireRed / LeafGreen"); + + if (drGame == DialogResult.Yes) + sav = new SAV3(sav.Data, GameVersion.RS); + else if (drGame == DialogResult.No) + sav = new SAV3(sav.Data, GameVersion.E); + else + sav = new SAV3(sav.Data, GameVersion.FRLG); + } + var drJP = Util.Prompt(MessageBoxButtons.YesNoCancel, $"Generation {sav.Generation} Save File detected. Select Origins:", "Yes: International" + Environment.NewLine + "No: Japanese"); + if (drJP == DialogResult.Cancel) return; - sav.Japanese = dr == DialogResult.Yes; + sav.Japanese = drJP == DialogResult.No; + + if (sav.Version == GameVersion.FRLG) + { + var drFRLG = Util.Prompt(MessageBoxButtons.YesNoCancel, "FRLG Detected. Select version...", "Yes: FireRed" + Environment.NewLine + "No: LeafGreen"); + if (drFRLG == DialogResult.Cancel) + return; + + sav.Personal = drFRLG == DialogResult.Yes ? PersonalTable.FR : PersonalTable.LG; + } } + PKM pk = preparePKM(); SAV = sav; SAV.FilePath = Path.GetDirectoryName(path); SAV.FileName = Path.GetExtension(path) == ".bak" - ? Path.GetFileName(path).Split(new[] {" ["}, StringSplitOptions.None)[0] + ? Path.GetFileName(path)?.Split(new[] {" ["}, StringSplitOptions.None)[0] : Path.GetFileName(path); L_Save.Text = $"SAV{SAV.Generation}: {Path.GetFileNameWithoutExtension(Util.CleanFileName(SAV.BAKName))}"; // more descriptive @@ -738,6 +766,7 @@ namespace PKHeX B_Pokeblocks.Visible = SAV.HasPokeBlock; B_JPEG.Visible = SAV.HasJPEG; B_OpenEventFlags.Visible = SAV.HasEvents; + B_LinkInfo.Visible = SAV.HasLink; // Generational Interface byte[] extraBytes = new byte[1]; @@ -785,14 +814,13 @@ namespace PKHeX getFieldsfromPKM = populateFieldsPK6; getPKMfromFields = preparePK6; extraBytes = PK6.ExtraBytes; - TB_GameSync.Enabled = (SAV as SAV6).GameSyncID != 0; - TB_GameSync.Text = (SAV as SAV6).GameSyncID.ToString("X16"); - TB_Secure1.Text = (SAV as SAV6).Secure1.ToString("X16"); - TB_Secure2.Text = (SAV as SAV6).Secure2.ToString("X16"); + SAV6 sav6 = (SAV6)SAV; + TB_GameSync.Enabled = sav6.GameSyncID != 0; + TB_GameSync.Text = sav6.GameSyncID.ToString("X16"); + TB_Secure1.Text = sav6.Secure1.ToString("X16"); + TB_Secure2.Text = sav6.Secure2.ToString("X16"); break; } - PKM pk = preparePKM(); - PKX.Personal = SAV.Personal; bool init = fieldsInitialized; fieldsInitialized = false; populateFilteredDataSources(); @@ -1050,10 +1078,11 @@ namespace PKHeX CB_GameOrigin.DataSource = new BindingSource(VersionDataSource.Where(g => g.Value <= SAV.MaxGameID || SAV.Generation >= 3 && g.Value == 15), null); // Set the Move ComboBoxes too.. + var moves = MoveDataSource.Where(m => m.Value <= SAV.MaxMoveID).ToArray(); foreach (ComboBox cb in new[] { CB_Move1, CB_Move2, CB_Move3, CB_Move4, CB_RelearnMove1, CB_RelearnMove2, CB_RelearnMove3, CB_RelearnMove4 }) { cb.DisplayMember = "Text"; cb.ValueMember = "Value"; - cb.DataSource = new BindingSource(MoveDataSource.Where(m => m.Value <= SAV.MaxMoveID), null); + cb.DataSource = new BindingSource(moves, null); } } private Action getFieldsfromPKM; @@ -1062,7 +1091,7 @@ namespace PKHeX { if (pk == null) { Util.Error("Attempted to load a null file."); return; } - if (pk.Format != SAV.Generation) + if (pk.Format > SAV.Generation) { Util.Alert("Can't load future generation files."); return; } bool oldInit = fieldsInitialized; @@ -1079,7 +1108,7 @@ namespace PKHeX { string c; pkm = PKMConverter.convertToFormat(pkm, SAV.Generation, out c); - if (pk.Format != pkm.Format) // converted + if (pk.Format != pkm.Format && focus) // converted Util.Alert("Converted File."); } @@ -1127,14 +1156,14 @@ namespace PKHeX } private void setForms() { - if (SAV.Generation < 4) + int species = Util.getIndex(CB_Species); + if (SAV.Generation < 4 && species != 201) { Label_Form.Visible = CB_Form.Visible = CB_Form.Enabled = false; return; } - int species = Util.getIndex(CB_Species); - bool hasForms = SAV.Personal[species].HasFormes || new[] { 664, 665, 414 }.Contains(species); + bool hasForms = SAV.Personal[species].HasFormes || new[] { 201, 664, 665, 414 }.Contains(species); CB_Form.Enabled = CB_Form.Visible = Label_Form.Visible = hasForms; if (!hasForms) @@ -1152,7 +1181,7 @@ namespace PKHeX if (SAV.Generation > 3) // has forms formnum = CB_Form.SelectedIndex; - int[] abils = SAV.Personal[SAV.Personal[species].FormeIndex(species, formnum)].Abilities; + int[] abils = SAV.Personal.getAbilities(species, formnum); string[] abilIdentifier = {" (1)", " (2)", " (H)"}; List ability_list = abils.Where(a => a != 0).Select((t, i) => abilitylist[t] + abilIdentifier[i]).ToList(); if (!ability_list.Any()) @@ -1163,9 +1192,16 @@ namespace PKHeX CB_Ability.SelectedIndex = abil < 0 || abil >= CB_Ability.Items.Count ? 0 : abil; } // PKX Data Calculation Functions // - private void setIsShiny() + private void setIsShiny(object sender) { - bool isShiny = PKX.getIsShiny(Util.getHEXval(TB_PID.Text), Util.ToUInt32(TB_TID.Text), Util.ToUInt32(TB_SID.Text)); + if (sender == TB_PID) + pkm.PID = Util.getHEXval(TB_PID.Text); + else if (sender == TB_TID) + pkm.TID = (int)Util.ToUInt32(TB_TID.Text); + else if (sender == TB_SID) + pkm.SID = (int)Util.ToUInt32(TB_SID.Text); + + bool isShiny = pkm.IsShiny; // Set the Controls BTN_Shinytize.Visible = BTN_Shinytize.Enabled = !isShiny; @@ -1229,12 +1265,12 @@ namespace PKHeX if (ModifierKeys == Keys.Control) // prompt to reset TB_Friendship.Text = pkm.CurrentFriendship.ToString(); else - TB_Friendship.Text = TB_Friendship.Text == "255" ? PKX.getBaseFriendship(pkm.Species).ToString() : "255"; + TB_Friendship.Text = TB_Friendship.Text == "255" ? SAV.Personal[pkm.Species].BaseFriendship.ToString() : "255"; } private void clickGender(object sender, EventArgs e) { // Get Gender Threshold - int gt = PKX.Personal[Util.getIndex(CB_Species)].Gender; + int gt = SAV.Personal[Util.getIndex(CB_Species)].Gender; if (gt == 255 || gt == 0 || gt == 254) // Single gender/genderless return; @@ -1242,12 +1278,21 @@ namespace PKHeX if (gt >= 255) return; // If not a single gender(less) species: (should be <254 but whatever, 255 never happens) - pkm.Gender = PKX.getGender(Label_Gender.Text) ^ 1; + int newGender = PKX.getGender(Label_Gender.Text) ^ 1; + if (SAV.Generation <= 4) + { + pkm.Species = Util.getIndex(CB_Species); + pkm.Version = Util.getIndex(CB_GameOrigin); + pkm.Nature = CB_Nature.SelectedIndex; + pkm.AltForm = CB_Form.SelectedIndex; + + pkm.setPIDGender(newGender); + TB_PID.Text = pkm.PID.ToString("X8"); + } + pkm.Gender = newGender; Label_Gender.Text = gendersymbols[pkm.Gender]; Label_Gender.ForeColor = pkm.Gender == 2 ? Label_Species.ForeColor : (pkm.Gender == 1 ? Color.Red : Color.Blue); - if (SAV.Generation < 6) - updateRandomPID(null, null); if (PKX.getGender(CB_Form.Text) < 2) // Gendered Forms CB_Form.SelectedIndex = PKX.getGender(Label_Gender.Text); @@ -1291,16 +1336,16 @@ namespace PKHeX private void clickIV(object sender, EventArgs e) { if (ModifierKeys == Keys.Control) - (sender as MaskedTextBox).Text = 31.ToString(); + ((MaskedTextBox) sender).Text = 31.ToString(); else if (ModifierKeys == Keys.Alt) - (sender as MaskedTextBox).Text = 0.ToString(); + ((MaskedTextBox) sender).Text = 0.ToString(); } private void clickEV(object sender, EventArgs e) { if (ModifierKeys == Keys.Control) // EV - (sender as MaskedTextBox).Text = Math.Min(Math.Max(510 - Util.ToInt32(TB_EVTotal.Text) + Util.ToInt32((sender as MaskedTextBox).Text), 0), 252).ToString(); + ((MaskedTextBox) sender).Text = Math.Min(Math.Max(510 - Util.ToInt32(TB_EVTotal.Text) + Util.ToInt32((sender as MaskedTextBox).Text), 0), 252).ToString(); else if (ModifierKeys == Keys.Alt) - (sender as MaskedTextBox).Text = 0.ToString(); + ((MaskedTextBox) sender).Text = 0.ToString(); } private void clickOT(object sender, EventArgs e) { @@ -1405,6 +1450,7 @@ namespace PKHeX TB_EXP.Text = PKX.getEXP(Level, Util.getIndex(CB_Species)).ToString(); } changingFields = false; + pkm.EXP = Util.ToUInt32(TB_EXP.Text); updateStats(); updateLegality(); } @@ -1434,8 +1480,8 @@ namespace PKHeX private void updateIVs(object sender, EventArgs e) { if (changingFields || !fieldsInitialized) return; - if (sender != null && Util.ToInt32((sender as MaskedTextBox).Text) > 31) - (sender as MaskedTextBox).Text = "31"; + if (sender != null && Util.ToInt32(((MaskedTextBox) sender).Text) > 31) + ((MaskedTextBox) sender).Text = "31"; changingFields = true; @@ -1466,19 +1512,22 @@ namespace PKHeX } private void updateEVs(object sender, EventArgs e) { - if (sender != null) - if (Util.ToInt32((sender as MaskedTextBox).Text) > SAV.MaxEV) - (sender as MaskedTextBox).Text = SAV.MaxEV.ToString(); + if (sender is MaskedTextBox) + { + MaskedTextBox m = (MaskedTextBox)sender; + if (Util.ToInt32(m.Text) > SAV.MaxEV) + { m.Text = SAV.MaxEV.ToString(); return; } // recursive on text set + } changingFields = true; - int EV_HP = Util.ToInt32(TB_HPEV.Text); - int EV_ATK = Util.ToInt32(TB_ATKEV.Text); - int EV_DEF = Util.ToInt32(TB_DEFEV.Text); - int EV_SPA = Util.ToInt32(TB_SPAEV.Text); - int EV_SPD = Util.ToInt32(TB_SPDEV.Text); - int EV_SPE = Util.ToInt32(TB_SPEEV.Text); + if (sender == TB_HPEV) pkm.EV_HP = Util.ToInt32(TB_HPEV.Text); + else if (sender == TB_ATKEV) pkm.EV_ATK = Util.ToInt32(TB_ATKEV.Text); + else if (sender == TB_DEFEV) pkm.EV_DEF = Util.ToInt32(TB_DEFEV.Text); + else if (sender == TB_SPEEV) pkm.EV_SPE = Util.ToInt32(TB_SPEEV.Text); + else if (sender == TB_SPAEV) pkm.EV_SPA = Util.ToInt32(TB_SPAEV.Text); + else if (sender == TB_SPDEV) pkm.EV_SPD = Util.ToInt32(TB_SPDEV.Text); - int evtotal = EV_HP + EV_ATK + EV_DEF + EV_SPA + EV_SPD + EV_SPE; + int evtotal = pkm.EVs.Sum(); if (evtotal > 510) // Background turns Red TB_EVTotal.BackColor = Color.Red; @@ -1603,17 +1652,24 @@ namespace PKHeX } private void update255_MTB(object sender, EventArgs e) { - if (Util.ToInt32((sender as MaskedTextBox).Text) > byte.MaxValue) - (sender as MaskedTextBox).Text = "255"; + if (Util.ToInt32(((MaskedTextBox) sender).Text) > byte.MaxValue) + ((MaskedTextBox) sender).Text = "255"; } private void updateForm(object sender, EventArgs e) { + if (CB_Form == sender && fieldsLoaded) + pkm.AltForm = CB_Form.SelectedIndex; updateStats(); // Repopulate Abilities if Species Form has different abilities setAbilityList(); // Gender Forms - if (PKX.getGender(CB_Form.Text) < 2 && Util.getIndex(CB_Species) != 201) // don't do this for Unown + if (Util.getIndex(CB_Species) == 201) + { + if (fieldsLoaded && SAV.Generation == 3) + updateRandomPID(sender, e); // Fix AltForm + } + else if (PKX.getGender(CB_Form.Text) < 2) Label_Gender.Text = CB_Form.Text; if (changingFields) @@ -1627,16 +1683,16 @@ namespace PKHeX if (changingFields) return; changingFields = true; - int form = Util.ToInt32(MT_Form.Text); + int form = pkm.AltForm = Util.ToInt32(MT_Form.Text); CB_Form.SelectedIndex = CB_Form.Items.Count > form ? form : -1; changingFields = false; } private void updatePP(object sender, EventArgs e) { - TB_PP1.Text = PKX.getMovePP(Util.getIndex(CB_Move1), CB_PPu1.SelectedIndex).ToString(); - TB_PP2.Text = PKX.getMovePP(Util.getIndex(CB_Move2), CB_PPu2.SelectedIndex).ToString(); - TB_PP3.Text = PKX.getMovePP(Util.getIndex(CB_Move3), CB_PPu3.SelectedIndex).ToString(); - TB_PP4.Text = PKX.getMovePP(Util.getIndex(CB_Move4), CB_PPu4.SelectedIndex).ToString(); + TB_PP1.Text = pkm.getMovePP(Util.getIndex(CB_Move1), CB_PPu1.SelectedIndex).ToString(); + TB_PP2.Text = pkm.getMovePP(Util.getIndex(CB_Move2), CB_PPu2.SelectedIndex).ToString(); + TB_PP3.Text = pkm.getMovePP(Util.getIndex(CB_Move3), CB_PPu3.SelectedIndex).ToString(); + TB_PP4.Text = pkm.getMovePP(Util.getIndex(CB_Move4), CB_PPu4.SelectedIndex).ToString(); } private void updatePKRSstrain(object sender, EventArgs e) { @@ -1736,7 +1792,7 @@ namespace PKHeX // Check for Gender Changes // Get Gender Threshold - int gt = PKX.Personal[Species].Gender; + int gt = SAV.Personal[Species].Gender; int cg = Array.IndexOf(gendersymbols, Label_Gender.Text); int Gender; @@ -1769,14 +1825,33 @@ namespace PKHeX if (SAV.Generation == 3 && origintrack != "Gen3") { var met_list = Util.getCBList(metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray()); - met_list = Util.getOffsetCBList(met_list, metRSEFRLG_00000, 00000, new[] {254, 255}); + met_list = Util.getOffsetCBList(met_list, metRSEFRLG_00000, 00000, new[] {253, 254, 255}); origintrack = "Gen3"; CB_MetLocation.DisplayMember = "Text"; CB_MetLocation.ValueMember = "Value"; CB_MetLocation.DataSource = met_list; CB_MetLocation.SelectedValue = 0; } - else if (Version < 24 && origintrack != "Past" && SAV.Generation >= 4) + else if (SAV.Generation == 4 && origintrack != "Gen4") + { + var met_list = Util.getCBList(metHGSS_00000, new[] { 0 }); + met_list = Util.getOffsetCBList(met_list, metHGSS_02000, 2000, new[] { 2000 }); + met_list = Util.getOffsetCBList(met_list, metHGSS_02000, 2000, new[] { 2002 }); + met_list = Util.getOffsetCBList(met_list, metHGSS_03000, 3000, new[] { 3001 }); + met_list = Util.getOffsetCBList(met_list, metHGSS_00000, 0000, Legal.Met_HGSS_0); + met_list = Util.getOffsetCBList(met_list, metHGSS_02000, 2000, Legal.Met_HGSS_2); + met_list = Util.getOffsetCBList(met_list, metHGSS_03000, 3000, Legal.Met_HGSS_3); + CB_MetLocation.DisplayMember = "Text"; + CB_MetLocation.ValueMember = "Value"; + CB_MetLocation.DataSource = met_list; + CB_EggLocation.DisplayMember = "Text"; + CB_EggLocation.ValueMember = "Value"; + CB_EggLocation.DataSource = new BindingSource(met_list, null); + CB_EggLocation.SelectedValue = 0; + CB_MetLocation.SelectedValue = 0; + origintrack = "Gen4"; + } + else if (Version < 24 && origintrack != "Past" && SAV.Generation >= 5) { // Load Past Gen Locations #region B2W2 Met Locations @@ -1826,23 +1901,8 @@ namespace PKHeX } #endregion } - else if (SAV.Generation == 4 && origintrack != "Gen4") - { - var met_list = Util.getCBList(metHGSS_00000, new[] { 0 }); - met_list = Util.getOffsetCBList(met_list, metHGSS_02000, 2000, new[] { 2000 }); - met_list = Util.getOffsetCBList(met_list, metHGSS_02000, 2000, new[] { 2002 }); - met_list = Util.getOffsetCBList(met_list, metHGSS_03000, 3000, new[] { 3001 }); - met_list = Util.getOffsetCBList(met_list, metHGSS_00000, 0000, Legal.Met_HGSS_0); - met_list = Util.getOffsetCBList(met_list, metHGSS_02000, 2000, Legal.Met_HGSS_2); - met_list = Util.getOffsetCBList(met_list, metHGSS_03000, 3000, Legal.Met_HGSS_3); - CB_MetLocation.DisplayMember = "Text"; - CB_MetLocation.ValueMember = "Value"; - CB_MetLocation.DataSource = met_list; - CB_MetLocation.SelectedValue = 0; - origintrack = "Gen4"; - } - if (SAV.Generation > 3 && Version < 0x10 && origintrack != "Gen4") + if (SAV.Generation >= 4 && Version < 0x10 && origintrack != "Gen4") { // Load Gen 4 egg locations if Gen 4 Origin. #region HGSS Met Locations @@ -1882,8 +1942,8 @@ namespace PKHeX if (CB_ExtraBytes.Items.Count == 0) return; // Changed Extra Byte's Value - if (Util.ToInt32((sender as MaskedTextBox).Text) > byte.MaxValue) - (sender as MaskedTextBox).Text = "255"; + if (Util.ToInt32(((MaskedTextBox) sender).Text) > byte.MaxValue) + ((MaskedTextBox) sender).Text = "255"; int value = Util.ToInt32(TB_ExtraByte.Text); int offset = Convert.ToInt32(CB_ExtraBytes.Text, 16); @@ -1913,6 +1973,9 @@ namespace PKHeX incr != decr ? $"+{labarray[incr].Text} / -{labarray[decr].Text}".Replace(":", "") : "-/-"); + + if (fieldsLoaded && SAV.Generation <= 4) + updateRandomPID(sender, e); } private void updateNickname(object sender, EventArgs e) { @@ -1981,7 +2044,7 @@ namespace PKHeX if (!CHK_Nicknamed.Checked) updateNickname(null, null); - TB_Friendship.Text = PKX.getBaseFriendship(Util.getIndex(CB_Species)).ToString(); + TB_Friendship.Text = SAV.Personal[Util.getIndex(CB_Species)].BaseFriendship.ToString(); if (CB_EggLocation.SelectedIndex == 0) { @@ -2012,51 +2075,33 @@ namespace PKHeX } private void updateShinyPID(object sender, EventArgs e) { - uint TID = Util.ToUInt32(TB_TID.Text); - uint SID = Util.ToUInt32(TB_SID.Text); - uint PID = Util.getHEXval(TB_PID.Text); - if (SAV.Generation == 4) - { - int nature = Util.getIndex(CB_Nature); - int species = Util.getIndex(CB_Species); - int gender = PKX.getGender(Label_Gender.Text); - - uint oldbits = PID & 0x00010001; - while ((TID ^ SID ^ (PID >> 16) ^ PID & 0xFFFF) > 8 || (PID & 0x00010001) != oldbits || PID%25 != nature || gender != PKX.getGender(species, PID)) - PID = Util.rnd32(); - TB_PID.Text = PID.ToString("X8"); + pkm.TID = Util.ToInt32(TB_TID.Text); + pkm.SID = Util.ToInt32(TB_SID.Text); + pkm.PID = Util.getHEXval(TB_PID.Text); + pkm.Nature = Util.getIndex(CB_Nature); + pkm.Gender = PKX.getGender(Label_Gender.Text); + pkm.AltForm = CB_Form.SelectedIndex; - getQuickFiller(dragout); - return; - } + pkm.setShinyPID(); + TB_PID.Text = pkm.PID.ToString("X8"); - uint UID = PID >> 16; - uint LID = PID & 0xFFFF; - uint PSV = UID ^ LID; - uint TSV = TID ^ SID; - uint XOR = TSV ^ PSV; - - // Preserve Gen5 Origin Ability bit just in case - XOR &= 0xFFFE; XOR |= UID & 1; - - // New XOR should be 0 or 1. - TB_PID.Text = (((UID ^ XOR) << 16) + LID).ToString("X8"); - if (Util.getIndex(CB_GameOrigin) < 24) // Pre Gen6 + if (pkm.Format >= 6) TB_EC.Text = TB_PID.Text; getQuickFiller(dragout); + updateLegality(); } private void updateTSV(object sender, EventArgs e) { if (SAV.Generation < 6) return; - ushort TID = (ushort)Util.ToUInt32(TB_TID.Text); - ushort SID = (ushort)Util.ToUInt32(TB_SID.Text); - uint TSV = PKX.getTSV(TID, SID); + + var TSV = pkm.TSV; Tip1.SetToolTip(TB_TID, "TSV: " + TSV.ToString("0000")); Tip2.SetToolTip(TB_SID, "TSV: " + TSV.ToString("0000")); - uint PSV = PKX.getPSV(Util.getHEXval(TB_PID.Text)); + pkm.PID = Util.getHEXval(TB_PID.Text); + var PSV = pkm.PSV; Tip3.SetToolTip(TB_PID, "PSV: " + PSV.ToString("0000")); } private void update_ID(object sender, EventArgs e) @@ -2069,7 +2114,7 @@ namespace PKHeX if (Util.ToUInt32(TB_TID.Text) > ushort.MaxValue) TB_TID.Text = "65535"; if (Util.ToUInt32(TB_SID.Text) > ushort.MaxValue) TB_SID.Text = "65535"; - setIsShiny(); + setIsShiny(sender); getQuickFiller(dragout); updateIVs(null, null); // If the EC is changed, EC%6 (Characteristic) might be changed. TB_PID.Select(60, 0); // position cursor at end of field @@ -2126,7 +2171,7 @@ namespace PKHeX { if (pkm.Format < 6) return; - (pkm as PK6).RelearnMoves = new[] { Util.getIndex(CB_RelearnMove1), Util.getIndex(CB_RelearnMove2), Util.getIndex(CB_RelearnMove3), Util.getIndex(CB_RelearnMove4) }; + ((PK6) pkm).RelearnMoves = new[] { Util.getIndex(CB_RelearnMove1), Util.getIndex(CB_RelearnMove2), Util.getIndex(CB_RelearnMove3), Util.getIndex(CB_RelearnMove4) }; Legality.updateRelearnLegality(); for (int i = 0; i < 4; i++) movePB[i].Visible = !Legality.vRelearn[i].Valid; @@ -2183,31 +2228,8 @@ namespace PKHeX } private void updateStats() { - // Gather the needed information. - int species = Util.getIndex(CB_Species); - int level = Util.ToInt32(MT_Level.Enabled ? MT_Level.Text : TB_Level.Text); - if (level == 0) level = 1; - int form = CB_Form.SelectedIndex; - int HP_IV = Util.ToInt32(TB_HPIV.Text); - int ATK_IV = Util.ToInt32(TB_ATKIV.Text); - int DEF_IV = Util.ToInt32(TB_DEFIV.Text); - int SPA_IV = Util.ToInt32(TB_SPAIV.Text); - int SPD_IV = Util.ToInt32(TB_SPDIV.Text); - int SPE_IV = Util.ToInt32(TB_SPEIV.Text); - - int HP_EV = Util.ToInt32(TB_HPEV.Text); - int ATK_EV = Util.ToInt32(TB_ATKEV.Text); - int DEF_EV = Util.ToInt32(TB_DEFEV.Text); - int SPA_EV = Util.ToInt32(TB_SPAEV.Text); - int SPD_EV = Util.ToInt32(TB_SPDEV.Text); - int SPE_EV = Util.ToInt32(TB_SPEEV.Text); - - int nature = Util.getIndex(CB_Nature); - // Generate the stats. - ushort[] stats = PKX.getStats(species, level, nature, form, - HP_EV, ATK_EV, DEF_EV, SPA_EV, SPD_EV, SPE_EV, - HP_IV, ATK_IV, DEF_IV, SPA_IV, SPD_IV, SPE_IV); + ushort[] stats = pkm.getStats(SAV.Personal.getFormeEntry(pkm.Species, pkm.AltForm)); Stat_HP.Text = stats[0].ToString(); Stat_ATK.Text = stats[1].ToString(); @@ -2218,8 +2240,8 @@ namespace PKHeX // Recolor the Stat Labels based on boosted stats. { - int incr = nature / 5; - int decr = nature % 5; + int incr = pkm.Nature / 5; + int decr = pkm.Nature % 5; Label[] labarray = { Label_ATK, Label_DEF, Label_SPE, Label_SPA, Label_SPD }; // Reset Label Colors @@ -2465,7 +2487,7 @@ namespace PKHeX if (SAV.HasBox) SAV.CurrentBox = CB_BoxSelect.SelectedIndex; - bool dsv = Path.GetExtension(main.FileName).ToLower() == ".dsv"; + bool dsv = Path.GetExtension(main.FileName)?.ToLower() == ".dsv"; File.WriteAllBytes(main.FileName, SAV.Write(dsv)); Util.Alert("SAV exported to:", main.FileName); } @@ -2698,12 +2720,16 @@ namespace PKHeX // Currently saved Value ulong oldval = 0; - if (tb == TB_GameSync) - oldval = (SAV as SAV6).GameSyncID; - else if (tb == TB_Secure1) - oldval = (SAV as SAV6).Secure1; - else if (tb == TB_Secure2) - oldval = (SAV as SAV6).Secure2; + if (SAV.Generation == 6) + { + SAV6 sav6 = (SAV6) SAV; + if (tb == TB_GameSync) + oldval = sav6.GameSyncID; + else if (tb == TB_Secure1) + oldval = sav6.Secure1; + else if (tb == TB_Secure2) + oldval = sav6.Secure2; + } string filterText = Util.getOnlyHex(tb.Text); @@ -2717,14 +2743,17 @@ namespace PKHeX // Write final value back to the save ulong newval = Convert.ToUInt64(filterText, 16); - if (newval != oldval) + if (newval == oldval) return; + + if (SAV.Generation == 6) { + SAV6 sav6 = (SAV6) SAV; if (tb == TB_GameSync) - (SAV as SAV6).GameSyncID = newval; + sav6.GameSyncID = newval; else if (tb == TB_Secure1) - (SAV as SAV6).Secure1 = newval; + sav6.Secure1 = newval; else if (tb == TB_Secure2) - (SAV as SAV6).Secure2 = newval; + sav6.Secure2 = newval; SAV.Edited = true; } } @@ -2783,21 +2812,8 @@ namespace PKHeX if (SAV.HasBox) { int boxoffset = SAV.getBoxOffset(CB_BoxSelect.SelectedIndex); - if (SAV.HasBoxWallpapers) - { - int boxbgval = SAV.getBoxWallpaper(CB_BoxSelect.SelectedIndex); - string imagename = ""; - switch (SAV.Generation) - { - case 6: - imagename = "box_wp" + boxbgval.ToString("00"); - if (SAV.ORAS && boxbgval > 16) - imagename += "o"; - break; - } - if (!string.IsNullOrEmpty(imagename)) - PAN_Box.BackgroundImage = (Image)Properties.Resources.ResourceManager.GetObject(imagename); - } + int boxbgval = SAV.getBoxWallpaper(CB_BoxSelect.SelectedIndex); + PAN_Box.BackgroundImage = BoxWallpaper.getWallpaper(SAV, boxbgval); for (int i = 0; i < 30; i++) getSlotFiller(boxoffset + SAV.SIZE_STORED * i, SlotPictureBoxes[i]); @@ -3115,7 +3131,7 @@ namespace PKHeX 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, - }.CopyTo(SAV.Data, (SAV as SAV6).OPower); + }.CopyTo(SAV.Data, ((SAV6) SAV).OPower); } else if (SAV.XY) new SAV_OPower().ShowDialog(); @@ -3135,7 +3151,7 @@ namespace PKHeX return; string result = "PSS List" + Environment.NewLine; string[] headers = { "PSS Data - Friends", "PSS Data - Acquaintances", "PSS Data - Passerby", }; - int offset = (SAV as SAV6).PSS; + int offset = ((SAV6) SAV).PSS; for (int g = 0; g < 3; g++) { result += Environment.NewLine @@ -3192,6 +3208,10 @@ namespace PKHeX { new SAV_SecretBase().ShowDialog(); } + private void B_LinkInfo_Click(object sender, EventArgs e) + { + new SAV_Link6().ShowDialog(); + } private void B_JPEG_Click(object sender, EventArgs e) { byte[] jpeg = SAV.JPEGData; @@ -3274,7 +3294,8 @@ namespace PKHeX new Thread(() => { Thread.Sleep(500); - File.Delete(newfile); + if (File.Exists(newfile)) + File.Delete(newfile); }).Start(); } private void pbBoxSlot_DragDrop(object sender, DragEventArgs e) diff --git a/MainWindow/Main.resx b/MainWindow/Main.resx index adb9b3c4d..4332f0e62 100644 --- a/MainWindow/Main.resx +++ b/MainWindow/Main.resx @@ -237,408 +237,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - @@ -692,18 +290,6 @@ True - - True - - - True - - - True - - - True - True @@ -967,30 +553,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1 @@ -1113,46 +675,7 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - + True @@ -1164,6 +687,9 @@ True + + True + iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1342,6 +868,9 @@ True + + True + 17, 17 @@ -1357,108 +886,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1564,42 +991,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1713,24 +1104,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1801,54 +1174,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1888,18 +1213,12 @@ True - - True - True True - - True - True @@ -1909,36 +1228,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1972,9 +1261,6 @@ True - - True - True @@ -2017,46 +1303,7 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - + True diff --git a/MainWindow/MainPK3.cs b/MainWindow/MainPK3.cs index af808a5d0..c95b41c68 100644 --- a/MainWindow/MainPK3.cs +++ b/MainWindow/MainPK3.cs @@ -29,9 +29,7 @@ namespace PKHeX TB_PID.Text = pk3.PID.ToString("X8"); CB_HeldItem.SelectedValue = pk3.G3Item; setAbilityList(); - int[] abils = PKX.getAbilities(pk3.Species, 0); - int abil = Array.IndexOf(abils, pk3.Ability); - CB_Ability.SelectedIndex = abil < 0 || abil >= CB_Ability.Items.Count ? 0 : abil; + CB_Ability.SelectedIndex = pk3.AbilityNumber > CB_Ability.Items.Count ? 0 : pk3.AbilityNumber; CB_Nature.SelectedValue = pk3.Nature; TB_TID.Text = pk3.TID.ToString("00000"); TB_SID.Text = pk3.SID.ToString("00000"); @@ -92,11 +90,13 @@ namespace PKHeX TB_PP3.Text = pk3.Move3_PP.ToString(); TB_PP4.Text = pk3.Move4_PP.ToString(); + // Set Form if count is enough, else cap. + CB_Form.SelectedIndex = CB_Form.Items.Count > pk3.AltForm ? pk3.AltForm : CB_Form.Items.Count - 1; + // Load Extrabyte Value TB_ExtraByte.Text = pk3.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString(); updateStats(); - setIsShiny(); TB_EXP.Text = pk3.EXP.ToString(); Label_Gender.Text = gendersymbols[pk3.Gender]; @@ -114,7 +114,7 @@ namespace PKHeX pk3.SID = Util.ToInt32(TB_SID.Text); pk3.EXP = Util.ToUInt32(TB_EXP.Text); pk3.PID = Util.getHEXval(TB_PID.Text); - pk3.Ability = CB_Ability.SelectedIndex; // 0/1 (stored in IVbits) + pk3.AbilityNumber = CB_Ability.SelectedIndex; // 0/1 (stored in IVbits) pk3.FatefulEncounter = CHK_Fateful.Checked; pk3.Gender = PKX.getGender(Label_Gender.Text); diff --git a/MainWindow/MainPK4.cs b/MainWindow/MainPK4.cs index 312cd63d8..697193b01 100644 --- a/MainWindow/MainPK4.cs +++ b/MainWindow/MainPK4.cs @@ -113,7 +113,6 @@ namespace PKHeX TB_ExtraByte.Text = pk4.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString(); updateStats(); - setIsShiny(); TB_EXP.Text = pk4.EXP.ToString(); Label_Gender.Text = gendersymbols[pk4.Gender]; @@ -123,7 +122,7 @@ namespace PKHeX DEV_Ability.SelectedValue = pk4.Ability; else { - int[] abils = PKX.getAbilities(pk4.Species, pk4.AltForm); + int[] abils = SAV.Personal.getAbilities(pk4.Species, pk4.AltForm); int abil = Array.IndexOf(abils, pk4.Ability); CB_Ability.SelectedIndex = abil < 0 || abil >= CB_Ability.Items.Count ? 0 : abil; } diff --git a/MainWindow/MainPK5.cs b/MainWindow/MainPK5.cs index a1a8806d5..15f674aab 100644 --- a/MainWindow/MainPK5.cs +++ b/MainWindow/MainPK5.cs @@ -122,7 +122,6 @@ namespace PKHeX TB_ExtraByte.Text = pk5.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString(); updateStats(); - setIsShiny(); TB_EXP.Text = pk5.EXP.ToString(); Label_Gender.Text = gendersymbols[pk5.Gender]; @@ -134,7 +133,7 @@ namespace PKHeX CB_Ability.SelectedIndex = CB_Ability.Items.Count - 1; else { - int[] abils = PKX.getAbilities(pk5.Species, pk5.AltForm); + int[] abils = SAV.Personal.getAbilities(pk5.Species, pk5.AltForm); int abil = Array.IndexOf(abils, pk5.Ability); CB_Ability.SelectedIndex = abil < 0 || abil >= CB_Ability.Items.Count ? 0 : abil; } diff --git a/MainWindow/MainPK6.cs b/MainWindow/MainPK6.cs index c42e920ee..ced541a41 100644 --- a/MainWindow/MainPK6.cs +++ b/MainWindow/MainPK6.cs @@ -137,7 +137,6 @@ namespace PKHeX TB_ExtraByte.Text = pk6.Data[Convert.ToInt32(CB_ExtraBytes.Text, 16)].ToString(); updateStats(); - setIsShiny(); TB_EXP.Text = pk6.EXP.ToString(); Label_Gender.Text = gendersymbols[pk6.Gender]; diff --git a/MysteryGifts/MysteryGift.cs b/MysteryGifts/MysteryGift.cs index ae40ce583..cff746126 100644 --- a/MysteryGifts/MysteryGift.cs +++ b/MysteryGifts/MysteryGift.cs @@ -19,6 +19,23 @@ namespace PKHeX return new PCD(data); return null; } + internal static MysteryGift getMysteryGift(byte[] data) + { + switch (data.Length) + { + case WC6.SizeFull: + case WC6.Size: + return new WC6(data); + case PGF.Size: + return new PGF(data); + case PGT.Size: + return new PGT(data); + case PCD.Size: + return new PCD(data); + default: + return null; + } + } public abstract string Extension { get; } public virtual byte[] Data { get; set; } diff --git a/MysteryGifts/PGF.cs b/MysteryGifts/PGF.cs index a036a6bb9..b4cf94520 100644 --- a/MysteryGifts/PGF.cs +++ b/MysteryGifts/PGF.cs @@ -141,7 +141,7 @@ namespace PKHeX HeldItem = HeldItem, Met_Level = currentLevel, Nature = Nature != 0xFF ? Nature : (int)(Util.rnd32() % 25), - Gender = PKX.Personal[Species].Gender == 255 ? 2 : (Gender != 2 ? Gender : PKX.Personal[Species].RandomGender), + Gender = PersonalTable.B2W2[Species].Gender == 255 ? 2 : (Gender != 2 ? Gender : PersonalTable.B2W2[Species].RandomGender), AltForm = Form, Version = OriginGame == 0 ? new[] {20, 21, 22, 23}[Util.rnd32() & 0x3] : OriginGame, Language = Language == 0 ? SAV.Language : Language, @@ -150,10 +150,6 @@ namespace PKHeX Move2 = Move2, Move3 = Move3, Move4 = Move4, - Move1_PP = PKX.getBasePP(Move1), - Move2_PP = PKX.getBasePP(Move2), - Move3_PP = PKX.getBasePP(Move3), - Move4_PP = PKX.getBasePP(Move4), Met_Location = MetLocation, Met_Day = Day, Met_Month = Month, @@ -186,9 +182,13 @@ namespace PKHeX RibbonChampionNational = RibbonChampionNational, RibbonChampionWorld = RibbonChampionWorld, - OT_Friendship = PKX.getBaseFriendship(Species), + OT_Friendship = PersonalTable.B2W2[Species].BaseFriendship, FatefulEncounter = true, }; + pk.Move1_PP = pk.getMovePP(Move1, 0); + pk.Move2_PP = pk.getMovePP(Move2, 0); + pk.Move3_PP = pk.getMovePP(Move3, 0); + pk.Move4_PP = pk.getMovePP(Move4, 0); if (OTGender == 3) // User's { pk.TID = SAV.TID; @@ -228,7 +228,7 @@ namespace PKHeX break; } pk.HiddenAbility = av == 2; - pk.Ability = PKX.Personal[PKX.Personal[Species].FormeIndex(Species, pk.AltForm)].Abilities[av]; + pk.Ability = PersonalTable.B2W2.getAbilities(Species, pk.AltForm)[av]; if (PID != 0) pk.PID = PID; diff --git a/MysteryGifts/PGT.cs b/MysteryGifts/PGT.cs index 5f76946c5..9eeebbfea 100644 --- a/MysteryGifts/PGT.cs +++ b/MysteryGifts/PGT.cs @@ -204,6 +204,8 @@ namespace PKHeX pk4.AltForm = PKX.getUnownForm(pk4.PID); if (IsEgg || IsManaphyEgg) pk4.IsEgg = true; + + pk4.RefreshChecksum(); return pk4; } } diff --git a/MysteryGifts/PL6.cs b/MysteryGifts/PL6.cs new file mode 100644 index 000000000..b2c984795 --- /dev/null +++ b/MysteryGifts/PL6.cs @@ -0,0 +1,333 @@ +using System; +using System.Linq; +using System.Text; + +namespace PKHeX +{ + public class PL6 //: PokemonLink + { + internal const int Size = 0xA47; + internal const string Filter = "Pokémon Link Data|*.bin|All Files (*.*)|*.*"; + internal const string Extension = ".bin"; + + public byte[] Data; + public PL6(byte[] data = null) + { + Data = (byte[])(data?.Clone() ?? new byte[Size]); + } + // Pokémon Link Flag + public byte PL_Flag { + get { return Data[0x00]; } + set { Data[0x00] = value; } } + public bool PL_enabled { get { return PL_Flag != 0; } set { PL_Flag = (byte)(value ? 1 << 7 : 0); } } + + //Name of data source + public string Origin_app { + get { return Util.TrimFromZero(Encoding.Unicode.GetString(Data, 0x01, 0x6E)); } + set { Encoding.Unicode.GetBytes(value.PadRight(54 + 1, '\0')).CopyTo(Data, 0x01); } } + + //Pokemon transfer flags? + public uint PKM1_flags { + get { return BitConverter.ToUInt32(Data, 0x99); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x99); } } + public uint PKM2_flags { + get { return BitConverter.ToUInt32(Data, 0x141); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x141); } } + public uint PKM3_flags { + get { return BitConverter.ToUInt32(Data, 0x1E9); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x1E9); } } + public uint PKM4_flags { + get { return BitConverter.ToUInt32(Data, 0x291); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x291); } } + public uint PKM5_flags { + get { return BitConverter.ToUInt32(Data, 0x339); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x339); } } + public uint PKM6_flags { + get { return BitConverter.ToUInt32(Data, 0x3E1); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x3E1); } } + + public uint[] Flags + { + get { return new[] {PKM1_flags, PKM2_flags, PKM3_flags, PKM4_flags, PKM5_flags, PKM6_flags}; } + set + { + if (value.Length > 0) PKM1_flags = value[0]; + if (value.Length > 1) PKM2_flags = value[1]; + if (value.Length > 2) PKM3_flags = value[2]; + if (value.Length > 3) PKM4_flags = value[3]; + if (value.Length > 4) PKM5_flags = value[4]; + if (value.Length > 5) PKM6_flags = value[5]; + } + } + + //Pokémon + + public PL6_PKM poke1 { + get { return new PL6_PKM(Data.Skip(0x9D).Take(PL6_PKM.Size).ToArray()); } + set { value.Data.CopyTo(Data, 0x9D); } } + public PL6_PKM poke2 { + get { return new PL6_PKM(Data.Skip(0x145).Take(PL6_PKM.Size).ToArray()); } + set { value.Data.CopyTo(Data, 0x145); } } + public PL6_PKM poke3 { + get { return new PL6_PKM(Data.Skip(0x1ED).Take(PL6_PKM.Size).ToArray()); } + set { value.Data.CopyTo(Data, 0x1ED); } } + public PL6_PKM poke4 { + get { return new PL6_PKM(Data.Skip(0x295).Take(PL6_PKM.Size).ToArray()); } + set { value.Data.CopyTo(Data, 0x295); } } + public PL6_PKM poke5 { + get { return new PL6_PKM(Data.Skip(0x33D).Take(PL6_PKM.Size).ToArray()); } + set { value.Data.CopyTo(Data, 0x33D); } } + public PL6_PKM poke6 { + get { return new PL6_PKM(Data.Skip(0x3E5).Take(PL6_PKM.Size).ToArray()); } + set { value.Data.CopyTo(Data, 0x3E5); } } + + public PL6_PKM[] Pokes + { + get { return new[] {poke1, poke2, poke3, poke4, poke5, poke6}; } + set + { + if (value.Length > 0) poke1 = value[0]; + if (value.Length > 1) poke2 = value[1]; + if (value.Length > 2) poke3 = value[2]; + if (value.Length > 3) poke4 = value[3]; + if (value.Length > 4) poke5 = value[4]; + if (value.Length > 5) poke6 = value[5]; + } + } + + // Item Properties + public int Item_1 { + get { return BitConverter.ToUInt16(Data, 0x489); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x489); } } + public int Quantity_1 { + get { return BitConverter.ToUInt16(Data, 0x48B); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x48B); } } + public int Item_2 { + get { return BitConverter.ToUInt16(Data, 0x48D); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x48D); } } + public int Quantity_2 { + get { return BitConverter.ToUInt16(Data, 0x48F); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x48F); } } + public int Item_3 { + get { return BitConverter.ToUInt16(Data, 0x491); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x491); } } + public int Quantity_3 { + get { return BitConverter.ToUInt16(Data, 0x493); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x493); } } + public int Item_4 { + get { return BitConverter.ToUInt16(Data, 0x495); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x495); } } + public int Quantity_4 { + get { return BitConverter.ToUInt16(Data, 0x497); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x497); } } + public int Item_5 { + get { return BitConverter.ToUInt16(Data, 0x499); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x499); } } + public int Quantity_5 { + get { return BitConverter.ToUInt16(Data, 0x49B); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x49B); } } + public int Item_6 { + get { return BitConverter.ToUInt16(Data, 0x49D); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x49D); } } + public int Quantity_6 { + get { return BitConverter.ToUInt16(Data, 0x49F); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x49F); } } + + public int[] Items + { + get { return new[] {Item_1, Item_2, Item_3, Item_4, Item_5, Item_6}; } + set + { + if (value.Length > 0) Item_1 = value[0]; + if (value.Length > 1) Item_2 = value[1]; + if (value.Length > 2) Item_3 = value[2]; + if (value.Length > 3) Item_4 = value[3]; + if (value.Length > 4) Item_5 = value[4]; + if (value.Length > 5) Item_6 = value[5]; + } + } + + public int[] Quantities + { + get { return new[] {Quantity_1, Quantity_2, Quantity_3, Quantity_4, Quantity_5, Quantity_6}; } + set + { + if (value.Length > 0) Quantity_1 = value[0]; + if (value.Length > 1) Quantity_2 = value[1]; + if (value.Length > 2) Quantity_3 = value[2]; + if (value.Length > 3) Quantity_4 = value[3]; + if (value.Length > 4) Quantity_5 = value[4]; + if (value.Length > 5) Quantity_6 = value[5]; + } + } + + + //Battle Points + public int BattlePoints { + get { return BitConverter.ToUInt16(Data, 0x4A1); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4A1); } } + //PokéMiles + public int Pokemiles { + get { return BitConverter.ToUInt16(Data, 0x4A3); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4A3); } } + } + + public class PL6_PKM //: PokemonLink + { + + internal const int Size = 0xA0; + + public readonly byte[] Data; + public PL6_PKM(byte[] data = null) + { + Data = (byte[])(data?.Clone() ?? new byte[Size]); + } + + public int TID { + get { return BitConverter.ToUInt16(Data, 0x00); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x00); } } + public int SID { + get { return BitConverter.ToUInt16(Data, 0x02); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x02); } } + public int OriginGame { + get { return Data[0x04]; } + set { Data[0x04] = (byte)value; } } + public uint EncryptionConstant { + get { return BitConverter.ToUInt32(Data, 0x08); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x08); } } + public int Pokéball { + get { return Data[0xE]; } + set { Data[0xE] = (byte)value; } } + public int HeldItem { + get { return BitConverter.ToUInt16(Data, 0x10); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x10); } } + public int Move1 { + get { return BitConverter.ToUInt16(Data, 0x12); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x12); } } + public int Move2 { + get { return BitConverter.ToUInt16(Data, 0x14); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x14); } } + public int Move3 { + get { return BitConverter.ToUInt16(Data, 0x16); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x16); } } + public int Move4 { + get { return BitConverter.ToUInt16(Data, 0x18); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x18); } } + public int Species { + get { return BitConverter.ToUInt16(Data, 0x1A); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x1A); } } + public int Form { + get { return Data[0x1C]; } + set { Data[0x1C] = (byte)value; } } + public int Language { + get { return Data[0x1D]; } + set { Data[0x1D] = (byte)value; } } + public string Nickname { + get { return Util.TrimFromZero(Encoding.Unicode.GetString(Data, 0x1E, 0x1A)); } + set { Encoding.Unicode.GetBytes(value.PadRight(12 + 1, '\0')).CopyTo(Data, 0x1E); } } + public int Nature { + get { return Data[0x38]; } + set { Data[0x38] = (byte)value; } } + public int Gender { + get { return Data[0x39]; } + set { Data[0x39] = (byte)value; } } + public int AbilityType { + get { return Data[0x3A]; } + set { Data[0x3A] = (byte)value; } } + public int PIDType { + get { return Data[0x3B]; } + set { Data[0x3B] = (byte)value; } } + public int EggLocation { + get { return BitConverter.ToUInt16(Data, 0x3C); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x3C); } } + public int MetLocation { + get { return BitConverter.ToUInt16(Data, 0x3E); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x3F); } } + public int MetLevel { + get { return Data[0x40]; } + set { Data[0x40] = (byte)value; } } + + public int CNT_Cool { get { return Data[0x41]; } set { Data[0x41] = (byte)value; } } + public int CNT_Beauty { get { return Data[0x42]; } set { Data[0x42] = (byte)value; } } + public int CNT_Cute { get { return Data[0x43]; } set { Data[0x43] = (byte)value; } } + public int CNT_Smart { get { return Data[0x44]; } set { Data[0x44] = (byte)value; } } + public int CNT_Tough { get { return Data[0x45]; } set { Data[0x45] = (byte)value; } } + public int CNT_Sheen { get { return Data[0x46]; } set { Data[0x46] = (byte)value; } } + + public int IV_HP { get { return Data[0x47]; } set { Data[0x47] = (byte)value; } } + public int IV_ATK { get { return Data[0x48]; } set { Data[0x48] = (byte)value; } } + public int IV_DEF { get { return Data[0x49]; } set { Data[0x49] = (byte)value; } } + public int IV_SPE { get { return Data[0x4A]; } set { Data[0x4A] = (byte)value; } } + public int IV_SPA { get { return Data[0x4B]; } set { Data[0x4B] = (byte)value; } } + public int IV_SPD { get { return Data[0x4C]; } set { Data[0x4C] = (byte)value; } } + + public int OTGender { get { return Data[0x4D]; } set { Data[0x4D] = (byte)value; } } + public string OT { + get { return Util.TrimFromZero(Encoding.Unicode.GetString(Data, 0x4E, 0x1A)); } + set { Encoding.Unicode.GetBytes(value.PadRight(value.Length + 1, '\0')).CopyTo(Data, 0x4E); } } + public int Level { get { return Data[0x68]; } set { Data[0x68] = (byte)value; } } + public bool IsEgg { get { return Data[0x69] == 1; } set { Data[0x69] = (byte)(value ? 1 : 0); } } + public uint PID { + get { return BitConverter.ToUInt32(Data, 0x6C); } + set { BitConverter.GetBytes(value).CopyTo(Data, 0x6C); } } + public int RelearnMove1 { + get { return BitConverter.ToUInt16(Data, 0x70); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x70); } } + public int RelearnMove2 { + get { return BitConverter.ToUInt16(Data, 0x72); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x72); } } + public int RelearnMove3 { + get { return BitConverter.ToUInt16(Data, 0x74); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x74); } } + public int RelearnMove4 { + get { return BitConverter.ToUInt16(Data, 0x76); } + set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x76); } } + public int OT_Intensity { get { return Data[0x78]; } set { Data[0x78] = (byte)value; } } + public int OT_Memory { get { return Data[0x79]; } set { Data[0x79] = (byte)value; } } + public int OT_TextVar { get { return BitConverter.ToUInt16(Data, 0x7A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x7A); } } + public int OT_Feeling { get { return Data[0x7C]; } set { Data[0x7C] = (byte)value; } } + + private byte RIB0 { get { return Data[0x0C]; } set { Data[0x0C] = value; } } + public bool RIB0_0 { get { return (RIB0 & (1 << 0)) == 1 << 0; } set { RIB0 = (byte)(RIB0 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Battle Champ Ribbon + public bool RIB0_1 { get { return (RIB0 & (1 << 1)) == 1 << 1; } set { RIB0 = (byte)(RIB0 & ~(1 << 1) | (value ? 1 << 1 : 0)); } } // Regional Champ Ribbon + public bool RIB0_2 { get { return (RIB0 & (1 << 2)) == 1 << 2; } set { RIB0 = (byte)(RIB0 & ~(1 << 2) | (value ? 1 << 2 : 0)); } } // National Champ Ribbon + public bool RIB0_3 { get { return (RIB0 & (1 << 3)) == 1 << 3; } set { RIB0 = (byte)(RIB0 & ~(1 << 3) | (value ? 1 << 3 : 0)); } } // Country Ribbon + public bool RIB0_4 { get { return (RIB0 & (1 << 4)) == 1 << 4; } set { RIB0 = (byte)(RIB0 & ~(1 << 4) | (value ? 1 << 4 : 0)); } } // National Ribbon + public bool RIB0_5 { get { return (RIB0 & (1 << 5)) == 1 << 5; } set { RIB0 = (byte)(RIB0 & ~(1 << 5) | (value ? 1 << 5 : 0)); } } // Earth Ribbon + public bool RIB0_6 { get { return (RIB0 & (1 << 6)) == 1 << 6; } set { RIB0 = (byte)(RIB0 & ~(1 << 6) | (value ? 1 << 6 : 0)); } } // World Ribbon + public bool RIB0_7 { get { return (RIB0 & (1 << 7)) == 1 << 7; } set { RIB0 = (byte)(RIB0 & ~(1 << 7) | (value ? 1 << 7 : 0)); } } // Event Ribbon + private byte RIB1 { get { return Data[0x0D]; } set { Data[0x0D] = value; } } + public bool RIB1_0 { get { return (RIB1 & (1 << 0)) == 1 << 0; } set { RIB1 = (byte)(RIB1 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // World Champ Ribbon + public bool RIB1_1 { get { return (RIB1 & (1 << 1)) == 1 << 1; } set { RIB1 = (byte)(RIB1 & ~(1 << 1) | (value ? 1 << 1 : 0)); } } // Birthday Ribbon + public bool RIB1_2 { get { return (RIB1 & (1 << 2)) == 1 << 2; } set { RIB1 = (byte)(RIB1 & ~(1 << 2) | (value ? 1 << 2 : 0)); } } // Special Ribbon + public bool RIB1_3 { get { return (RIB1 & (1 << 3)) == 1 << 3; } set { RIB1 = (byte)(RIB1 & ~(1 << 3) | (value ? 1 << 3 : 0)); } } // Souvenir Ribbon + public bool RIB1_4 { get { return (RIB1 & (1 << 4)) == 1 << 4; } set { RIB1 = (byte)(RIB1 & ~(1 << 4) | (value ? 1 << 4 : 0)); } } // Wishing Ribbon + public bool RIB1_5 { get { return (RIB1 & (1 << 5)) == 1 << 5; } set { RIB1 = (byte)(RIB1 & ~(1 << 5) | (value ? 1 << 5 : 0)); } } // Classic Ribbon + public bool RIB1_6 { get { return (RIB1 & (1 << 6)) == 1 << 6; } set { RIB1 = (byte)(RIB1 & ~(1 << 6) | (value ? 1 << 6 : 0)); } } // Premier Ribbon + public bool RIB1_7 { get { return (RIB1 & (1 << 7)) == 1 << 7; } set { RIB1 = (byte)(RIB1 & ~(1 << 7) | (value ? 1 << 7 : 0)); } } // Empty + + public int[] Moves + { + get { return new[] {Move1, Move2, Move3, Move4}; } + set + { + if (value.Length > 0) Move1 = value[0]; + if (value.Length > 1) Move2 = value[1]; + if (value.Length > 2) Move3 = value[2]; + if (value.Length > 3) Move4 = value[3]; + } + } + public int[] RelearnMoves + { + get { return new[] { RelearnMove1, RelearnMove2, RelearnMove3, RelearnMove4 }; } + set + { + if (value.Length > 0) RelearnMove1 = value[0]; + if (value.Length > 1) RelearnMove2 = value[1]; + if (value.Length > 2) RelearnMove3 = value[2]; + if (value.Length > 3) RelearnMove4 = value[3]; + } + } + + } +} \ No newline at end of file diff --git a/MysteryGifts/WC6.cs b/MysteryGifts/WC6.cs index f2b969a1a..6661f9f3c 100644 --- a/MysteryGifts/WC6.cs +++ b/MysteryGifts/WC6.cs @@ -221,7 +221,7 @@ namespace PKHeX SID = SID, Met_Level = currentLevel, Nature = Nature != 0xFF ? Nature : (int)(Util.rnd32() % 25), - Gender = PKX.Personal[Species].Gender == 255 ? 2 : (Gender != 3 ? Gender : PKX.Personal[Species].RandomGender), + Gender = PersonalTable.AO[Species].Gender == 255 ? 2 : (Gender != 3 ? Gender : PersonalTable.AO[Species].RandomGender), AltForm = Form, EncryptionConstant = EncryptionConstant == 0 ? Util.rnd32() : EncryptionConstant, Version = OriginGame == 0 ? SAV.Game : OriginGame, @@ -231,10 +231,6 @@ namespace PKHeX Region = SAV.SubRegion, ConsoleRegion = SAV.ConsoleRegion, Move1 = Move1, Move2 = Move2, Move3 = Move3, Move4 = Move4, - Move1_PP = PKX.getBasePP(Move1), - Move2_PP = PKX.getBasePP(Move2), - Move3_PP = PKX.getBasePP(Move3), - Move4_PP = PKX.getBasePP(Move4), RelearnMove1 = RelearnMove1, RelearnMove2 = RelearnMove2, RelearnMove3 = RelearnMove3, RelearnMove4 = RelearnMove4, Met_Location = MetLocation, @@ -273,13 +269,17 @@ namespace PKHeX RibbonChampionNational = RibbonChampionNational, RibbonChampionWorld = RibbonChampionWorld, - OT_Friendship = PKX.getBaseFriendship(Species), + OT_Friendship = PersonalTable.AO[Species].BaseFriendship, OT_Intensity = OT_Intensity, OT_Memory = OT_Memory, OT_TextVar = OT_TextVar, OT_Feeling = OT_Feeling, FatefulEncounter = true, }; + pk.Move1_PP = pk.getMovePP(Move1, 0); + pk.Move2_PP = pk.getMovePP(Move2, 0); + pk.Move3_PP = pk.getMovePP(Move3, 0); + pk.Move4_PP = pk.getMovePP(Move4, 0); if (Day + Month + Year == 0) // No datetime set, typical for wc6full { @@ -352,7 +352,7 @@ namespace PKHeX av = (int)(Util.rnd32()%(AbilityType - 1)); break; } - pk.Ability = PKX.Personal[PKX.Personal[Species].FormeIndex(Species, pk.AltForm)].Abilities[av]; + pk.Ability = PersonalTable.AO.getAbilities(Species, pk.AltForm)[av]; pk.AbilityNumber = 1 << av; switch (PIDType) diff --git a/PKHeX.csproj b/PKHeX.csproj index a96200fd6..0e9db46b7 100644 --- a/PKHeX.csproj +++ b/PKHeX.csproj @@ -88,6 +88,7 @@ Form + @@ -95,6 +96,7 @@ + @@ -112,6 +114,7 @@ QR.cs + @@ -169,6 +172,12 @@ + + Form + + + SAV_Link6.cs + Form @@ -314,6 +323,9 @@ MemoryAmie.cs + + SAV_Link6.cs + SAV_PokeBlockORAS.cs @@ -413,14 +425,11 @@ - - - @@ -558,6 +567,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -738,7 +887,6 @@ - @@ -836,7 +984,6 @@ - diff --git a/PKM/PK3.cs b/PKM/PK3.cs index 65670fed4..46d11ded7 100644 --- a/PKM/PK3.cs +++ b/PKM/PK3.cs @@ -25,16 +25,15 @@ namespace PKHeX // Future Attributes public override uint EncryptionConstant { get { return PID; } set { } } public override int Nature { get { return (int)(PID % 25); } set { } } - public override int AltForm { get { return -1; } set { } } + public override int AltForm { get { return Species == 201 ? PKX.getUnownForm(PID) : 0; } set { } } public override bool IsNicknamed { get { return PKX.getIsNicknamed(Species, Nickname); } set { } } public override int Gender { get { return PKX.getGender(Species, PID); } set { } } public override int Characteristic => -1; public override int CurrentFriendship { get { return OT_Friendship; } set { OT_Friendship = value; } } - public override int Ability { get { return PKX.Gen3Abilities[Species][AbilityNumber]; } set { } } + public override int Ability { get { int[] abils = PersonalTable.RS.getAbilities(Species, 0); return abils[abils[1] == 0 ? 0 : AbilityNumber]; } set { } } public override int CurrentHandler { get { return 0; } set { } } public override int Egg_Location { get { return 0; } set { } } - public override int Met_Level { get { return -1; } set { } } // 0x20 Intro public override uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } } @@ -106,6 +105,7 @@ namespace PKHeX public override int Met_Location { get { return Data[0x45]; } set { Data[0x45] = (byte)value; } } // Origins private ushort Origins { get { return BitConverter.ToUInt16(Data, 0x46); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x46); } } + public override int Met_Level { get { return Origins & 0x3F; } set { Origins = (ushort)((Origins & ~0x3F) | value); } } public override int Version { get { return (Origins >> 7) & 0xF; } set { Origins = (ushort)((Origins & ~0x780) | ((value & 0xF) << 7));} } public override int Ball { get { return (Origins >> 11) & 0xF; } set { Origins = (ushort)((Origins & ~0x7800) | ((value & 0xF) << 11)); } } public override int OT_Gender { get { return (Origins >> 15) & 1; } set { Origins = (ushort)(Origins & ~(1 << 15) | ((value & 1) << 15)); } } @@ -121,28 +121,28 @@ namespace PKHeX public int AbilityNumber { get { return (int)((IV32 >> 31) & 1); } set { IV32 = (IV32 & 0x7FFFFFFF) | (value == 1 ? 0x80000000 : 0); } } private uint RIB0 { get { return BitConverter.ToUInt32(Data, 0x4C); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x4C); } } - public int RibbonCountG3Cool { get { return (int)(RIB0 >> 00) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 00)) | (uint)(value & 7)); } } - public int RibbonCountG3Beauty { get { return (int)(RIB0 >> 03) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 03)) | (uint)(value & 7)); } } - public int RibbonCountG3Cute { get { return (int)(RIB0 >> 06) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 06)) | (uint)(value & 7)); } } - public int RibbonCountG3Smart { get { return (int)(RIB0 >> 09) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 09)) | (uint)(value & 7)); } } - public int RibbonCountG3Tough { get { return (int)(RIB0 >> 12) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 12)) | (uint)(value & 7)); } } - public bool RibbonChampionG3Hoenn { get { return (RIB0 & (1 << 15)) == 1 << 15; } set { RIB0 = (uint)(RIB0 & ~(1 << 15) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonWinning { get { return (RIB0 & (1 << 16)) == 1 << 16; } set { RIB0 = (uint)(RIB0 & ~(1 << 16) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonVictory { get { return (RIB0 & (1 << 17)) == 1 << 17; } set { RIB0 = (uint)(RIB0 & ~(1 << 17) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonArtist { get { return (RIB0 & (1 << 18)) == 1 << 18; } set { RIB0 = (uint)(RIB0 & ~(1 << 18) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonEffort { get { return (RIB0 & (1 << 19)) == 1 << 19; } set { RIB0 = (uint)(RIB0 & ~(1 << 19) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonChampionBattle { get { return (RIB0 & (1 << 20)) == 1 << 20; } set { RIB0 = (uint)(RIB0 & ~(1 << 20) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonChampionRegional { get { return (RIB0 & (1 << 21)) == 1 << 21; } set { RIB0 = (uint)(RIB0 & ~(1 << 21) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonChampionNational { get { return (RIB0 & (1 << 22)) == 1 << 22; } set { RIB0 = (uint)(RIB0 & ~(1 << 22) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonCountry { get { return (RIB0 & (1 << 23)) == 1 << 23; } set { RIB0 = (uint)(RIB0 & ~(1 << 23) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonNational { get { return (RIB0 & (1 << 24)) == 1 << 24; } set { RIB0 = (uint)(RIB0 & ~(1 << 24) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonEarth { get { return (RIB0 & (1 << 25)) == 1 << 25; } set { RIB0 = (uint)(RIB0 & ~(1 << 25) | (uint)(value ? 1 << 0 : 0)); } } - public bool RibbonWorld { get { return (RIB0 & (1 << 26)) == 1 << 26; } set { RIB0 = (uint)(RIB0 & ~(1 << 26) | (uint)(value ? 1 << 0 : 0)); } } - public bool Unused1 { get { return (RIB0 & (1 << 27)) == 1 << 27; } set { RIB0 = (uint)(RIB0 & ~(1 << 27) | (uint)(value ? 1 << 0 : 0)); } } - public bool Unused2 { get { return (RIB0 & (1 << 28)) == 1 << 28; } set { RIB0 = (uint)(RIB0 & ~(1 << 28) | (uint)(value ? 1 << 0 : 0)); } } - public bool Unused3 { get { return (RIB0 & (1 << 29)) == 1 << 29; } set { RIB0 = (uint)(RIB0 & ~(1 << 29) | (uint)(value ? 1 << 0 : 0)); } } - public bool Unused4 { get { return (RIB0 & (1 << 30)) == 1 << 30; } set { RIB0 = (uint)(RIB0 & ~(1 << 30) | (uint)(value ? 1 << 0 : 0)); } } - public override bool FatefulEncounter { get { return (RIB0 & (1 << 31)) == 1 << 31; } set { RIB0 = (RIB0 & ~(1 << 31)) | (uint)(value ? 1 << 0 : 0); } } + public int RibbonCountG3Cool { get { return (int)(RIB0 >> 00) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 00)) | (uint)(value & 7) << 00); } } + public int RibbonCountG3Beauty { get { return (int)(RIB0 >> 03) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 03)) | (uint)(value & 7) << 03); } } + public int RibbonCountG3Cute { get { return (int)(RIB0 >> 06) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 06)) | (uint)(value & 7) << 06); } } + public int RibbonCountG3Smart { get { return (int)(RIB0 >> 09) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 09)) | (uint)(value & 7) << 09); } } + public int RibbonCountG3Tough { get { return (int)(RIB0 >> 12) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 12)) | (uint)(value & 7) << 12); } } + public bool RibbonChampionG3Hoenn { get { return (RIB0 & (1 << 15)) == 1 << 15; } set { RIB0 = (uint)(RIB0 & ~(1 << 15) | (uint)(value ? 1 << 15 : 0)); } } + public bool RibbonWinning { get { return (RIB0 & (1 << 16)) == 1 << 16; } set { RIB0 = (uint)(RIB0 & ~(1 << 16) | (uint)(value ? 1 << 16 : 0)); } } + public bool RibbonVictory { get { return (RIB0 & (1 << 17)) == 1 << 17; } set { RIB0 = (uint)(RIB0 & ~(1 << 17) | (uint)(value ? 1 << 17 : 0)); } } + public bool RibbonArtist { get { return (RIB0 & (1 << 18)) == 1 << 18; } set { RIB0 = (uint)(RIB0 & ~(1 << 18) | (uint)(value ? 1 << 18 : 0)); } } + public bool RibbonEffort { get { return (RIB0 & (1 << 19)) == 1 << 19; } set { RIB0 = (uint)(RIB0 & ~(1 << 19) | (uint)(value ? 1 << 19 : 0)); } } + public bool RibbonChampionBattle { get { return (RIB0 & (1 << 20)) == 1 << 20; } set { RIB0 = (uint)(RIB0 & ~(1 << 20) | (uint)(value ? 1 << 20 : 0)); } } + public bool RibbonChampionRegional { get { return (RIB0 & (1 << 21)) == 1 << 21; } set { RIB0 = (uint)(RIB0 & ~(1 << 21) | (uint)(value ? 1 << 21 : 0)); } } + public bool RibbonChampionNational { get { return (RIB0 & (1 << 22)) == 1 << 22; } set { RIB0 = (uint)(RIB0 & ~(1 << 22) | (uint)(value ? 1 << 22 : 0)); } } + public bool RibbonCountry { get { return (RIB0 & (1 << 23)) == 1 << 23; } set { RIB0 = (uint)(RIB0 & ~(1 << 23) | (uint)(value ? 1 << 23 : 0)); } } + public bool RibbonNational { get { return (RIB0 & (1 << 24)) == 1 << 24; } set { RIB0 = (uint)(RIB0 & ~(1 << 24) | (uint)(value ? 1 << 24 : 0)); } } + public bool RibbonEarth { get { return (RIB0 & (1 << 25)) == 1 << 25; } set { RIB0 = (uint)(RIB0 & ~(1 << 25) | (uint)(value ? 1 << 25 : 0)); } } + public bool RibbonWorld { get { return (RIB0 & (1 << 26)) == 1 << 26; } set { RIB0 = (uint)(RIB0 & ~(1 << 26) | (uint)(value ? 1 << 26 : 0)); } } + public bool Unused1 { get { return (RIB0 & (1 << 27)) == 1 << 27; } set { RIB0 = (uint)(RIB0 & ~(1 << 27) | (uint)(value ? 1 << 27 : 0)); } } + public bool Unused2 { get { return (RIB0 & (1 << 28)) == 1 << 28; } set { RIB0 = (uint)(RIB0 & ~(1 << 28) | (uint)(value ? 1 << 28 : 0)); } } + public bool Unused3 { get { return (RIB0 & (1 << 29)) == 1 << 29; } set { RIB0 = (uint)(RIB0 & ~(1 << 29) | (uint)(value ? 1 << 29 : 0)); } } + public bool Unused4 { get { return (RIB0 & (1 << 30)) == 1 << 30; } set { RIB0 = (uint)(RIB0 & ~(1 << 30) | (uint)(value ? 1 << 30 : 0)); } } + public override bool FatefulEncounter { get { return RIB0 >> 31 == 1; } set { RIB0 = (RIB0 & ~(1 << 31)) | (uint)(value ? 1 << 31 : 0); } } #endregion public override int Stat_Level { get { return Data[0x54]; } set { Data[0x54] = (byte)value; } } @@ -165,7 +165,7 @@ namespace PKHeX } public override bool getGenderIsValid() { - int gv = PKX.Personal[Species].Gender; + int gv = PersonalTable.RS[Species].Gender; if (gv == 255) return Gender == 2; @@ -197,10 +197,10 @@ namespace PKHeX EXP = IsEgg ? PKX.getEXP(5, Species) : EXP, IsEgg = false, OT_Friendship = 40, - Circle = Circle, - Square = Square, - Triangle = Triangle, - Heart = Heart, + MarkCircle = MarkCircle, + MarkSquare = MarkSquare, + MarkTriangle = MarkTriangle, + MarkHeart = MarkHeart, Language = Language, EV_HP = EV_HP, EV_ATK = EV_ATK, @@ -222,17 +222,17 @@ namespace PKHeX Move2_PPUps = Move2_PPUps, Move3_PPUps = Move3_PPUps, Move4_PPUps = Move4_PPUps, - Move1_PP = PKX.getMovePP(Move1, Move1_PPUps), - Move2_PP = PKX.getMovePP(Move2, Move2_PPUps), - Move3_PP = PKX.getMovePP(Move3, Move3_PPUps), - Move4_PP = PKX.getMovePP(Move4, Move4_PPUps), + Move1_PP = getMovePP(Move1, Move1_PPUps), + Move2_PP = getMovePP(Move2, Move2_PPUps), + Move3_PP = getMovePP(Move3, Move3_PPUps), + Move4_PP = getMovePP(Move4, Move4_PPUps), IV_HP = IV_HP, IV_ATK = IV_ATK, IV_DEF = IV_DEF, IV_SPA = IV_SPA, IV_SPD = IV_SPD, IV_SPE = IV_SPE, - Ability = PKX.Gen3Abilities[Species][Ability], + Ability = Ability, Version = Version, Ball = Ball, PKRS_Strain = PKRS_Strain, @@ -294,8 +294,7 @@ namespace PKHeX pk4.IsNicknamed = IsNicknamed; // Unown Form - if (Species == 201) - pk4.AltForm = PKX.getUnownForm(PID); + pk4.AltForm = AltForm; // Remove HM moves int[] banned = { 15, 19, 57, 70, 148, 249, 127, 291 }; diff --git a/PKM/PK4.cs b/PKM/PK4.cs index cf5307fb3..f7e450e31 100644 --- a/PKM/PK4.cs +++ b/PKM/PK4.cs @@ -340,7 +340,7 @@ namespace PKHeX // Methods public override bool getGenderIsValid() { - int gv = PKX.Personal[Species].Gender; + int gv = PersonalTable.HGSS[Species].Gender; if (gv == 255) return Gender == 2; @@ -380,10 +380,10 @@ namespace PKHeX }; // Fix PP - pk5.Move1_PP = PKX.getMovePP(pk5.Move1_PP, pk5.Move1_PPUps); - pk5.Move2_PP = PKX.getMovePP(pk5.Move2_PP, pk5.Move2_PPUps); - pk5.Move3_PP = PKX.getMovePP(pk5.Move3_PP, pk5.Move3_PPUps); - pk5.Move4_PP = PKX.getMovePP(pk5.Move4_PP, pk5.Move4_PPUps); + pk5.Move1_PP = getMovePP(pk5.Move1_PP, pk5.Move1_PPUps); + pk5.Move2_PP = getMovePP(pk5.Move2_PP, pk5.Move2_PPUps); + pk5.Move3_PP = getMovePP(pk5.Move3_PP, pk5.Move3_PPUps); + pk5.Move4_PP = getMovePP(pk5.Move4_PP, pk5.Move4_PPUps); // Disassociate Nature and PID pk5.Nature = (int)(pk5.PID % 25); diff --git a/PKM/PK5.cs b/PKM/PK5.cs index c844f17dd..d8a302b1a 100644 --- a/PKM/PK5.cs +++ b/PKM/PK5.cs @@ -300,17 +300,19 @@ namespace PKHeX // Methods public override bool getGenderIsValid() { - int gv = PKX.Personal[Species].Gender; - if (gv == 255 && Gender == 2) - return true; - if (gv == 0 && Gender == 1) - return true; - if (gv == 254 && Gender == 0) - return true; - if (gv <= (PID & 0xFF) && Gender == 0) - return true; - if (gv > (PID & 0xFF) && Gender == 1) - return true; + int gv = PersonalTable.B2W2[Species].Gender; + + if (gv == 255) + return Gender == 2; + if (gv == 254) + return Gender == 0; + if (gv == 0) + return Gender == 1; + if (gv <= (PID & 0xFF)) + return Gender == 0; + if ((PID & 0xFF) < gv) + return Gender == 1; + return false; } public override byte[] Encrypt() @@ -332,19 +334,21 @@ namespace PKHeX Ability = Ability }; - int abilnum = PKX.getAbilityNumber(Species, Ability, AltForm); - if (abilnum > 0) pk6.AbilityNumber = abilnum; + int[] abilities = PersonalTable.AO.getAbilities(Species, AltForm); + int abilval = Array.IndexOf(abilities, Ability); + if (abilval >= 0) + pk6.AbilityNumber = 1 << abilval; else // Fallback (shouldn't happen) { if (HiddenAbility) pk6.AbilityNumber = 4; // Hidden, else G5 or G3/4 correlation. else pk6.AbilityNumber = Gen5 ? 1 << (int)(PID >> 16 & 1) : 1 << (int)(PID & 1); } - pk6.Circle = Circle; - pk6.Square = Square; - pk6.Triangle = Triangle; - pk6.Heart = Heart; - pk6.Star = Star; - pk6.Diamond = Diamond; + pk6.MarkCircle = MarkCircle; + pk6.MarkSquare = MarkSquare; + pk6.MarkTriangle = MarkTriangle; + pk6.MarkHeart = MarkHeart; + pk6.MarkStar = MarkStar; + pk6.MarkDiamond = MarkDiamond; pk6.Language = Language; pk6.CNT_Cool = CNT_Cool; @@ -366,10 +370,10 @@ namespace PKHeX pk6.Move3 = Move3; pk6.Move4 = Move4; - pk6.Move1_PP = PKX.getMovePP(Move1, Move1_PPUps); - pk6.Move2_PP = PKX.getMovePP(Move2, Move2_PPUps); - pk6.Move3_PP = PKX.getMovePP(Move3, Move3_PPUps); - pk6.Move4_PP = PKX.getMovePP(Move4, Move4_PPUps); + pk6.Move1_PP = getMovePP(Move1, Move1_PPUps); + pk6.Move2_PP = getMovePP(Move2, Move2_PPUps); + pk6.Move3_PP = getMovePP(Move3, Move3_PPUps); + pk6.Move4_PP = getMovePP(Move4, Move4_PPUps); pk6.Move1_PPUps = Move1_PPUps; pk6.Move2_PPUps = Move2_PPUps; @@ -517,7 +521,7 @@ namespace PKHeX pk6.HT_Memory = 4; pk6.HT_Feeling = (int)(Util.rnd32() % 10); // When transferred, friendship gets reset. - pk6.OT_Friendship = pk6.HT_Friendship = PKX.getBaseFriendship(Species); + pk6.OT_Friendship = pk6.HT_Friendship = PersonalTable.B2W2[Species].BaseFriendship; // Antishiny Mechanism ushort LID = (ushort)(PID & 0xFFFF); diff --git a/PKM/PK6.cs b/PKM/PK6.cs index a3add1676..ca81c2eb2 100644 --- a/PKM/PK6.cs +++ b/PKM/PK6.cs @@ -449,7 +449,7 @@ namespace PKHeX } public override bool getGenderIsValid() { - int gv = PKX.Personal[Species].Gender; + int gv = PersonalTable.AO[Species].Gender; if (gv == 255) return Gender == 2; @@ -629,7 +629,7 @@ namespace PKHeX return; // Reset - HT_Friendship = PKX.getBaseFriendship(Species); + HT_Friendship = PersonalTable.AO[Species].BaseFriendship; HT_Affection = 0; } diff --git a/PKM/PKM.cs b/PKM/PKM.cs index 29ac20380..bc4b9e84d 100644 --- a/PKM/PKM.cs +++ b/PKM/PKM.cs @@ -13,6 +13,8 @@ namespace PKHeX // Internal Attributes set on creation public byte[] Data; // Raw Storage public string Identifier; // User or Form Custom Attribute + public int Box { get; set; } = -1; // Batch Editor + public int Slot { get; set; } = -1; // Batch Editor public byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray(); public byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray(); @@ -154,16 +156,16 @@ namespace PKHeX public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0; public bool ChecksumValid => Checksum == CalculateChecksum(); public int CurrentLevel => PKX.getLevel(Species, EXP); - public bool Circle { get { return Markings[0]; } set { Markings[0] = value; } } - public bool Triangle { get { return Markings[1]; } set { Markings[1] = value; } } - public bool Square { get { return Markings[2]; } set { Markings[2] = value; } } - public bool Heart { get { return Markings[3]; } set { Markings[3] = value; } } - public bool Star { get { return Markings[4]; } set { Markings[4] = value; } } - public bool Diamond { get { return Markings[5]; } set { Markings[5] = value; } } + public bool MarkCircle { get { return (MarkByte & (1 << 0)) == 1 << 0; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } } + public bool MarkTriangle { get { return (MarkByte & (1 << 1)) == 1 << 1; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } } + public bool MarkSquare { get { return (MarkByte & (1 << 2)) == 1 << 2; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } } + public bool MarkHeart { get { return (MarkByte & (1 << 3)) == 1 << 3; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } } + public bool MarkStar { get { return (MarkByte & (1 << 4)) == 1 << 4; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } } + public bool MarkDiamond { get { return (MarkByte & (1 << 5)) == 1 << 5; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } } public Image Sprite => PKX.getSprite(this); public string ShowdownText => ShowdownSet.getShowdownText(this); public string[] QRText => PKX.getQRText(this); - public string FileName => PKX.getFileName(this); + public string FileName => $"{Species.ToString("000")}{(IsShiny ? " ★" : "")} - {Nickname} - {Checksum.ToString("X4")}{EncryptionConstant.ToString("X8")}.{Extension}"; public int[] IVs { get { return new[] { IV_HP, IV_ATK, IV_DEF, IV_SPE, IV_SPA, IV_SPD }; } @@ -268,10 +270,28 @@ namespace PKHeX return ivTotal <= 150 ? 2 : 3; } } - - public void CalculateStats() + + public ushort[] getStats(PersonalInfo p) + { + int level = CurrentLevel; + ushort[] Stats = new ushort[6]; + Stats[0] = (ushort)(p.HP == 1 ? 1 : (IV_HP + 2 * p.HP + EV_HP / 4 + 100) * level / 100 + 10); + Stats[1] = (ushort)((IV_ATK + 2 * p.ATK + EV_ATK / 4) * level / 100 + 5); + Stats[2] = (ushort)((IV_DEF + 2 * p.DEF + EV_DEF / 4) * level / 100 + 5); + Stats[4] = (ushort)((IV_SPA + 2 * p.SPA + EV_SPA / 4) * level / 100 + 5); + Stats[5] = (ushort)((IV_SPD + 2 * p.SPD + EV_SPD / 4) * level / 100 + 5); + Stats[3] = (ushort)((IV_SPE + 2 * p.SPE + EV_SPE / 4) * level / 100 + 5); + + // Account for nature + int incr = Nature / 5 + 1; + int decr = Nature % 5 + 1; + if (incr == decr) return Stats; + Stats[incr] *= 11; Stats[incr] /= 10; + Stats[decr] *= 9; Stats[decr] /= 10; + return Stats; + } + public void setStats(ushort[] Stats) { - ushort[] Stats = PKX.getStats(this); Stat_HPMax = Stat_HPCurrent = Stats[0]; Stat_ATK = Stats[1]; Stat_DEF = Stats[2]; @@ -285,5 +305,41 @@ namespace PKHeX } public abstract PKM Clone(); + + public int getMovePP(int move, int ppup) + { + return getBasePP(move) * (5 + ppup) / 5; + } + + private int getBasePP(int move) + { + int[] pptable; + switch (Format) + { + case 3: pptable = Legal.MovePP_RS; break; + case 4: pptable = Legal.MovePP_DP; break; + case 5: pptable = Legal.MovePP_BW; break; + case 6: pptable = Legal.MovePP_XY; break; + default: pptable = new int[1]; break; + } + if (move >= pptable.Length) + move = 0; + return pptable[move]; + } + + public void setShinyPID() + { + while (!IsShiny) + PID = PKX.getRandomPID(Species, Gender, Version, Nature, AltForm); + EncryptionConstant = PID; + } + public void setPIDGender(int gender) + { + PID = PKX.getRandomPID(Species, gender, Version, Nature, AltForm); + while (IsShiny) + PID = PKX.getRandomPID(Species, gender, Version, Nature, AltForm); + + EncryptionConstant = PID; + } } } diff --git a/PKM/PKMConverter.cs b/PKM/PKMConverter.cs index 9720dae33..5c1bdebaf 100644 --- a/PKM/PKMConverter.cs +++ b/PKM/PKMConverter.cs @@ -104,11 +104,11 @@ namespace PKHeX pkm.Met_Location = 30001; // Pokétransfer } if (pkm.Format == 3 && Format > 3) - pkm = (pkm as PK3).convertToPK4(); + pkm = ((PK3) pkm).convertToPK4(); if (pkm.Format == 4 && Format > 4) - pkm = (pkm as PK4).convertToPK5(); + pkm = ((PK4) pkm).convertToPK5(); if (pkm.Format == 5 && Format > 5) - pkm = (pkm as PK5).convertToPK6(); + pkm = ((PK5) pkm).convertToPK6(); comment = $"Converted from pk{currentFormat} to pk{Format}"; return pkm; } diff --git a/PKM/PKX.cs b/PKM/PKX.cs index c59fd541f..079071835 100644 --- a/PKM/PKX.cs +++ b/PKM/PKX.cs @@ -30,7 +30,6 @@ namespace PKHeX return new[] {SIZE_3STORED, SIZE_3PARTY, SIZE_4STORED, SIZE_4PARTY, SIZE_5PARTY, SIZE_6STORED, SIZE_6PARTY}.Contains((int)len); } - // C# PKX Function Library // No WinForm object related code, only to calculate information. // May require re-referencing to main form for string array referencing. @@ -181,54 +180,9 @@ namespace PKHeX try { return SpeciesLang.All(list => list[species].ToUpper() != nick); } catch { return false; } } - internal static PersonalInfo[] Personal = PersonalInfo.AO; + internal static readonly PersonalTable Personal = PersonalTable.AO; // Stat Fetching - internal static int getMovePP(int move, int ppup) - { - return getBasePP(move) * (5 + ppup) / 5; - } - internal static int getBasePP(int move) - { - byte[] movepptable = - { - 00, - 35, 25, 10, 15, 20, 20, 15, 15, 15, 35, 30, 05, 10, 20, 30, 35, 35, 20, 15, 20, - 20, 25, 20, 30, 05, 10, 15, 15, 15, 25, 20, 05, 35, 15, 20, 20, 10, 15, 30, 35, - 20, 20, 30, 25, 40, 20, 15, 20, 20, 20, 30, 25, 15, 30, 25, 05, 15, 10, 05, 20, - 20, 20, 05, 35, 20, 25, 20, 20, 20, 15, 25, 15, 10, 20, 25, 10, 35, 30, 15, 10, - 40, 10, 15, 30, 15, 20, 10, 15, 10, 05, 10, 10, 25, 10, 20, 40, 30, 30, 20, 20, - 15, 10, 40, 15, 10, 30, 10, 20, 10, 40, 40, 20, 30, 30, 20, 30, 10, 10, 20, 05, - 10, 30, 20, 20, 20, 05, 15, 10, 20, 10, 15, 35, 20, 15, 10, 10, 30, 15, 40, 20, - 15, 10, 05, 10, 30, 10, 15, 20, 15, 40, 20, 10, 05, 15, 10, 10, 10, 15, 30, 30, - 10, 10, 20, 10, 01, 01, 10, 25, 10, 05, 15, 25, 15, 10, 15, 30, 05, 40, 15, 10, - 25, 10, 30, 10, 20, 10, 10, 10, 10, 10, 20, 05, 40, 05, 05, 15, 05, 10, 05, 10, - 10, 10, 10, 20, 20, 40, 15, 10, 20, 20, 25, 05, 15, 10, 05, 20, 15, 20, 25, 20, - 05, 30, 05, 10, 20, 40, 05, 20, 40, 20, 15, 35, 10, 05, 05, 05, 15, 05, 20, 05, - 05, 15, 20, 10, 05, 05, 15, 10, 15, 15, 10, 10, 10, 20, 10, 10, 10, 10, 15, 15, - 15, 10, 20, 20, 10, 20, 20, 20, 20, 20, 10, 10, 10, 20, 20, 05, 15, 10, 10, 15, - 10, 20, 05, 05, 10, 10, 20, 05, 10, 20, 10, 20, 20, 20, 05, 05, 15, 20, 10, 15, - 20, 15, 10, 10, 15, 10, 05, 05, 10, 15, 10, 05, 20, 25, 05, 40, 15, 05, 40, 15, - 20, 20, 05, 15, 20, 20, 15, 15, 05, 10, 30, 20, 30, 15, 05, 40, 15, 05, 20, 05, - 15, 25, 25, 15, 20, 15, 20, 15, 20, 10, 20, 20, 05, 05, 10, 05, 40, 10, 10, 05, - 10, 10, 15, 10, 20, 15, 30, 10, 20, 05, 10, 10, 15, 10, 10, 05, 15, 05, 10, 10, - 30, 20, 20, 10, 10, 05, 05, 10, 05, 20, 10, 20, 10, 15, 10, 20, 20, 20, 15, 15, - 10, 15, 15, 15, 10, 10, 10, 20, 10, 30, 05, 10, 15, 10, 10, 05, 20, 30, 10, 30, - 15, 15, 15, 15, 30, 10, 20, 15, 10, 10, 20, 15, 05, 05, 15, 15, 05, 10, 05, 20, - 05, 15, 20, 05, 20, 20, 20, 20, 10, 20, 10, 15, 20, 15, 10, 10, 05, 10, 05, 05, - 10, 05, 05, 10, 05, 05, 05, 15, 10, 10, 10, 10, 10, 10, 15, 20, 15, 10, 15, 10, - 15, 10, 20, 10, 15, 10, 20, 20, 20, 20, 20, 15, 15, 15, 15, 15, 15, 20, 15, 10, - 15, 15, 15, 15, 10, 10, 10, 10, 10, 15, 15, 15, 15, 05, 05, 15, 05, 10, 10, 10, - 20, 20, 20, 10, 10, 30, 15, 15, 10, 15, 25, 10, 15, 10, 10, 10, 20, 10, 10, 10, - 10, 10, 15, 15, 05, 05, 10, 10, 10, 05, 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 - }; - if (move < 0) move = 0; - return movepptable[move]; - } internal static byte[] getRandomEVs() { byte[] evs = new byte[6]; @@ -243,10 +197,6 @@ namespace PKHeX Util.Shuffle(evs); return evs; } - internal static int getBaseFriendship(int species) - { - return Personal[species].BaseFriendship; - } internal static int getLevel(int species, uint exp) { int growth = Personal[species].EXPGrowth; @@ -255,30 +205,12 @@ namespace PKHeX if (tl == 100) return 100; return --tl; } - internal static bool getIsShiny(uint PID, uint TID, uint SID) - { - uint PSV = getPSV(PID); - uint TSV = getTSV(TID, SID); - return TSV == PSV; - } internal static uint getEXP(int level, int species) { if (level <= 1) return 0; if (level > 100) level = 100; return ExpTable[level, Personal[species].EXPGrowth]; } - internal static int[] getAbilities(int species, int formnum) - { - return Personal[Personal[species].FormeIndex(species, formnum)].Abilities; - } - internal static int getAbilityNumber(int species, int ability, int formnum) - { - int[] spec_abilities = getAbilities(species, formnum); - int abilval = Array.IndexOf(spec_abilities, ability); - if (abilval >= 0) - return 1 << abilval; - return -1; - } internal static int getGender(string s) { if (s == null) @@ -343,26 +275,25 @@ namespace PKHeX return data; } - internal static string getLocation(PKM pk, bool egg) + internal static string getLocation(PKM pk, bool eggmet) { - return getLocation(egg, pk.Version, egg ? pk.Egg_Location : pk.Met_Location, pk.Format); - } - internal static string getLocation(bool eggmet, int gameorigin, int locval, int format) - { - if (gameorigin < 0x10 && (eggmet || format < 5)) + int locval = eggmet ? pk.Egg_Location : pk.Met_Location; + if (pk.Format == 3) + return Main.metRSEFRLG_00000[locval%0x100]; + if (pk.Version < 0x10 && (eggmet || pk.Format < 5)) { if (locval < 2000) return Main.metHGSS_00000[locval]; if (locval < 3000) return Main.metHGSS_02000[locval % 2000]; return Main.metHGSS_03000[locval % 3000]; } - if (gameorigin < 24) + if (pk.Version < 24) { if (locval < 30000) return Main.metBW2_00000[locval]; if (locval < 40000) return Main.metBW2_30000[locval % 10000 - 1]; if (locval < 60000) return Main.metBW2_40000[locval % 10000 - 1]; return Main.metBW2_60000[locval % 10000 - 1]; } - if (gameorigin > 23) + if (pk.Version > 23) { if (locval < 30000) return Main.metXY_00000[locval]; if (locval < 40000) return Main.metXY_30000[locval % 10000 - 1]; @@ -399,42 +330,6 @@ namespace PKHeX return response; } - internal static string getFileName(PKM pkm) - { - return - $"{pkm.Species.ToString("000")}{(pkm.IsShiny ? " ★" : "")} - {pkm.Nickname} - {pkm.Checksum.ToString("X4")}{pkm.EncryptionConstant.ToString("X8")}.{pkm.Extension}"; - } - internal static ushort[] getStats(PKM pkm) - { - return getStats(pkm.Species, pkm.Stat_Level, pkm.Nature, pkm.AltForm, - pkm.EV_HP, pkm.EV_ATK, pkm.EV_DEF, pkm.EV_SPA, pkm.EV_SPD, pkm.EV_SPE, - pkm.IV_HP, pkm.IV_ATK, pkm.IV_DEF, pkm.IV_SPA, pkm.IV_SPD, pkm.IV_SPE); - } - internal static ushort[] getStats(int species, int level, int nature, int form, - int HP_EV, int ATK_EV, int DEF_EV, int SPA_EV, int SPD_EV, int SPE_EV, - int HP_IV, int ATK_IV, int DEF_IV, int SPA_IV, int SPD_IV, int SPE_IV) - { - PersonalInfo p = Personal[Personal[species].FormeIndex(species, form)]; - // Calculate Stats - ushort[] stats = new ushort[6]; // Stats are stored as ushorts in the PKX structure. We'll cap them as such. - stats[0] = (ushort)(p.HP == 1 ? 1 : (HP_IV + 2 * p.HP + HP_EV / 4 + 100) * level / 100 + 10); - stats[1] = (ushort)((ATK_IV + 2 * p.ATK + ATK_EV / 4) * level / 100 + 5); - stats[2] = (ushort)((DEF_IV + 2 * p.DEF + DEF_EV / 4) * level / 100 + 5); - stats[4] = (ushort)((SPA_IV + 2 * p.SPA + SPA_EV / 4) * level / 100 + 5); - stats[5] = (ushort)((SPD_IV + 2 * p.SPD + SPD_EV / 4) * level / 100 + 5); - stats[3] = (ushort)((SPE_IV + 2 * p.SPE + SPE_EV / 4) * level / 100 + 5); - - // Account for nature - int incr = nature / 5 + 1; - int decr = nature % 5 + 1; - if (incr == decr) return stats; // if neutral return stats without mod - stats[incr] *= 11; stats[incr] /= 10; - stats[decr] *= 9; stats[decr] /= 10; - - // Return Result - return stats; - } - // PKX Manipulation internal static readonly byte[][] blockPosition = @@ -523,38 +418,7 @@ namespace PKHeX return chk; } - internal static bool verifychk(byte[] input) - { - ushort checksum = 0; - if (input.Length == 100 || input.Length == 80) // Gen 3 Files - { - for (int i = 32; i < 80; i += 2) - checksum += BitConverter.ToUInt16(input, i); - return checksum == BitConverter.ToUInt16(input, 28); - } - - if (input.Length == 236 || input.Length == 220 || input.Length == 136) // Gen 4/5 - Array.Resize(ref input, 136); - else if (input.Length == 232 || input.Length == 260) // Gen 6 - Array.Resize(ref input, 232); - else throw new ArgumentException("Wrong sized input array to verifychecksum"); - - ushort chk = 0; - for (int i = 8; i < input.Length; i += 2) - chk += BitConverter.ToUInt16(input, i); - - return chk == BitConverter.ToUInt16(input, 0x6); - } - - internal static uint getPSV(uint PID) - { - return (PID >> 16 ^ PID & 0xFFFF) >> 4; - } - internal static uint getTSV(uint TID, uint SID) - { - return (TID ^ SID) >> 4; - } internal static uint getRandomPID(int species, int cg, int origin, int nature, int form) { int gt = Personal[species].Gender; @@ -687,7 +551,6 @@ namespace PKHeX t[000], // Normal f[723], // Mega };} - // MegaXY List switch (species) { case 6: @@ -709,6 +572,12 @@ namespace PKHeX f[733], // Libre f[734], // Cosplay }; + case 172: + return new[] + { + t[000], // Normal + f[000], // Spiky + }; case 201: return new[] { @@ -1242,399 +1111,6 @@ namespace PKHeX 388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408, 409,410,411, }; - #endregion - #region Gen 3 Ability Table - internal static readonly byte[][] Gen3Abilities = - { - new byte[] {0x00, 0x00}, // 000 - new byte[] {0x41, 0x41}, // 001 - new byte[] {0x41, 0x41}, // 002 - new byte[] {0x41, 0x41}, // 003 - new byte[] {0x42, 0x42}, // 004 - new byte[] {0x42, 0x42}, // 005 - new byte[] {0x42, 0x42}, // 006 - new byte[] {0x43, 0x43}, // 007 - new byte[] {0x43, 0x43}, // 008 - new byte[] {0x43, 0x43}, // 009 - new byte[] {0x13, 0x13}, // 010 - new byte[] {0x3d, 0x3d}, // 011 - new byte[] {0x0e, 0x0e}, // 012 - new byte[] {0x13, 0x13}, // 013 - new byte[] {0x3d, 0x3d}, // 014 - new byte[] {0x44, 0x44}, // 015 - new byte[] {0x33, 0x33}, // 016 - new byte[] {0x33, 0x33}, // 017 - new byte[] {0x33, 0x33}, // 018 - new byte[] {0x32, 0x3e}, // 019 - new byte[] {0x32, 0x3e}, // 020 - new byte[] {0x33, 0x33}, // 021 - new byte[] {0x33, 0x33}, // 022 - new byte[] {0x3d, 0x16}, // 023 - new byte[] {0x3d, 0x16}, // 024 - new byte[] {0x09, 0x09}, // 025 - new byte[] {0x09, 0x09}, // 026 - new byte[] {0x08, 0x08}, // 027 - new byte[] {0x08, 0x08}, // 028 - new byte[] {0x26, 0x26}, // 029 - new byte[] {0x26, 0x26}, // 030 - new byte[] {0x26, 0x26}, // 031 - new byte[] {0x26, 0x26}, // 032 - new byte[] {0x26, 0x26}, // 033 - new byte[] {0x26, 0x26}, // 034 - new byte[] {0x38, 0x38}, // 035 - new byte[] {0x38, 0x38}, // 036 - new byte[] {0x12, 0x12}, // 037 - new byte[] {0x12, 0x12}, // 038 - new byte[] {0x38, 0x38}, // 039 - new byte[] {0x38, 0x38}, // 040 - new byte[] {0x27, 0x27}, // 041 - new byte[] {0x27, 0x27}, // 042 - new byte[] {0x22, 0x22}, // 043 - new byte[] {0x22, 0x22}, // 044 - new byte[] {0x22, 0x22}, // 045 - new byte[] {0x1b, 0x1b}, // 046 - new byte[] {0x1b, 0x1b}, // 047 - new byte[] {0x0e, 0x0e}, // 048 - new byte[] {0x13, 0x13}, // 049 - new byte[] {0x08, 0x47}, // 050 - new byte[] {0x08, 0x47}, // 051 - new byte[] {0x35, 0x35}, // 052 - new byte[] {0x07, 0x07}, // 053 - new byte[] {0x06, 0x0d}, // 054 - new byte[] {0x06, 0x0d}, // 055 - new byte[] {0x48, 0x48}, // 056 - new byte[] {0x48, 0x48}, // 057 - new byte[] {0x16, 0x12}, // 058 - new byte[] {0x16, 0x12}, // 059 - new byte[] {0x06, 0x0b}, // 060 - new byte[] {0x06, 0x0b}, // 061 - new byte[] {0x06, 0x0b}, // 062 - new byte[] {0x1c, 0x27}, // 063 - new byte[] {0x1c, 0x27}, // 064 - new byte[] {0x1c, 0x27}, // 065 - new byte[] {0x3e, 0x3e}, // 066 - new byte[] {0x3e, 0x3e}, // 067 - new byte[] {0x3e, 0x3e}, // 068 - new byte[] {0x22, 0x22}, // 069 - new byte[] {0x22, 0x22}, // 070 - new byte[] {0x22, 0x22}, // 071 - new byte[] {0x1d, 0x40}, // 072 - new byte[] {0x1d, 0x40}, // 073 - new byte[] {0x45, 0x05}, // 074 - new byte[] {0x45, 0x05}, // 075 - new byte[] {0x45, 0x05}, // 076 - new byte[] {0x32, 0x12}, // 077 - new byte[] {0x32, 0x12}, // 078 - new byte[] {0x0c, 0x14}, // 079 - new byte[] {0x0c, 0x14}, // 080 - new byte[] {0x2a, 0x05}, // 081 - new byte[] {0x2a, 0x05}, // 082 - new byte[] {0x33, 0x27}, // 083 - new byte[] {0x32, 0x30}, // 084 - new byte[] {0x32, 0x30}, // 085 - new byte[] {0x2f, 0x2f}, // 086 - new byte[] {0x2f, 0x2f}, // 087 - new byte[] {0x01, 0x3c}, // 088 - new byte[] {0x01, 0x3c}, // 089 - new byte[] {0x4b, 0x4b}, // 090 - new byte[] {0x4b, 0x4b}, // 091 - new byte[] {0x1a, 0x1a}, // 092 - new byte[] {0x1a, 0x1a}, // 093 - new byte[] {0x1a, 0x1a}, // 094 - new byte[] {0x45, 0x05}, // 095 - new byte[] {0x0f, 0x0f}, // 096 - new byte[] {0x0f, 0x0f}, // 097 - new byte[] {0x34, 0x4b}, // 098 - new byte[] {0x34, 0x4b}, // 099 - new byte[] {0x2b, 0x09}, // 100 - new byte[] {0x2b, 0x09}, // 101 - new byte[] {0x22, 0x22}, // 102 - new byte[] {0x22, 0x22}, // 103 - new byte[] {0x45, 0x1f}, // 104 - new byte[] {0x45, 0x1f}, // 105 - new byte[] {0x07, 0x07}, // 106 - new byte[] {0x33, 0x33}, // 107 - new byte[] {0x0c, 0x14}, // 108 - new byte[] {0x1a, 0x1a}, // 109 - new byte[] {0x1a, 0x1a}, // 110 - new byte[] {0x45, 0x1f}, // 111 - new byte[] {0x45, 0x1f}, // 112 - new byte[] {0x1e, 0x20}, // 113 - new byte[] {0x22, 0x22}, // 114 - new byte[] {0x30, 0x30}, // 115 - new byte[] {0x21, 0x21}, // 116 - new byte[] {0x26, 0x26}, // 117 - new byte[] {0x21, 0x29}, // 118 - new byte[] {0x21, 0x29}, // 119 - new byte[] {0x23, 0x1e}, // 120 - new byte[] {0x23, 0x1e}, // 121 - new byte[] {0x2b, 0x2b}, // 122 - new byte[] {0x44, 0x44}, // 123 - new byte[] {0x0c, 0x0c}, // 124 - new byte[] {0x09, 0x09}, // 125 - new byte[] {0x31, 0x31}, // 126 - new byte[] {0x34, 0x34}, // 127 - new byte[] {0x16, 0x16}, // 128 - new byte[] {0x21, 0x21}, // 129 - new byte[] {0x16, 0x16}, // 130 - new byte[] {0x0b, 0x4b}, // 131 - new byte[] {0x07, 0x07}, // 132 - new byte[] {0x32, 0x32}, // 133 - new byte[] {0x0b, 0x0b}, // 134 - new byte[] {0x0a, 0x0a}, // 135 - new byte[] {0x12, 0x12}, // 136 - new byte[] {0x24, 0x24}, // 137 - new byte[] {0x21, 0x4b}, // 138 - new byte[] {0x21, 0x4b}, // 139 - new byte[] {0x21, 0x04}, // 140 - new byte[] {0x21, 0x04}, // 141 - new byte[] {0x45, 0x2e}, // 142 - new byte[] {0x11, 0x2f}, // 143 - new byte[] {0x2e, 0x2e}, // 144 - new byte[] {0x2e, 0x2e}, // 145 - new byte[] {0x2e, 0x2e}, // 146 - new byte[] {0x3d, 0x3d}, // 147 - new byte[] {0x3d, 0x3d}, // 148 - new byte[] {0x27, 0x27}, // 149 - new byte[] {0x2e, 0x2e}, // 150 - new byte[] {0x1c, 0x1c}, // 151 - new byte[] {0x41, 0x41}, // 152 - new byte[] {0x41, 0x41}, // 153 - new byte[] {0x41, 0x41}, // 154 - new byte[] {0x42, 0x42}, // 155 - new byte[] {0x42, 0x42}, // 156 - new byte[] {0x42, 0x42}, // 157 - new byte[] {0x43, 0x43}, // 158 - new byte[] {0x43, 0x43}, // 159 - new byte[] {0x43, 0x43}, // 160 - new byte[] {0x32, 0x33}, // 161 - new byte[] {0x32, 0x33}, // 162 - new byte[] {0x0f, 0x33}, // 163 - new byte[] {0x0f, 0x33}, // 164 - new byte[] {0x44, 0x30}, // 165 - new byte[] {0x44, 0x30}, // 166 - new byte[] {0x0f, 0x44}, // 167 - new byte[] {0x0f, 0x44}, // 168 - new byte[] {0x27, 0x27}, // 169 - new byte[] {0x0a, 0x23}, // 170 - new byte[] {0x0a, 0x23}, // 171 - new byte[] {0x09, 0x09}, // 172 - new byte[] {0x38, 0x38}, // 173 - new byte[] {0x38, 0x38}, // 174 - new byte[] {0x37, 0x20}, // 175 - new byte[] {0x37, 0x20}, // 176 - new byte[] {0x1c, 0x30}, // 177 - new byte[] {0x1c, 0x30}, // 178 - new byte[] {0x09, 0x09}, // 179 - new byte[] {0x09, 0x09}, // 180 - new byte[] {0x09, 0x09}, // 181 - new byte[] {0x22, 0x22}, // 182 - new byte[] {0x2f, 0x25}, // 183 - new byte[] {0x2f, 0x25}, // 184 - new byte[] {0x45, 0x05}, // 185 - new byte[] {0x06, 0x0b}, // 186 - new byte[] {0x22, 0x22}, // 187 - new byte[] {0x22, 0x22}, // 188 - new byte[] {0x22, 0x22}, // 189 - new byte[] {0x32, 0x35}, // 190 - new byte[] {0x22, 0x22}, // 191 - new byte[] {0x22, 0x22}, // 192 - new byte[] {0x03, 0x0e}, // 193 - new byte[] {0x06, 0x0b}, // 194 - new byte[] {0x06, 0x0b}, // 195 - new byte[] {0x1c, 0x1c}, // 196 - new byte[] {0x1c, 0x1c}, // 197 - new byte[] {0x0f, 0x0f}, // 198 - new byte[] {0x0c, 0x14}, // 199 - new byte[] {0x1a, 0x1a}, // 200 - new byte[] {0x1a, 0x1a}, // 201 - new byte[] {0x17, 0x17}, // 202 - new byte[] {0x27, 0x30}, // 203 - new byte[] {0x05, 0x05}, // 204 - new byte[] {0x05, 0x05}, // 205 - new byte[] {0x20, 0x32}, // 206 - new byte[] {0x08, 0x34}, // 207 - new byte[] {0x45, 0x05}, // 208 - new byte[] {0x16, 0x32}, // 209 - new byte[] {0x16, 0x16}, // 210 - new byte[] {0x21, 0x26}, // 211 - new byte[] {0x44, 0x44}, // 212 - new byte[] {0x05, 0x05}, // 213 - new byte[] {0x44, 0x3e}, // 214 - new byte[] {0x27, 0x33}, // 215 - new byte[] {0x35, 0x35}, // 216 - new byte[] {0x3e, 0x3e}, // 217 - new byte[] {0x28, 0x31}, // 218 - new byte[] {0x28, 0x31}, // 219 - new byte[] {0x0c, 0x0c}, // 220 - new byte[] {0x0c, 0x0c}, // 221 - new byte[] {0x37, 0x1e}, // 222 - new byte[] {0x37, 0x37}, // 223 - new byte[] {0x15, 0x15}, // 224 - new byte[] {0x37, 0x48}, // 225 - new byte[] {0x21, 0x0b}, // 226 - new byte[] {0x33, 0x05}, // 227 - new byte[] {0x30, 0x12}, // 228 - new byte[] {0x30, 0x12}, // 229 - new byte[] {0x21, 0x21}, // 230 - new byte[] {0x35, 0x35}, // 231 - new byte[] {0x05, 0x05}, // 232 - new byte[] {0x24, 0x24}, // 233 - new byte[] {0x16, 0x16}, // 234 - new byte[] {0x14, 0x14}, // 235 - new byte[] {0x3e, 0x3e}, // 236 - new byte[] {0x16, 0x16}, // 237 - new byte[] {0x0c, 0x0c}, // 238 - new byte[] {0x09, 0x09}, // 239 - new byte[] {0x31, 0x31}, // 240 - new byte[] {0x2f, 0x2f}, // 241 - new byte[] {0x1e, 0x20}, // 242 - new byte[] {0x2e, 0x2e}, // 243 - new byte[] {0x2e, 0x2e}, // 244 - new byte[] {0x2e, 0x2e}, // 245 - new byte[] {0x3e, 0x3e}, // 246 - new byte[] {0x3d, 0x3d}, // 247 - new byte[] {0x2d, 0x2d}, // 248 - new byte[] {0x2e, 0x2e}, // 249 - new byte[] {0x2e, 0x2e}, // 250 - new byte[] {0x1e, 0x1e}, // 251 - new byte[] {0x41, 0x41}, // 252 - new byte[] {0x41, 0x41}, // 253 - new byte[] {0x41, 0x41}, // 254 - new byte[] {0x42, 0x42}, // 255 - new byte[] {0x42, 0x42}, // 256 - new byte[] {0x42, 0x42}, // 257 - new byte[] {0x43, 0x43}, // 258 - new byte[] {0x43, 0x43}, // 259 - new byte[] {0x43, 0x43}, // 260 - new byte[] {0x32, 0x32}, // 261 - new byte[] {0x16, 0x16}, // 262 - new byte[] {0x35, 0x35}, // 263 - new byte[] {0x35, 0x35}, // 264 - new byte[] {0x13, 0x13}, // 265 - new byte[] {0x3d, 0x3d}, // 266 - new byte[] {0x44, 0x44}, // 267 - new byte[] {0x3d, 0x3d}, // 268 - new byte[] {0x13, 0x13}, // 269 - new byte[] {0x21, 0x2c}, // 270 - new byte[] {0x21, 0x2c}, // 271 - new byte[] {0x21, 0x2c}, // 272 - new byte[] {0x22, 0x30}, // 273 - new byte[] {0x22, 0x30}, // 274 - new byte[] {0x22, 0x30}, // 275 - new byte[] {0x3e, 0x3e}, // 276 - new byte[] {0x3e, 0x3e}, // 277 - new byte[] {0x33, 0x33}, // 278 - new byte[] {0x33, 0x33}, // 279 - new byte[] {0x1c, 0x24}, // 280 - new byte[] {0x1c, 0x24}, // 281 - new byte[] {0x1c, 0x24}, // 282 - new byte[] {0x21, 0x21}, // 283 - new byte[] {0x16, 0x16}, // 284 - new byte[] {0x1b, 0x1b}, // 285 - new byte[] {0x1b, 0x1b}, // 286 - new byte[] {0x36, 0x36}, // 287 - new byte[] {0x48, 0x48}, // 288 - new byte[] {0x36, 0x36}, // 289 - new byte[] {0x0e, 0x0e}, // 290 - new byte[] {0x03, 0x03}, // 291 - new byte[] {0x19, 0x19}, // 292 - new byte[] {0x2b, 0x2b}, // 293 - new byte[] {0x2b, 0x2b}, // 294 - new byte[] {0x2b, 0x2b}, // 295 - new byte[] {0x2f, 0x3e}, // 296 - new byte[] {0x2f, 0x3e}, // 297 - new byte[] {0x2f, 0x3e}, // 298 - new byte[] {0x05, 0x2a}, // 299 - new byte[] {0x38, 0x38}, // 300 - new byte[] {0x38, 0x38}, // 301 - new byte[] {0x33, 0x33}, // 302 - new byte[] {0x34, 0x16}, // 303 - new byte[] {0x45, 0x05}, // 304 - new byte[] {0x45, 0x05}, // 305 - new byte[] {0x45, 0x05}, // 306 - new byte[] {0x4a, 0x4a}, // 307 - new byte[] {0x4a, 0x4a}, // 308 - new byte[] {0x09, 0x1f}, // 309 - new byte[] {0x09, 0x1f}, // 310 - new byte[] {0x39, 0x39}, // 311 - new byte[] {0x3a, 0x3a}, // 312 - new byte[] {0x23, 0x44}, // 313 - new byte[] {0x0c, 0x0c}, // 314 - new byte[] {0x1e, 0x26}, // 315 - new byte[] {0x40, 0x3c}, // 316 - new byte[] {0x40, 0x3c}, // 317 - new byte[] {0x18, 0x18}, // 318 - new byte[] {0x18, 0x18}, // 319 - new byte[] {0x29, 0x0c}, // 320 - new byte[] {0x29, 0x0c}, // 321 - new byte[] {0x0c, 0x0c}, // 322 - new byte[] {0x28, 0x28}, // 323 - new byte[] {0x49, 0x49}, // 324 - new byte[] {0x2f, 0x14}, // 325 - new byte[] {0x2f, 0x14}, // 326 - new byte[] {0x14, 0x14}, // 327 - new byte[] {0x34, 0x47}, // 328 - new byte[] {0x1a, 0x1a}, // 329 - new byte[] {0x1a, 0x1a}, // 330 - new byte[] {0x08, 0x08}, // 331 - new byte[] {0x08, 0x08}, // 332 - new byte[] {0x1e, 0x1e}, // 333 - new byte[] {0x1e, 0x1e}, // 334 - new byte[] {0x11, 0x11}, // 335 - new byte[] {0x3d, 0x3d}, // 336 - new byte[] {0x1a, 0x1a}, // 337 - new byte[] {0x1a, 0x1a}, // 338 - new byte[] {0x0c, 0x0c}, // 339 - new byte[] {0x0c, 0x0c}, // 340 - new byte[] {0x34, 0x4b}, // 341 - new byte[] {0x34, 0x4b}, // 342 - new byte[] {0x1a, 0x1a}, // 343 - new byte[] {0x1a, 0x1a}, // 344 - new byte[] {0x15, 0x15}, // 345 - new byte[] {0x15, 0x15}, // 346 - new byte[] {0x04, 0x04}, // 347 - new byte[] {0x04, 0x04}, // 348 - new byte[] {0x21, 0x21}, // 349 - new byte[] {0x3f, 0x3f}, // 350 - new byte[] {0x3b, 0x3b}, // 351 - new byte[] {0x10, 0x10}, // 352 - new byte[] {0x0f, 0x0f}, // 353 - new byte[] {0x0f, 0x0f}, // 354 - new byte[] {0x1a, 0x1a}, // 355 - new byte[] {0x2e, 0x2e}, // 356 - new byte[] {0x22, 0x22}, // 357 - new byte[] {0x1a, 0x1a}, // 358 - new byte[] {0x2e, 0x2e}, // 359 - new byte[] {0x17, 0x17}, // 360 - new byte[] {0x27, 0x27}, // 361 - new byte[] {0x27, 0x27}, // 362 - new byte[] {0x2f, 0x2f}, // 363 - new byte[] {0x2f, 0x2f}, // 364 - new byte[] {0x2f, 0x2f}, // 365 - new byte[] {0x4b, 0x4b}, // 366 - new byte[] {0x21, 0x21}, // 367 - new byte[] {0x21, 0x21}, // 368 - new byte[] {0x21, 0x45}, // 369 - new byte[] {0x21, 0x21}, // 370 - new byte[] {0x45, 0x45}, // 371 - new byte[] {0x45, 0x45}, // 372 - new byte[] {0x16, 0x16}, // 373 - new byte[] {0x1d, 0x1d}, // 374 - new byte[] {0x1d, 0x1d}, // 375 - new byte[] {0x1d, 0x1d}, // 376 - new byte[] {0x1d, 0x1d}, // 377 - new byte[] {0x1d, 0x1d}, // 378 - new byte[] {0x1d, 0x1d}, // 379 - new byte[] {0x1a, 0x1a}, // 380 - new byte[] {0x1a, 0x1a}, // 381 - new byte[] {0x02, 0x02}, // 382 - new byte[] {0x46, 0x46}, // 383 - new byte[] {0x4d, 0x4d}, // 384 - new byte[] {0x20, 0x20}, // 385 - new byte[] {0x2e, 0x2e}, // 386 - }; - #endregion #region Gen 3/4 Character Tables (Val->Unicode) diff --git a/PKM/ShowdownSet.cs b/PKM/ShowdownSet.cs index 376791544..21f69fa25 100644 --- a/PKM/ShowdownSet.cs +++ b/PKM/ShowdownSet.cs @@ -207,7 +207,7 @@ namespace PKHeX // First Line: Name, Nickname, Gender, Item string result = string.Format(species[Species] != Nickname ? "{0} ({1})" : "{1}", Nickname, - species[Species] + ((Form ?? "") != "" ? "-" + Form.Replace("Mega ", "Mega-") : "")) // Species (& Form if necessary) + species[Species] + ((Form ?? "") != "" ? "-" + Form?.Replace("Mega ", "Mega-") : "")) // Species (& Form if necessary) + Gender + (Item != 0 ? " @ " + items[Item] : "") + Environment.NewLine; // IVs diff --git a/PersonalInfo/PersonalInfo.cs b/PersonalInfo/PersonalInfo.cs index 290125dfd..10e76c4f1 100644 --- a/PersonalInfo/PersonalInfo.cs +++ b/PersonalInfo/PersonalInfo.cs @@ -1,28 +1,7 @@ -using System; - -namespace PKHeX +namespace PKHeX { public abstract class PersonalInfo { - internal static readonly PersonalInfo[] AO = getArray(Properties.Resources.personal_ao, GameVersion.ORAS); - internal static readonly PersonalInfo[] XY = getArray(Properties.Resources.personal_xy, GameVersion.XY); - internal static readonly PersonalInfo[] B2W2 = getArray(Properties.Resources.personal_b2w2, GameVersion.B2W2); - internal static readonly PersonalInfo[] BW = getArray(Properties.Resources.personal_bw, GameVersion.BW); - internal static readonly PersonalInfo[] HGSS = getArray(Properties.Resources.personal_hgss, GameVersion.HGSS); - internal static readonly PersonalInfo[] Pt = getArray(Properties.Resources.personal_pt, GameVersion.Pt); - internal static readonly PersonalInfo[] DP = getArray(Properties.Resources.personal_dp, GameVersion.DP); - internal static readonly PersonalInfo[] LG = getArray(Properties.Resources.personal_lg, GameVersion.LG); - internal static readonly PersonalInfo[] FR = getArray(Properties.Resources.personal_fr, GameVersion.FR); - internal static readonly PersonalInfo[] E = getArray(Properties.Resources.personal_e, GameVersion.E); - internal static readonly PersonalInfo[] RS = getArray(Properties.Resources.personal_rs, GameVersion.RS); - - protected const int SIZE_G3 = 0x1C; - protected const int SIZE_G4 = 0x2C; - protected const int SIZE_BW = 0x3C; - protected const int SIZE_B2W2 = 0x4C; - protected const int SIZE_XY = 0x40; - protected const int SIZE_AO = 0x50; - protected byte[] Data; public abstract byte[] Write(); public abstract int HP { get; set; } @@ -108,76 +87,5 @@ namespace PKHeX } public bool HasFormes => FormeCount > 1; public int BST => HP + ATK + DEF + SPE + SPA + SPD; - - // Array Retrieval - internal static PersonalInfo[] getArray(byte[] data, GameVersion format) - { - int size = 0; - switch (format) - { - case GameVersion.RS: - case GameVersion.E: - case GameVersion.FR: - case GameVersion.LG: size = SIZE_G3; break; - case GameVersion.DP: - case GameVersion.Pt: - case GameVersion.HGSS: size = SIZE_G4; break; - case GameVersion.BW: size = SIZE_BW; break; - case GameVersion.B2W2: size = SIZE_B2W2; break; - case GameVersion.XY: size = SIZE_XY; break; - case GameVersion.ORAS: size = SIZE_AO; break; - } - - if (size == 0) - return null; - - byte[][] entries = splitBytes(data, size); - PersonalInfo[] d = new PersonalInfo[data.Length / size]; - - switch (format) - { - case GameVersion.RS: - case GameVersion.E: - case GameVersion.FR: - case GameVersion.LG: - Array.Resize(ref d, 387); - for (int i = 0; i < d.Length; i++) // entries are not in order of natdexID - d[i] = new PersonalInfoG3(entries[PKX.getG3Species(i)]); - break; - case GameVersion.DP: - case GameVersion.Pt: - case GameVersion.HGSS: - for (int i = 0; i < d.Length; i++) - d[i] = new PersonalInfoG4(entries[i]); - break; - case GameVersion.BW: - for (int i = 0; i < d.Length; i++) - d[i] = new PersonalInfoBW(entries[i]); - break; - case GameVersion.B2W2: - for (int i = 0; i < d.Length; i++) - d[i] = new PersonalInfoB2W2(entries[i]); - break; - case GameVersion.XY: - for (int i = 0; i < d.Length; i++) - d[i] = new PersonalInfoXY(entries[i]); - break; - case GameVersion.ORAS: - for (int i = 0; i < d.Length; i++) - d[i] = new PersonalInfoORAS(entries[i]); - break; - } - return d; - } - private static byte[][] splitBytes(byte[] data, int size) - { - byte[][] r = new byte[data.Length/size][]; - for (int i = 0; i < data.Length; i += size) - { - r[i/size] = new byte[size]; - Array.Copy(data, i, r[i/size], 0, size); - } - return r; - } } } diff --git a/PersonalInfo/PersonalInfoB2W2.cs b/PersonalInfo/PersonalInfoB2W2.cs index a080f2920..c3659ac0c 100644 --- a/PersonalInfo/PersonalInfoB2W2.cs +++ b/PersonalInfo/PersonalInfoB2W2.cs @@ -4,9 +4,10 @@ namespace PKHeX { public class PersonalInfoB2W2 : PersonalInfoBW { + public new const int SIZE = 0x4C; public PersonalInfoB2W2(byte[] data) { - if (data.Length != SIZE_B2W2) + if (data.Length != SIZE) return; Data = data; diff --git a/PersonalInfo/PersonalInfoBW.cs b/PersonalInfo/PersonalInfoBW.cs index a14469263..7f26bb365 100644 --- a/PersonalInfo/PersonalInfoBW.cs +++ b/PersonalInfo/PersonalInfoBW.cs @@ -6,9 +6,10 @@ namespace PKHeX public class PersonalInfoBW : PersonalInfo { protected PersonalInfoBW() { } + public const int SIZE = 0x3C; public PersonalInfoBW(byte[] data) { - if (data.Length != SIZE_BW) + if (data.Length != SIZE) return; Data = data; diff --git a/PersonalInfo/PersonalInfoG3.cs b/PersonalInfo/PersonalInfoG3.cs index fdcdd4980..04f8248b4 100644 --- a/PersonalInfo/PersonalInfoG3.cs +++ b/PersonalInfo/PersonalInfoG3.cs @@ -5,9 +5,10 @@ namespace PKHeX public class PersonalInfoG3 : PersonalInfo { protected PersonalInfoG3() { } + public const int SIZE = 0x1C; public PersonalInfoG3(byte[] data) { - if (data.Length != SIZE_G3) + if (data.Length != SIZE) return; Data = data; diff --git a/PersonalInfo/PersonalInfoG4.cs b/PersonalInfo/PersonalInfoG4.cs index 585690bec..3b573bcd6 100644 --- a/PersonalInfo/PersonalInfoG4.cs +++ b/PersonalInfo/PersonalInfoG4.cs @@ -1,12 +1,14 @@ -using System.Linq; +using System; +using System.Linq; namespace PKHeX { public class PersonalInfoG4 : PersonalInfoG3 { + public new const int SIZE = 0x2C; public PersonalInfoG4(byte[] data) { - if (data.Length != SIZE_G4) + if (data.Length != SIZE) return; Data = data; @@ -20,5 +22,9 @@ namespace PKHeX // setBits(TypeTutors).CopyTo(Data, 0x38); return Data; } + + // Manually added attributes + public override int FormeCount { get { return Data[0x29]; } set {} } + protected override int FormStatsIndex { get { return BitConverter.ToUInt16(Data, 0x2A); } set {} } } } diff --git a/PersonalInfo/PersonalInfoORAS.cs b/PersonalInfo/PersonalInfoORAS.cs index b71d8b218..8d398f681 100644 --- a/PersonalInfo/PersonalInfoORAS.cs +++ b/PersonalInfo/PersonalInfoORAS.cs @@ -4,9 +4,10 @@ namespace PKHeX { public class PersonalInfoORAS : PersonalInfoXY { + public new const int SIZE = 0x50; public PersonalInfoORAS(byte[] data) { - if (data.Length != SIZE_AO) + if (data.Length != SIZE) return; Data = data; diff --git a/PersonalInfo/PersonalInfoXY.cs b/PersonalInfo/PersonalInfoXY.cs index b662245d0..5ddc07fc1 100644 --- a/PersonalInfo/PersonalInfoXY.cs +++ b/PersonalInfo/PersonalInfoXY.cs @@ -5,9 +5,10 @@ namespace PKHeX public class PersonalInfoXY : PersonalInfoBW { protected PersonalInfoXY() { } // For ORAS + public new const int SIZE = 0x40; public PersonalInfoXY(byte[] data) { - if (data.Length != SIZE_XY) + if (data.Length != SIZE) return; Data = data; diff --git a/PersonalInfo/PersonalTable.cs b/PersonalInfo/PersonalTable.cs new file mode 100644 index 000000000..59d877243 --- /dev/null +++ b/PersonalInfo/PersonalTable.cs @@ -0,0 +1,113 @@ +using System; + +namespace PKHeX +{ + public class PersonalTable + { + internal static readonly PersonalTable AO = new PersonalTable(Properties.Resources.personal_ao, GameVersion.ORAS); + internal static readonly PersonalTable XY = new PersonalTable(Properties.Resources.personal_xy, GameVersion.XY); + internal static readonly PersonalTable B2W2 = new PersonalTable(Properties.Resources.personal_b2w2, GameVersion.B2W2); + internal static readonly PersonalTable BW = new PersonalTable(Properties.Resources.personal_bw, GameVersion.BW); + internal static readonly PersonalTable HGSS = new PersonalTable(Properties.Resources.personal_hgss, GameVersion.HGSS); + internal static readonly PersonalTable Pt = new PersonalTable(Properties.Resources.personal_pt, GameVersion.Pt); + internal static readonly PersonalTable DP = new PersonalTable(Properties.Resources.personal_dp, GameVersion.DP); + internal static readonly PersonalTable LG = new PersonalTable(Properties.Resources.personal_lg, GameVersion.LG); + internal static readonly PersonalTable FR = new PersonalTable(Properties.Resources.personal_fr, GameVersion.FR); + internal static readonly PersonalTable E = new PersonalTable(Properties.Resources.personal_e, GameVersion.E); + internal static readonly PersonalTable RS = new PersonalTable(Properties.Resources.personal_rs, GameVersion.RS); + + private static byte[][] splitBytes(byte[] data, int size) + { + byte[][] r = new byte[data.Length / size][]; + for (int i = 0; i < data.Length; i += size) + { + r[i / size] = new byte[size]; + Array.Copy(data, i, r[i / size], 0, size); + } + return r; + } + private PersonalTable(byte[] data, GameVersion format) + { + int size = 0; + switch (format) + { + case GameVersion.RS: + case GameVersion.E: + case GameVersion.FR: + case GameVersion.LG: size = PersonalInfoG3.SIZE; break; + case GameVersion.DP: + case GameVersion.Pt: + case GameVersion.HGSS: size = PersonalInfoG4.SIZE; break; + case GameVersion.BW: size = PersonalInfoBW.SIZE; break; + case GameVersion.B2W2: size = PersonalInfoB2W2.SIZE; break; + case GameVersion.XY: size = PersonalInfoXY.SIZE; break; + case GameVersion.ORAS: size = PersonalInfoORAS.SIZE; break; + } + + if (size == 0) + { Table = null; return; } + + byte[][] entries = splitBytes(data, size); + PersonalInfo[] d = new PersonalInfo[data.Length / size]; + + switch (format) + { + case GameVersion.RS: + case GameVersion.E: + case GameVersion.FR: + case GameVersion.LG: + Array.Resize(ref d, 387); + for (int i = 0; i < d.Length; i++) // entries are not in order of natdexID + d[i] = new PersonalInfoG3(entries[PKX.getG3Species(i)]); + break; + case GameVersion.DP: + case GameVersion.Pt: + case GameVersion.HGSS: + for (int i = 0; i < d.Length; i++) + d[i] = new PersonalInfoG4(entries[i]); + break; + case GameVersion.BW: + for (int i = 0; i < d.Length; i++) + d[i] = new PersonalInfoBW(entries[i]); + break; + case GameVersion.B2W2: + for (int i = 0; i < d.Length; i++) + d[i] = new PersonalInfoB2W2(entries[i]); + break; + case GameVersion.XY: + for (int i = 0; i < d.Length; i++) + d[i] = new PersonalInfoXY(entries[i]); + break; + case GameVersion.ORAS: + for (int i = 0; i < d.Length; i++) + d[i] = new PersonalInfoORAS(entries[i]); + break; + } + Table = d; + } + + private readonly PersonalInfo[] Table; + public PersonalInfo this[int index] + { + get { return Table[index]; } + set { Table[index] = value; } + } + + public int[] getAbilities(int species, int forme) + { + if (species >= Table.Length) + { species = 0; Console.WriteLine("Requested out of bounds SpeciesID"); } + return this[getFormeIndex(species, forme)].Abilities; + } + public int getFormeIndex(int species, int forme) + { + if (species >= Table.Length) + { species = 0; Console.WriteLine("Requested out of bounds SpeciesID"); } + return this[species].FormeIndex(species, forme); + } + public PersonalInfo getFormeEntry(int species, int forme) + { + return this[getFormeIndex(species, forme)]; + } + } +} diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index f25c54622..131bc6ca5 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -9313,9 +9313,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp01 { + internal static System.Drawing.Bitmap box_wp01bw { get { - object obj = ResourceManager.GetObject("box_wp01", resourceCulture); + object obj = ResourceManager.GetObject("box_wp01bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9323,9 +9323,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp02 { + internal static System.Drawing.Bitmap box_wp01dp { get { - object obj = ResourceManager.GetObject("box_wp02", resourceCulture); + object obj = ResourceManager.GetObject("box_wp01dp", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9333,9 +9333,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp03 { + internal static System.Drawing.Bitmap box_wp01e { get { - object obj = ResourceManager.GetObject("box_wp03", resourceCulture); + object obj = ResourceManager.GetObject("box_wp01e", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9343,9 +9343,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp04 { + internal static System.Drawing.Bitmap box_wp01rs { get { - object obj = ResourceManager.GetObject("box_wp04", resourceCulture); + object obj = ResourceManager.GetObject("box_wp01rs", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9353,9 +9353,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp05 { + internal static System.Drawing.Bitmap box_wp01xy { get { - object obj = ResourceManager.GetObject("box_wp05", resourceCulture); + object obj = ResourceManager.GetObject("box_wp01xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9363,9 +9363,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp06 { + internal static System.Drawing.Bitmap box_wp02bw { get { - object obj = ResourceManager.GetObject("box_wp06", resourceCulture); + object obj = ResourceManager.GetObject("box_wp02bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9373,9 +9373,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp07 { + internal static System.Drawing.Bitmap box_wp02dp { get { - object obj = ResourceManager.GetObject("box_wp07", resourceCulture); + object obj = ResourceManager.GetObject("box_wp02dp", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9383,9 +9383,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp08 { + internal static System.Drawing.Bitmap box_wp02e { get { - object obj = ResourceManager.GetObject("box_wp08", resourceCulture); + object obj = ResourceManager.GetObject("box_wp02e", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9393,9 +9393,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp09 { + internal static System.Drawing.Bitmap box_wp02rs { get { - object obj = ResourceManager.GetObject("box_wp09", resourceCulture); + object obj = ResourceManager.GetObject("box_wp02rs", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9403,9 +9403,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp10 { + internal static System.Drawing.Bitmap box_wp02xy { get { - object obj = ResourceManager.GetObject("box_wp10", resourceCulture); + object obj = ResourceManager.GetObject("box_wp02xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9413,9 +9413,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp11 { + internal static System.Drawing.Bitmap box_wp03bw { get { - object obj = ResourceManager.GetObject("box_wp11", resourceCulture); + object obj = ResourceManager.GetObject("box_wp03bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9423,9 +9423,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp12 { + internal static System.Drawing.Bitmap box_wp03dp { get { - object obj = ResourceManager.GetObject("box_wp12", resourceCulture); + object obj = ResourceManager.GetObject("box_wp03dp", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9433,9 +9433,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp13 { + internal static System.Drawing.Bitmap box_wp03e { get { - object obj = ResourceManager.GetObject("box_wp13", resourceCulture); + object obj = ResourceManager.GetObject("box_wp03e", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9443,9 +9443,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp14 { + internal static System.Drawing.Bitmap box_wp03rs { get { - object obj = ResourceManager.GetObject("box_wp14", resourceCulture); + object obj = ResourceManager.GetObject("box_wp03rs", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9453,9 +9453,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp15 { + internal static System.Drawing.Bitmap box_wp03xy { get { - object obj = ResourceManager.GetObject("box_wp15", resourceCulture); + object obj = ResourceManager.GetObject("box_wp03xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9463,9 +9463,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp16 { + internal static System.Drawing.Bitmap box_wp04bw { get { - object obj = ResourceManager.GetObject("box_wp16", resourceCulture); + object obj = ResourceManager.GetObject("box_wp04bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9473,9 +9473,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp17 { + internal static System.Drawing.Bitmap box_wp04dp { get { - object obj = ResourceManager.GetObject("box_wp17", resourceCulture); + object obj = ResourceManager.GetObject("box_wp04dp", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9483,9 +9483,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp17o { + internal static System.Drawing.Bitmap box_wp04e { get { - object obj = ResourceManager.GetObject("box_wp17o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp04e", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9493,9 +9493,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp18 { + internal static System.Drawing.Bitmap box_wp04rs { get { - object obj = ResourceManager.GetObject("box_wp18", resourceCulture); + object obj = ResourceManager.GetObject("box_wp04rs", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9503,9 +9503,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp18o { + internal static System.Drawing.Bitmap box_wp04xy { get { - object obj = ResourceManager.GetObject("box_wp18o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp04xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9513,9 +9513,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp19 { + internal static System.Drawing.Bitmap box_wp05bw { get { - object obj = ResourceManager.GetObject("box_wp19", resourceCulture); + object obj = ResourceManager.GetObject("box_wp05bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9523,9 +9523,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp19o { + internal static System.Drawing.Bitmap box_wp05dp { get { - object obj = ResourceManager.GetObject("box_wp19o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp05dp", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9533,9 +9533,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp20 { + internal static System.Drawing.Bitmap box_wp05e { get { - object obj = ResourceManager.GetObject("box_wp20", resourceCulture); + object obj = ResourceManager.GetObject("box_wp05e", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9543,9 +9543,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp20o { + internal static System.Drawing.Bitmap box_wp05rs { get { - object obj = ResourceManager.GetObject("box_wp20o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp05rs", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9553,9 +9553,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp21 { + internal static System.Drawing.Bitmap box_wp05xy { get { - object obj = ResourceManager.GetObject("box_wp21", resourceCulture); + object obj = ResourceManager.GetObject("box_wp05xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9563,9 +9563,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp21o { + internal static System.Drawing.Bitmap box_wp06bw { get { - object obj = ResourceManager.GetObject("box_wp21o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp06bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9573,9 +9573,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp22 { + internal static System.Drawing.Bitmap box_wp06dp { get { - object obj = ResourceManager.GetObject("box_wp22", resourceCulture); + object obj = ResourceManager.GetObject("box_wp06dp", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9583,9 +9583,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp22o { + internal static System.Drawing.Bitmap box_wp06e { get { - object obj = ResourceManager.GetObject("box_wp22o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp06e", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9593,9 +9593,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp23 { + internal static System.Drawing.Bitmap box_wp06rs { get { - object obj = ResourceManager.GetObject("box_wp23", resourceCulture); + object obj = ResourceManager.GetObject("box_wp06rs", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9603,9 +9603,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp23o { + internal static System.Drawing.Bitmap box_wp06xy { get { - object obj = ResourceManager.GetObject("box_wp23o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp06xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9613,9 +9613,9 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp24 { + internal static System.Drawing.Bitmap box_wp07bw { get { - object obj = ResourceManager.GetObject("box_wp24", resourceCulture); + object obj = ResourceManager.GetObject("box_wp07bw", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -9623,9 +9623,1089 @@ namespace PKHeX.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap box_wp24o { + internal static System.Drawing.Bitmap box_wp07dp { get { - object obj = ResourceManager.GetObject("box_wp24o", resourceCulture); + object obj = ResourceManager.GetObject("box_wp07dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp07e { + get { + object obj = ResourceManager.GetObject("box_wp07e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp07rs { + get { + object obj = ResourceManager.GetObject("box_wp07rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp07xy { + get { + object obj = ResourceManager.GetObject("box_wp07xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp08bw { + get { + object obj = ResourceManager.GetObject("box_wp08bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp08dp { + get { + object obj = ResourceManager.GetObject("box_wp08dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp08e { + get { + object obj = ResourceManager.GetObject("box_wp08e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp08rs { + get { + object obj = ResourceManager.GetObject("box_wp08rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp08xy { + get { + object obj = ResourceManager.GetObject("box_wp08xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp09bw { + get { + object obj = ResourceManager.GetObject("box_wp09bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp09dp { + get { + object obj = ResourceManager.GetObject("box_wp09dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp09e { + get { + object obj = ResourceManager.GetObject("box_wp09e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp09rs { + get { + object obj = ResourceManager.GetObject("box_wp09rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp09xy { + get { + object obj = ResourceManager.GetObject("box_wp09xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp10bw { + get { + object obj = ResourceManager.GetObject("box_wp10bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp10dp { + get { + object obj = ResourceManager.GetObject("box_wp10dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp10e { + get { + object obj = ResourceManager.GetObject("box_wp10e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp10rs { + get { + object obj = ResourceManager.GetObject("box_wp10rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp10xy { + get { + object obj = ResourceManager.GetObject("box_wp10xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp11bw { + get { + object obj = ResourceManager.GetObject("box_wp11bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp11dp { + get { + object obj = ResourceManager.GetObject("box_wp11dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp11e { + get { + object obj = ResourceManager.GetObject("box_wp11e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp11rs { + get { + object obj = ResourceManager.GetObject("box_wp11rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp11xy { + get { + object obj = ResourceManager.GetObject("box_wp11xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp12bw { + get { + object obj = ResourceManager.GetObject("box_wp12bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp12dp { + get { + object obj = ResourceManager.GetObject("box_wp12dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp12e { + get { + object obj = ResourceManager.GetObject("box_wp12e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp12rs { + get { + object obj = ResourceManager.GetObject("box_wp12rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp12xy { + get { + object obj = ResourceManager.GetObject("box_wp12xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp13bw { + get { + object obj = ResourceManager.GetObject("box_wp13bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp13dp { + get { + object obj = ResourceManager.GetObject("box_wp13dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp13e { + get { + object obj = ResourceManager.GetObject("box_wp13e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp13frlg { + get { + object obj = ResourceManager.GetObject("box_wp13frlg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp13rs { + get { + object obj = ResourceManager.GetObject("box_wp13rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp13xy { + get { + object obj = ResourceManager.GetObject("box_wp13xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp14bw { + get { + object obj = ResourceManager.GetObject("box_wp14bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp14dp { + get { + object obj = ResourceManager.GetObject("box_wp14dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp14e { + get { + object obj = ResourceManager.GetObject("box_wp14e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp14frlg { + get { + object obj = ResourceManager.GetObject("box_wp14frlg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp14rs { + get { + object obj = ResourceManager.GetObject("box_wp14rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp14xy { + get { + object obj = ResourceManager.GetObject("box_wp14xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp15bw { + get { + object obj = ResourceManager.GetObject("box_wp15bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp15dp { + get { + object obj = ResourceManager.GetObject("box_wp15dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp15e { + get { + object obj = ResourceManager.GetObject("box_wp15e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp15frlg { + get { + object obj = ResourceManager.GetObject("box_wp15frlg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp15rs { + get { + object obj = ResourceManager.GetObject("box_wp15rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp15xy { + get { + object obj = ResourceManager.GetObject("box_wp15xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp16bw { + get { + object obj = ResourceManager.GetObject("box_wp16bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp16dp { + get { + object obj = ResourceManager.GetObject("box_wp16dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp16e { + get { + object obj = ResourceManager.GetObject("box_wp16e", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp16frlg { + get { + object obj = ResourceManager.GetObject("box_wp16frlg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp16rs { + get { + object obj = ResourceManager.GetObject("box_wp16rs", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp16xy { + get { + object obj = ResourceManager.GetObject("box_wp16xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17ao { + get { + object obj = ResourceManager.GetObject("box_wp17ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp17b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17bw { + get { + object obj = ResourceManager.GetObject("box_wp17bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17dp { + get { + object obj = ResourceManager.GetObject("box_wp17dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17hgss { + get { + object obj = ResourceManager.GetObject("box_wp17hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17pt { + get { + object obj = ResourceManager.GetObject("box_wp17pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp17xy { + get { + object obj = ResourceManager.GetObject("box_wp17xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18ao { + get { + object obj = ResourceManager.GetObject("box_wp18ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp18b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18bw { + get { + object obj = ResourceManager.GetObject("box_wp18bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18dp { + get { + object obj = ResourceManager.GetObject("box_wp18dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18hgss { + get { + object obj = ResourceManager.GetObject("box_wp18hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18pt { + get { + object obj = ResourceManager.GetObject("box_wp18pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp18xy { + get { + object obj = ResourceManager.GetObject("box_wp18xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19ao { + get { + object obj = ResourceManager.GetObject("box_wp19ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp19b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19bw { + get { + object obj = ResourceManager.GetObject("box_wp19bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19dp { + get { + object obj = ResourceManager.GetObject("box_wp19dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19hgss { + get { + object obj = ResourceManager.GetObject("box_wp19hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19pt { + get { + object obj = ResourceManager.GetObject("box_wp19pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp19xy { + get { + object obj = ResourceManager.GetObject("box_wp19xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20ao { + get { + object obj = ResourceManager.GetObject("box_wp20ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp20b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20bw { + get { + object obj = ResourceManager.GetObject("box_wp20bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20dp { + get { + object obj = ResourceManager.GetObject("box_wp20dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20hgss { + get { + object obj = ResourceManager.GetObject("box_wp20hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20pt { + get { + object obj = ResourceManager.GetObject("box_wp20pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp20xy { + get { + object obj = ResourceManager.GetObject("box_wp20xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21ao { + get { + object obj = ResourceManager.GetObject("box_wp21ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp21b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21bw { + get { + object obj = ResourceManager.GetObject("box_wp21bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21dp { + get { + object obj = ResourceManager.GetObject("box_wp21dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21hgss { + get { + object obj = ResourceManager.GetObject("box_wp21hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21pt { + get { + object obj = ResourceManager.GetObject("box_wp21pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp21xy { + get { + object obj = ResourceManager.GetObject("box_wp21xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22ao { + get { + object obj = ResourceManager.GetObject("box_wp22ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp22b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22bw { + get { + object obj = ResourceManager.GetObject("box_wp22bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22dp { + get { + object obj = ResourceManager.GetObject("box_wp22dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22hgss { + get { + object obj = ResourceManager.GetObject("box_wp22hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22pt { + get { + object obj = ResourceManager.GetObject("box_wp22pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp22xy { + get { + object obj = ResourceManager.GetObject("box_wp22xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23ao { + get { + object obj = ResourceManager.GetObject("box_wp23ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp23b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23bw { + get { + object obj = ResourceManager.GetObject("box_wp23bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23dp { + get { + object obj = ResourceManager.GetObject("box_wp23dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23hgss { + get { + object obj = ResourceManager.GetObject("box_wp23hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23pt { + get { + object obj = ResourceManager.GetObject("box_wp23pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp23xy { + get { + object obj = ResourceManager.GetObject("box_wp23xy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24ao { + get { + object obj = ResourceManager.GetObject("box_wp24ao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24b2w2 { + get { + object obj = ResourceManager.GetObject("box_wp24b2w2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24bw { + get { + object obj = ResourceManager.GetObject("box_wp24bw", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24dp { + get { + object obj = ResourceManager.GetObject("box_wp24dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24hgss { + get { + object obj = ResourceManager.GetObject("box_wp24hgss", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24pt { + get { + object obj = ResourceManager.GetObject("box_wp24pt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap box_wp24xy { + get { + object obj = ResourceManager.GetObject("box_wp24xy", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -15570,6 +16650,16 @@ namespace PKHeX.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap slotDel1 { + get { + object obj = ResourceManager.GetObject("slotDel1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -15580,6 +16670,16 @@ namespace PKHeX.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap slotSet1 { + get { + object obj = ResourceManager.GetObject("slotSet1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -15590,6 +16690,16 @@ namespace PKHeX.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap slotTrans1 { + get { + object obj = ResourceManager.GetObject("slotTrans1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -15600,6 +16710,16 @@ namespace PKHeX.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap slotView1 { + get { + object obj = ResourceManager.GetObject("slotView1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized string similar to Subregion ID,JP,EN,FR,DE,IT,ES,ZH,KO ///000,—,—,—,—,—,—,—,— diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 7e1d76c9a..da26da620 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -2830,78 +2830,6 @@ ..\Resources\img\misc\party.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\img\box\box_wp01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp02.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp03.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp04.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp05.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp06.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp07.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp08.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp09.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp10.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp12.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp13.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp14.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp15.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp17.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp18.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp19.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp20.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp21.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp22.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp23.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\img\item\item_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -4204,30 +4132,6 @@ ..\Resources\img\Pokemon Sprites\80-1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\img\box\box_wp17o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp18o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp19o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp20o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp21o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp22o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp23o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\img\box\box_wp24o.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\img\Pokemon Sprites\25-1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -6046,4 +5950,436 @@ ..\Resources\text\gen3\text_rsefrlg_00000_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + + ..\Resources\img\box\bw\box_wp01bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp01dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp01e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp01rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp01xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp02bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp02dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp02e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp02rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp02xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp03bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp03dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp03e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp03rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp03xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp04bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp04dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp04e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp04rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp04xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp05bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp05dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp05e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp05rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp05xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp06bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp06dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp06e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp06rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp06xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp07bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp07dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp07e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp07rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp07xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp08bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp08dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp08e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp08rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp08xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp09bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp09dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp09e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp09rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp09xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp10bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp10dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp10e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp10rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp10xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp11bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp11dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp11e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp11rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp11xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp12bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp12dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp12e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp12rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp12xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp13bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp13dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp13e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\frlg\box_wp13frlg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp13rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp13xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp14bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp14dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp14e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\frlg\box_wp14frlg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp14rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp14xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp15bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp15dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp15e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\frlg\box_wp15frlg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp15rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp15xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp16bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp16dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\e\box_wp16e.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\frlg\box_wp16frlg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\rs\box_wp16rs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp16xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp17ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp17b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp17bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp17dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp17hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp17pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp17xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp18ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp18b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp18bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp18dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp18hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp18pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp18xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp19ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp19b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp19bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp19dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp19hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp19pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp19xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp20ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp20b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp20bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp20dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp20hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp20pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp20xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp21ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp21b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp21bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp21dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp21hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp21pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp21xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp22ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp22b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp22bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp22dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp22hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp22pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp22xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp23ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp23b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp23bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp23dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp23hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp23pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp23xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\ao\box_wp24ao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\b2w2\box_wp24b2w2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\bw\box_wp24bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\dp\box_wp24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\hgss\box_wp24hgss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\pt\box_wp24pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\xy\box_wp24xy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\slotDel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\slotSet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\slotTrans.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\img\box\slotView.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Resources/byte/personal_dp b/Resources/byte/personal_dp index 359024ada..48373cc00 100644 Binary files a/Resources/byte/personal_dp and b/Resources/byte/personal_dp differ diff --git a/Resources/byte/personal_hgss b/Resources/byte/personal_hgss index c69332d50..c0a9df7fa 100644 Binary files a/Resources/byte/personal_hgss and b/Resources/byte/personal_hgss differ diff --git a/Resources/byte/personal_pt b/Resources/byte/personal_pt index 47154a84f..c16af449e 100644 Binary files a/Resources/byte/personal_pt and b/Resources/byte/personal_pt differ diff --git a/Resources/byte/wc6.pkl b/Resources/byte/wc6.pkl index 03b4e7e60..e14324646 100644 Binary files a/Resources/byte/wc6.pkl and b/Resources/byte/wc6.pkl differ diff --git a/Resources/byte/wc6full.pkl b/Resources/byte/wc6full.pkl index c6b1fd53a..82d99627b 100644 Binary files a/Resources/byte/wc6full.pkl and b/Resources/byte/wc6full.pkl differ diff --git a/Resources/img/box/box_wp17o.png b/Resources/img/box/ao/box_wp17ao.png similarity index 100% rename from Resources/img/box/box_wp17o.png rename to Resources/img/box/ao/box_wp17ao.png diff --git a/Resources/img/box/box_wp18o.png b/Resources/img/box/ao/box_wp18ao.png similarity index 100% rename from Resources/img/box/box_wp18o.png rename to Resources/img/box/ao/box_wp18ao.png diff --git a/Resources/img/box/box_wp19o.png b/Resources/img/box/ao/box_wp19ao.png similarity index 100% rename from Resources/img/box/box_wp19o.png rename to Resources/img/box/ao/box_wp19ao.png diff --git a/Resources/img/box/box_wp20o.png b/Resources/img/box/ao/box_wp20ao.png similarity index 100% rename from Resources/img/box/box_wp20o.png rename to Resources/img/box/ao/box_wp20ao.png diff --git a/Resources/img/box/box_wp21o.png b/Resources/img/box/ao/box_wp21ao.png similarity index 100% rename from Resources/img/box/box_wp21o.png rename to Resources/img/box/ao/box_wp21ao.png diff --git a/Resources/img/box/box_wp22o.png b/Resources/img/box/ao/box_wp22ao.png similarity index 100% rename from Resources/img/box/box_wp22o.png rename to Resources/img/box/ao/box_wp22ao.png diff --git a/Resources/img/box/box_wp23o.png b/Resources/img/box/ao/box_wp23ao.png similarity index 100% rename from Resources/img/box/box_wp23o.png rename to Resources/img/box/ao/box_wp23ao.png diff --git a/Resources/img/box/box_wp24o.png b/Resources/img/box/ao/box_wp24ao.png similarity index 100% rename from Resources/img/box/box_wp24o.png rename to Resources/img/box/ao/box_wp24ao.png diff --git a/Resources/img/box/b2w2/box_wp17b2w2.png b/Resources/img/box/b2w2/box_wp17b2w2.png new file mode 100644 index 000000000..8c9904c32 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp17b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp18b2w2.png b/Resources/img/box/b2w2/box_wp18b2w2.png new file mode 100644 index 000000000..ef9de9670 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp18b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp19b2w2.png b/Resources/img/box/b2w2/box_wp19b2w2.png new file mode 100644 index 000000000..cd136dc34 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp19b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp20b2w2.png b/Resources/img/box/b2w2/box_wp20b2w2.png new file mode 100644 index 000000000..f45fa34b6 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp20b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp21b2w2.png b/Resources/img/box/b2w2/box_wp21b2w2.png new file mode 100644 index 000000000..822ea66ae Binary files /dev/null and b/Resources/img/box/b2w2/box_wp21b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp22b2w2.png b/Resources/img/box/b2w2/box_wp22b2w2.png new file mode 100644 index 000000000..d455de3c6 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp22b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp23b2w2.png b/Resources/img/box/b2w2/box_wp23b2w2.png new file mode 100644 index 000000000..3b70fd587 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp23b2w2.png differ diff --git a/Resources/img/box/b2w2/box_wp24b2w2.png b/Resources/img/box/b2w2/box_wp24b2w2.png new file mode 100644 index 000000000..850b52895 Binary files /dev/null and b/Resources/img/box/b2w2/box_wp24b2w2.png differ diff --git a/Resources/img/box/bw/box_wp01bw.png b/Resources/img/box/bw/box_wp01bw.png new file mode 100644 index 000000000..eb0769dc6 Binary files /dev/null and b/Resources/img/box/bw/box_wp01bw.png differ diff --git a/Resources/img/box/bw/box_wp02bw.png b/Resources/img/box/bw/box_wp02bw.png new file mode 100644 index 000000000..15178f4a4 Binary files /dev/null and b/Resources/img/box/bw/box_wp02bw.png differ diff --git a/Resources/img/box/bw/box_wp03bw.png b/Resources/img/box/bw/box_wp03bw.png new file mode 100644 index 000000000..6083b1d4b Binary files /dev/null and b/Resources/img/box/bw/box_wp03bw.png differ diff --git a/Resources/img/box/bw/box_wp04bw.png b/Resources/img/box/bw/box_wp04bw.png new file mode 100644 index 000000000..4ff6a9a18 Binary files /dev/null and b/Resources/img/box/bw/box_wp04bw.png differ diff --git a/Resources/img/box/bw/box_wp05bw.png b/Resources/img/box/bw/box_wp05bw.png new file mode 100644 index 000000000..5a5ad29d2 Binary files /dev/null and b/Resources/img/box/bw/box_wp05bw.png differ diff --git a/Resources/img/box/bw/box_wp06bw.png b/Resources/img/box/bw/box_wp06bw.png new file mode 100644 index 000000000..d64e5a3a7 Binary files /dev/null and b/Resources/img/box/bw/box_wp06bw.png differ diff --git a/Resources/img/box/bw/box_wp07bw.png b/Resources/img/box/bw/box_wp07bw.png new file mode 100644 index 000000000..0f17dc19e Binary files /dev/null and b/Resources/img/box/bw/box_wp07bw.png differ diff --git a/Resources/img/box/bw/box_wp08bw.png b/Resources/img/box/bw/box_wp08bw.png new file mode 100644 index 000000000..a668a18ca Binary files /dev/null and b/Resources/img/box/bw/box_wp08bw.png differ diff --git a/Resources/img/box/bw/box_wp09bw.png b/Resources/img/box/bw/box_wp09bw.png new file mode 100644 index 000000000..9c479d569 Binary files /dev/null and b/Resources/img/box/bw/box_wp09bw.png differ diff --git a/Resources/img/box/bw/box_wp10bw.png b/Resources/img/box/bw/box_wp10bw.png new file mode 100644 index 000000000..3f18663fe Binary files /dev/null and b/Resources/img/box/bw/box_wp10bw.png differ diff --git a/Resources/img/box/bw/box_wp11bw.png b/Resources/img/box/bw/box_wp11bw.png new file mode 100644 index 000000000..0b5b5acee Binary files /dev/null and b/Resources/img/box/bw/box_wp11bw.png differ diff --git a/Resources/img/box/bw/box_wp12bw.png b/Resources/img/box/bw/box_wp12bw.png new file mode 100644 index 000000000..5082da7ce Binary files /dev/null and b/Resources/img/box/bw/box_wp12bw.png differ diff --git a/Resources/img/box/bw/box_wp13bw.png b/Resources/img/box/bw/box_wp13bw.png new file mode 100644 index 000000000..afe892e45 Binary files /dev/null and b/Resources/img/box/bw/box_wp13bw.png differ diff --git a/Resources/img/box/bw/box_wp14bw.png b/Resources/img/box/bw/box_wp14bw.png new file mode 100644 index 000000000..101a47e66 Binary files /dev/null and b/Resources/img/box/bw/box_wp14bw.png differ diff --git a/Resources/img/box/bw/box_wp15bw.png b/Resources/img/box/bw/box_wp15bw.png new file mode 100644 index 000000000..390e4af8a Binary files /dev/null and b/Resources/img/box/bw/box_wp15bw.png differ diff --git a/Resources/img/box/bw/box_wp16bw.png b/Resources/img/box/bw/box_wp16bw.png new file mode 100644 index 000000000..3f7ca915e Binary files /dev/null and b/Resources/img/box/bw/box_wp16bw.png differ diff --git a/Resources/img/box/bw/box_wp17bw.png b/Resources/img/box/bw/box_wp17bw.png new file mode 100644 index 000000000..60a710954 Binary files /dev/null and b/Resources/img/box/bw/box_wp17bw.png differ diff --git a/Resources/img/box/bw/box_wp18bw.png b/Resources/img/box/bw/box_wp18bw.png new file mode 100644 index 000000000..717fdedaf Binary files /dev/null and b/Resources/img/box/bw/box_wp18bw.png differ diff --git a/Resources/img/box/bw/box_wp19bw.png b/Resources/img/box/bw/box_wp19bw.png new file mode 100644 index 000000000..6a49d82d0 Binary files /dev/null and b/Resources/img/box/bw/box_wp19bw.png differ diff --git a/Resources/img/box/bw/box_wp20bw.png b/Resources/img/box/bw/box_wp20bw.png new file mode 100644 index 000000000..44fd667c3 Binary files /dev/null and b/Resources/img/box/bw/box_wp20bw.png differ diff --git a/Resources/img/box/bw/box_wp21bw.png b/Resources/img/box/bw/box_wp21bw.png new file mode 100644 index 000000000..fd9e7c206 Binary files /dev/null and b/Resources/img/box/bw/box_wp21bw.png differ diff --git a/Resources/img/box/bw/box_wp22bw.png b/Resources/img/box/bw/box_wp22bw.png new file mode 100644 index 000000000..9ba8a97e1 Binary files /dev/null and b/Resources/img/box/bw/box_wp22bw.png differ diff --git a/Resources/img/box/bw/box_wp23bw.png b/Resources/img/box/bw/box_wp23bw.png new file mode 100644 index 000000000..3ff284852 Binary files /dev/null and b/Resources/img/box/bw/box_wp23bw.png differ diff --git a/Resources/img/box/bw/box_wp24bw.png b/Resources/img/box/bw/box_wp24bw.png new file mode 100644 index 000000000..b832a3a77 Binary files /dev/null and b/Resources/img/box/bw/box_wp24bw.png differ diff --git a/Resources/img/box/dp/box_wp01dp.png b/Resources/img/box/dp/box_wp01dp.png new file mode 100644 index 000000000..6217cb385 Binary files /dev/null and b/Resources/img/box/dp/box_wp01dp.png differ diff --git a/Resources/img/box/dp/box_wp02dp.png b/Resources/img/box/dp/box_wp02dp.png new file mode 100644 index 000000000..4e590bcfa Binary files /dev/null and b/Resources/img/box/dp/box_wp02dp.png differ diff --git a/Resources/img/box/dp/box_wp03dp.png b/Resources/img/box/dp/box_wp03dp.png new file mode 100644 index 000000000..b842c2800 Binary files /dev/null and b/Resources/img/box/dp/box_wp03dp.png differ diff --git a/Resources/img/box/dp/box_wp04dp.png b/Resources/img/box/dp/box_wp04dp.png new file mode 100644 index 000000000..564372ca8 Binary files /dev/null and b/Resources/img/box/dp/box_wp04dp.png differ diff --git a/Resources/img/box/dp/box_wp05dp.png b/Resources/img/box/dp/box_wp05dp.png new file mode 100644 index 000000000..873203487 Binary files /dev/null and b/Resources/img/box/dp/box_wp05dp.png differ diff --git a/Resources/img/box/dp/box_wp06dp.png b/Resources/img/box/dp/box_wp06dp.png new file mode 100644 index 000000000..6213fba0f Binary files /dev/null and b/Resources/img/box/dp/box_wp06dp.png differ diff --git a/Resources/img/box/dp/box_wp07dp.png b/Resources/img/box/dp/box_wp07dp.png new file mode 100644 index 000000000..44c88b3b8 Binary files /dev/null and b/Resources/img/box/dp/box_wp07dp.png differ diff --git a/Resources/img/box/dp/box_wp08dp.png b/Resources/img/box/dp/box_wp08dp.png new file mode 100644 index 000000000..5be5005e5 Binary files /dev/null and b/Resources/img/box/dp/box_wp08dp.png differ diff --git a/Resources/img/box/dp/box_wp09dp.png b/Resources/img/box/dp/box_wp09dp.png new file mode 100644 index 000000000..de3daed76 Binary files /dev/null and b/Resources/img/box/dp/box_wp09dp.png differ diff --git a/Resources/img/box/dp/box_wp10dp.png b/Resources/img/box/dp/box_wp10dp.png new file mode 100644 index 000000000..02d940dcb Binary files /dev/null and b/Resources/img/box/dp/box_wp10dp.png differ diff --git a/Resources/img/box/dp/box_wp11dp.png b/Resources/img/box/dp/box_wp11dp.png new file mode 100644 index 000000000..7d8fdd427 Binary files /dev/null and b/Resources/img/box/dp/box_wp11dp.png differ diff --git a/Resources/img/box/dp/box_wp12dp.png b/Resources/img/box/dp/box_wp12dp.png new file mode 100644 index 000000000..9fd6edbbf Binary files /dev/null and b/Resources/img/box/dp/box_wp12dp.png differ diff --git a/Resources/img/box/dp/box_wp13dp.png b/Resources/img/box/dp/box_wp13dp.png new file mode 100644 index 000000000..507aa06f3 Binary files /dev/null and b/Resources/img/box/dp/box_wp13dp.png differ diff --git a/Resources/img/box/dp/box_wp14dp.png b/Resources/img/box/dp/box_wp14dp.png new file mode 100644 index 000000000..f4cca608c Binary files /dev/null and b/Resources/img/box/dp/box_wp14dp.png differ diff --git a/Resources/img/box/dp/box_wp15dp.png b/Resources/img/box/dp/box_wp15dp.png new file mode 100644 index 000000000..1a8c9ea2d Binary files /dev/null and b/Resources/img/box/dp/box_wp15dp.png differ diff --git a/Resources/img/box/dp/box_wp16dp.png b/Resources/img/box/dp/box_wp16dp.png new file mode 100644 index 000000000..0a8dcd502 Binary files /dev/null and b/Resources/img/box/dp/box_wp16dp.png differ diff --git a/Resources/img/box/dp/box_wp17dp.png b/Resources/img/box/dp/box_wp17dp.png new file mode 100644 index 000000000..0352b51fa Binary files /dev/null and b/Resources/img/box/dp/box_wp17dp.png differ diff --git a/Resources/img/box/dp/box_wp18dp.png b/Resources/img/box/dp/box_wp18dp.png new file mode 100644 index 000000000..d79e44b68 Binary files /dev/null and b/Resources/img/box/dp/box_wp18dp.png differ diff --git a/Resources/img/box/dp/box_wp19dp.png b/Resources/img/box/dp/box_wp19dp.png new file mode 100644 index 000000000..f34d95ca3 Binary files /dev/null and b/Resources/img/box/dp/box_wp19dp.png differ diff --git a/Resources/img/box/dp/box_wp20dp.png b/Resources/img/box/dp/box_wp20dp.png new file mode 100644 index 000000000..8ce50a44e Binary files /dev/null and b/Resources/img/box/dp/box_wp20dp.png differ diff --git a/Resources/img/box/dp/box_wp21dp.png b/Resources/img/box/dp/box_wp21dp.png new file mode 100644 index 000000000..2829795ff Binary files /dev/null and b/Resources/img/box/dp/box_wp21dp.png differ diff --git a/Resources/img/box/dp/box_wp22dp.png b/Resources/img/box/dp/box_wp22dp.png new file mode 100644 index 000000000..624776667 Binary files /dev/null and b/Resources/img/box/dp/box_wp22dp.png differ diff --git a/Resources/img/box/dp/box_wp23dp.png b/Resources/img/box/dp/box_wp23dp.png new file mode 100644 index 000000000..3a63e5897 Binary files /dev/null and b/Resources/img/box/dp/box_wp23dp.png differ diff --git a/Resources/img/box/dp/box_wp24dp.png b/Resources/img/box/dp/box_wp24dp.png new file mode 100644 index 000000000..211840590 Binary files /dev/null and b/Resources/img/box/dp/box_wp24dp.png differ diff --git a/Resources/img/box/e/box_wp01e.png b/Resources/img/box/e/box_wp01e.png new file mode 100644 index 000000000..f036eb657 Binary files /dev/null and b/Resources/img/box/e/box_wp01e.png differ diff --git a/Resources/img/box/e/box_wp02e.png b/Resources/img/box/e/box_wp02e.png new file mode 100644 index 000000000..3039df29f Binary files /dev/null and b/Resources/img/box/e/box_wp02e.png differ diff --git a/Resources/img/box/e/box_wp03e.png b/Resources/img/box/e/box_wp03e.png new file mode 100644 index 000000000..8e5896387 Binary files /dev/null and b/Resources/img/box/e/box_wp03e.png differ diff --git a/Resources/img/box/e/box_wp04e.png b/Resources/img/box/e/box_wp04e.png new file mode 100644 index 000000000..6a02eb1fe Binary files /dev/null and b/Resources/img/box/e/box_wp04e.png differ diff --git a/Resources/img/box/e/box_wp05e.png b/Resources/img/box/e/box_wp05e.png new file mode 100644 index 000000000..9110e6b51 Binary files /dev/null and b/Resources/img/box/e/box_wp05e.png differ diff --git a/Resources/img/box/e/box_wp06e.png b/Resources/img/box/e/box_wp06e.png new file mode 100644 index 000000000..a4493ec92 Binary files /dev/null and b/Resources/img/box/e/box_wp06e.png differ diff --git a/Resources/img/box/e/box_wp07e.png b/Resources/img/box/e/box_wp07e.png new file mode 100644 index 000000000..008326b40 Binary files /dev/null and b/Resources/img/box/e/box_wp07e.png differ diff --git a/Resources/img/box/e/box_wp08e.png b/Resources/img/box/e/box_wp08e.png new file mode 100644 index 000000000..dcd5e426c Binary files /dev/null and b/Resources/img/box/e/box_wp08e.png differ diff --git a/Resources/img/box/e/box_wp09e.png b/Resources/img/box/e/box_wp09e.png new file mode 100644 index 000000000..7f11bbd5f Binary files /dev/null and b/Resources/img/box/e/box_wp09e.png differ diff --git a/Resources/img/box/e/box_wp10e.png b/Resources/img/box/e/box_wp10e.png new file mode 100644 index 000000000..bc2646865 Binary files /dev/null and b/Resources/img/box/e/box_wp10e.png differ diff --git a/Resources/img/box/e/box_wp11e.png b/Resources/img/box/e/box_wp11e.png new file mode 100644 index 000000000..8e664092b Binary files /dev/null and b/Resources/img/box/e/box_wp11e.png differ diff --git a/Resources/img/box/e/box_wp12e.png b/Resources/img/box/e/box_wp12e.png new file mode 100644 index 000000000..fc32df7f4 Binary files /dev/null and b/Resources/img/box/e/box_wp12e.png differ diff --git a/Resources/img/box/e/box_wp13e.png b/Resources/img/box/e/box_wp13e.png new file mode 100644 index 000000000..99b5f9514 Binary files /dev/null and b/Resources/img/box/e/box_wp13e.png differ diff --git a/Resources/img/box/e/box_wp14e.png b/Resources/img/box/e/box_wp14e.png new file mode 100644 index 000000000..be4c51340 Binary files /dev/null and b/Resources/img/box/e/box_wp14e.png differ diff --git a/Resources/img/box/e/box_wp15e.png b/Resources/img/box/e/box_wp15e.png new file mode 100644 index 000000000..210b2da10 Binary files /dev/null and b/Resources/img/box/e/box_wp15e.png differ diff --git a/Resources/img/box/e/box_wp16e.png b/Resources/img/box/e/box_wp16e.png new file mode 100644 index 000000000..d47eac4ec Binary files /dev/null and b/Resources/img/box/e/box_wp16e.png differ diff --git a/Resources/img/box/frlg/box_wp13frlg.png b/Resources/img/box/frlg/box_wp13frlg.png new file mode 100644 index 000000000..53b657170 Binary files /dev/null and b/Resources/img/box/frlg/box_wp13frlg.png differ diff --git a/Resources/img/box/frlg/box_wp14frlg.png b/Resources/img/box/frlg/box_wp14frlg.png new file mode 100644 index 000000000..7d23ff0c1 Binary files /dev/null and b/Resources/img/box/frlg/box_wp14frlg.png differ diff --git a/Resources/img/box/frlg/box_wp15frlg.png b/Resources/img/box/frlg/box_wp15frlg.png new file mode 100644 index 000000000..c6bdc9332 Binary files /dev/null and b/Resources/img/box/frlg/box_wp15frlg.png differ diff --git a/Resources/img/box/frlg/box_wp16frlg.png b/Resources/img/box/frlg/box_wp16frlg.png new file mode 100644 index 000000000..53e3b6a7c Binary files /dev/null and b/Resources/img/box/frlg/box_wp16frlg.png differ diff --git a/Resources/img/box/hgss/box_wp17hgss.png b/Resources/img/box/hgss/box_wp17hgss.png new file mode 100644 index 000000000..cc6826639 Binary files /dev/null and b/Resources/img/box/hgss/box_wp17hgss.png differ diff --git a/Resources/img/box/hgss/box_wp18hgss.png b/Resources/img/box/hgss/box_wp18hgss.png new file mode 100644 index 000000000..cfb329352 Binary files /dev/null and b/Resources/img/box/hgss/box_wp18hgss.png differ diff --git a/Resources/img/box/hgss/box_wp19hgss.png b/Resources/img/box/hgss/box_wp19hgss.png new file mode 100644 index 000000000..231c51216 Binary files /dev/null and b/Resources/img/box/hgss/box_wp19hgss.png differ diff --git a/Resources/img/box/hgss/box_wp20hgss.png b/Resources/img/box/hgss/box_wp20hgss.png new file mode 100644 index 000000000..b0b672f5d Binary files /dev/null and b/Resources/img/box/hgss/box_wp20hgss.png differ diff --git a/Resources/img/box/hgss/box_wp21hgss.png b/Resources/img/box/hgss/box_wp21hgss.png new file mode 100644 index 000000000..44d35cd22 Binary files /dev/null and b/Resources/img/box/hgss/box_wp21hgss.png differ diff --git a/Resources/img/box/hgss/box_wp22hgss.png b/Resources/img/box/hgss/box_wp22hgss.png new file mode 100644 index 000000000..c20e297e9 Binary files /dev/null and b/Resources/img/box/hgss/box_wp22hgss.png differ diff --git a/Resources/img/box/hgss/box_wp23hgss.png b/Resources/img/box/hgss/box_wp23hgss.png new file mode 100644 index 000000000..a7d8db0ca Binary files /dev/null and b/Resources/img/box/hgss/box_wp23hgss.png differ diff --git a/Resources/img/box/hgss/box_wp24hgss.png b/Resources/img/box/hgss/box_wp24hgss.png new file mode 100644 index 000000000..92aecb2b4 Binary files /dev/null and b/Resources/img/box/hgss/box_wp24hgss.png differ diff --git a/Resources/img/box/pt/box_wp17pt.png b/Resources/img/box/pt/box_wp17pt.png new file mode 100644 index 000000000..7e0b876cc Binary files /dev/null and b/Resources/img/box/pt/box_wp17pt.png differ diff --git a/Resources/img/box/pt/box_wp18pt.png b/Resources/img/box/pt/box_wp18pt.png new file mode 100644 index 000000000..fb2bf7a27 Binary files /dev/null and b/Resources/img/box/pt/box_wp18pt.png differ diff --git a/Resources/img/box/pt/box_wp19pt.png b/Resources/img/box/pt/box_wp19pt.png new file mode 100644 index 000000000..a4ce1dd37 Binary files /dev/null and b/Resources/img/box/pt/box_wp19pt.png differ diff --git a/Resources/img/box/pt/box_wp20pt.png b/Resources/img/box/pt/box_wp20pt.png new file mode 100644 index 000000000..c733439ff Binary files /dev/null and b/Resources/img/box/pt/box_wp20pt.png differ diff --git a/Resources/img/box/pt/box_wp21pt.png b/Resources/img/box/pt/box_wp21pt.png new file mode 100644 index 000000000..f3d6c0089 Binary files /dev/null and b/Resources/img/box/pt/box_wp21pt.png differ diff --git a/Resources/img/box/pt/box_wp22pt.png b/Resources/img/box/pt/box_wp22pt.png new file mode 100644 index 000000000..1803b4e0b Binary files /dev/null and b/Resources/img/box/pt/box_wp22pt.png differ diff --git a/Resources/img/box/pt/box_wp23pt.png b/Resources/img/box/pt/box_wp23pt.png new file mode 100644 index 000000000..831418a52 Binary files /dev/null and b/Resources/img/box/pt/box_wp23pt.png differ diff --git a/Resources/img/box/pt/box_wp24pt.png b/Resources/img/box/pt/box_wp24pt.png new file mode 100644 index 000000000..31dc47541 Binary files /dev/null and b/Resources/img/box/pt/box_wp24pt.png differ diff --git a/Resources/img/box/rs/box_wp01rs.png b/Resources/img/box/rs/box_wp01rs.png new file mode 100644 index 000000000..e7391bae2 Binary files /dev/null and b/Resources/img/box/rs/box_wp01rs.png differ diff --git a/Resources/img/box/rs/box_wp02rs.png b/Resources/img/box/rs/box_wp02rs.png new file mode 100644 index 000000000..1637d4f09 Binary files /dev/null and b/Resources/img/box/rs/box_wp02rs.png differ diff --git a/Resources/img/box/rs/box_wp03rs.png b/Resources/img/box/rs/box_wp03rs.png new file mode 100644 index 000000000..67d07580e Binary files /dev/null and b/Resources/img/box/rs/box_wp03rs.png differ diff --git a/Resources/img/box/rs/box_wp04rs.png b/Resources/img/box/rs/box_wp04rs.png new file mode 100644 index 000000000..d3546572b Binary files /dev/null and b/Resources/img/box/rs/box_wp04rs.png differ diff --git a/Resources/img/box/rs/box_wp05rs.png b/Resources/img/box/rs/box_wp05rs.png new file mode 100644 index 000000000..b6eadad43 Binary files /dev/null and b/Resources/img/box/rs/box_wp05rs.png differ diff --git a/Resources/img/box/rs/box_wp06rs.png b/Resources/img/box/rs/box_wp06rs.png new file mode 100644 index 000000000..473a3ff4b Binary files /dev/null and b/Resources/img/box/rs/box_wp06rs.png differ diff --git a/Resources/img/box/rs/box_wp07rs.png b/Resources/img/box/rs/box_wp07rs.png new file mode 100644 index 000000000..0bc72dd23 Binary files /dev/null and b/Resources/img/box/rs/box_wp07rs.png differ diff --git a/Resources/img/box/rs/box_wp08rs.png b/Resources/img/box/rs/box_wp08rs.png new file mode 100644 index 000000000..4f7a794a9 Binary files /dev/null and b/Resources/img/box/rs/box_wp08rs.png differ diff --git a/Resources/img/box/rs/box_wp09rs.png b/Resources/img/box/rs/box_wp09rs.png new file mode 100644 index 000000000..d4d1c4b25 Binary files /dev/null and b/Resources/img/box/rs/box_wp09rs.png differ diff --git a/Resources/img/box/rs/box_wp10rs.png b/Resources/img/box/rs/box_wp10rs.png new file mode 100644 index 000000000..1328efd22 Binary files /dev/null and b/Resources/img/box/rs/box_wp10rs.png differ diff --git a/Resources/img/box/rs/box_wp11rs.png b/Resources/img/box/rs/box_wp11rs.png new file mode 100644 index 000000000..4dab41349 Binary files /dev/null and b/Resources/img/box/rs/box_wp11rs.png differ diff --git a/Resources/img/box/rs/box_wp12rs.png b/Resources/img/box/rs/box_wp12rs.png new file mode 100644 index 000000000..87582c4f6 Binary files /dev/null and b/Resources/img/box/rs/box_wp12rs.png differ diff --git a/Resources/img/box/rs/box_wp13rs.png b/Resources/img/box/rs/box_wp13rs.png new file mode 100644 index 000000000..a0417a6b3 Binary files /dev/null and b/Resources/img/box/rs/box_wp13rs.png differ diff --git a/Resources/img/box/rs/box_wp14rs.png b/Resources/img/box/rs/box_wp14rs.png new file mode 100644 index 000000000..f031f893d Binary files /dev/null and b/Resources/img/box/rs/box_wp14rs.png differ diff --git a/Resources/img/box/rs/box_wp15rs.png b/Resources/img/box/rs/box_wp15rs.png new file mode 100644 index 000000000..6be9d51ae Binary files /dev/null and b/Resources/img/box/rs/box_wp15rs.png differ diff --git a/Resources/img/box/rs/box_wp16rs.png b/Resources/img/box/rs/box_wp16rs.png new file mode 100644 index 000000000..dd7e0d10f Binary files /dev/null and b/Resources/img/box/rs/box_wp16rs.png differ diff --git a/Resources/img/box/box_wp01.png b/Resources/img/box/xy/box_wp01xy.png similarity index 100% rename from Resources/img/box/box_wp01.png rename to Resources/img/box/xy/box_wp01xy.png diff --git a/Resources/img/box/box_wp02.png b/Resources/img/box/xy/box_wp02xy.png similarity index 100% rename from Resources/img/box/box_wp02.png rename to Resources/img/box/xy/box_wp02xy.png diff --git a/Resources/img/box/box_wp03.png b/Resources/img/box/xy/box_wp03xy.png similarity index 100% rename from Resources/img/box/box_wp03.png rename to Resources/img/box/xy/box_wp03xy.png diff --git a/Resources/img/box/box_wp04.png b/Resources/img/box/xy/box_wp04xy.png similarity index 100% rename from Resources/img/box/box_wp04.png rename to Resources/img/box/xy/box_wp04xy.png diff --git a/Resources/img/box/box_wp05.png b/Resources/img/box/xy/box_wp05xy.png similarity index 100% rename from Resources/img/box/box_wp05.png rename to Resources/img/box/xy/box_wp05xy.png diff --git a/Resources/img/box/box_wp06.png b/Resources/img/box/xy/box_wp06xy.png similarity index 100% rename from Resources/img/box/box_wp06.png rename to Resources/img/box/xy/box_wp06xy.png diff --git a/Resources/img/box/box_wp07.png b/Resources/img/box/xy/box_wp07xy.png similarity index 100% rename from Resources/img/box/box_wp07.png rename to Resources/img/box/xy/box_wp07xy.png diff --git a/Resources/img/box/box_wp08.png b/Resources/img/box/xy/box_wp08xy.png similarity index 100% rename from Resources/img/box/box_wp08.png rename to Resources/img/box/xy/box_wp08xy.png diff --git a/Resources/img/box/box_wp09.png b/Resources/img/box/xy/box_wp09xy.png similarity index 100% rename from Resources/img/box/box_wp09.png rename to Resources/img/box/xy/box_wp09xy.png diff --git a/Resources/img/box/box_wp10.png b/Resources/img/box/xy/box_wp10xy.png similarity index 100% rename from Resources/img/box/box_wp10.png rename to Resources/img/box/xy/box_wp10xy.png diff --git a/Resources/img/box/box_wp11.png b/Resources/img/box/xy/box_wp11xy.png similarity index 100% rename from Resources/img/box/box_wp11.png rename to Resources/img/box/xy/box_wp11xy.png diff --git a/Resources/img/box/box_wp12.png b/Resources/img/box/xy/box_wp12xy.png similarity index 100% rename from Resources/img/box/box_wp12.png rename to Resources/img/box/xy/box_wp12xy.png diff --git a/Resources/img/box/box_wp13.png b/Resources/img/box/xy/box_wp13xy.png similarity index 100% rename from Resources/img/box/box_wp13.png rename to Resources/img/box/xy/box_wp13xy.png diff --git a/Resources/img/box/box_wp14.png b/Resources/img/box/xy/box_wp14xy.png similarity index 100% rename from Resources/img/box/box_wp14.png rename to Resources/img/box/xy/box_wp14xy.png diff --git a/Resources/img/box/box_wp15.png b/Resources/img/box/xy/box_wp15xy.png similarity index 100% rename from Resources/img/box/box_wp15.png rename to Resources/img/box/xy/box_wp15xy.png diff --git a/Resources/img/box/box_wp16.png b/Resources/img/box/xy/box_wp16xy.png similarity index 100% rename from Resources/img/box/box_wp16.png rename to Resources/img/box/xy/box_wp16xy.png diff --git a/Resources/img/box/box_wp17.png b/Resources/img/box/xy/box_wp17xy.png similarity index 100% rename from Resources/img/box/box_wp17.png rename to Resources/img/box/xy/box_wp17xy.png diff --git a/Resources/img/box/box_wp18.png b/Resources/img/box/xy/box_wp18xy.png similarity index 100% rename from Resources/img/box/box_wp18.png rename to Resources/img/box/xy/box_wp18xy.png diff --git a/Resources/img/box/box_wp19.png b/Resources/img/box/xy/box_wp19xy.png similarity index 100% rename from Resources/img/box/box_wp19.png rename to Resources/img/box/xy/box_wp19xy.png diff --git a/Resources/img/box/box_wp20.png b/Resources/img/box/xy/box_wp20xy.png similarity index 100% rename from Resources/img/box/box_wp20.png rename to Resources/img/box/xy/box_wp20xy.png diff --git a/Resources/img/box/box_wp21.png b/Resources/img/box/xy/box_wp21xy.png similarity index 100% rename from Resources/img/box/box_wp21.png rename to Resources/img/box/xy/box_wp21xy.png diff --git a/Resources/img/box/box_wp22.png b/Resources/img/box/xy/box_wp22xy.png similarity index 100% rename from Resources/img/box/box_wp22.png rename to Resources/img/box/xy/box_wp22xy.png diff --git a/Resources/img/box/box_wp23.png b/Resources/img/box/xy/box_wp23xy.png similarity index 100% rename from Resources/img/box/box_wp23.png rename to Resources/img/box/xy/box_wp23xy.png diff --git a/Resources/img/box/box_wp24.png b/Resources/img/box/xy/box_wp24xy.png similarity index 100% rename from Resources/img/box/box_wp24.png rename to Resources/img/box/xy/box_wp24xy.png diff --git a/Resources/text/changelog.txt b/Resources/text/changelog.txt index 0bca338cb..d7b14e146 100644 --- a/Resources/text/changelog.txt +++ b/Resources/text/changelog.txt @@ -709,7 +709,7 @@ http://projectpokemon.org/forums/showthread.php?36986 - Fixed: ORAS 2nd daycare EXP values not being displayed. Thanks chenzw95! - Fixed: Mono-specific underscore issue for converting to numbers. Thanks chenzw95! -5/16/16 - New Update: (1200) +5/16/16 - New Update: (115750) - Added: Bulk conversion when opening a Gen4 or Gen5 save file. Box contents will be dumped to specified folder, and converted if desired. - Added: SetPK6 override options for importing multiple pk6's (box import, battle video). - Added: Event constant diff when comparing two saves in the Event Flag editor. @@ -726,13 +726,14 @@ http://projectpokemon.org/forums/showthread.php?36986 - Hotfix: Fixed Gen 5 save file detection. Thanks xtreme1! - Hotfix: Fixed Bad Eggs from causing past gen dumping to abort. Thanks xtreme1! -07/XX/16 - New Update: +07/28/16 - New Update: - Fixed: Base save file when no save is loaded now has more realistic data (Console Region and Country fixed). - Fixed: Loading a X/Y save file will no longer have OR/AS exclusive items/moves/forms available as choices. - Fixed: Certain edge case Wonder Cards now are recognized correctly. - Fixed: A few legality checks have been improved. Thanks Eskuero & chenzw95! - Fixed: Box Flag truncation. Thanks chenzw95! - Fixed: Save File detection for past gen saves. Thanks evandixon! + - Added: Pokémon Link block injector (like Wonder Cards). Thanks suloku! - Added: Clear Box with Alt-Click on Box Tab. Clear ALL Boxes with Alt-Shift-Click. - Added: Sort Box with Ctrl-Click on Box Tab. Sort ALL Boxes with Ctrl-Shift-Click. Sorts by Species#. - Added: RSE/FRLG/DPPt/HGSS/BW/B2W2 Save Editing Support. Can read, modify, and export save files and pkm files. @@ -744,7 +745,9 @@ http://projectpokemon.org/forums/showthread.php?36986 - Changed: Box Dump/Load are now accessible via the Tools menu. - Changed: Updated Chinese translation. Thanks easyworld! - Added: Batch Editor. Modify all Pokémon in your save file / external files with simple script instructions. - - - An example script is provided when the window opens. Filters can be used so that only desired PKM are modified. + - - A script builder is provided to list attributes that may be edited (and how to edit them). - - "=": Requires the value to match the specified value. If not, the PKM is skipped. - - "!": Requires the value to NOT match the specified value. If not, the PKM is skipped. - - - ".": Sets the attribute to the specified value if all filters are satisfied. \ No newline at end of file + - - ".": Sets the attribute to the specified value if all filters are satisfied. + - Changed: Database can now search pk3/pk4/pk5/pk6 files. + - - An advance search option has been added, uses the same filter style as the Batch Editor. \ No newline at end of file diff --git a/Resources/text/de/text_Forms_de.txt b/Resources/text/de/text_Forms_de.txt index 337e94303..37474974f 100644 --- a/Resources/text/de/text_Forms_de.txt +++ b/Resources/text/de/text_Forms_de.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/en/lang_en.txt b/Resources/text/en/lang_en.txt index 8e0027e2b..38767962c 100644 --- a/Resources/text/en/lang_en.txt +++ b/Resources/text/en/lang_en.txt @@ -793,8 +793,8 @@ L_Saying5 = 5: ------------------------------------------------------- L_Details = Details: L_Received = Received List: -B_Import = Import .wc6 -B_Output = Output .wc6 +B_Import = Import +B_Output = Export B_Cancel = Cancel B_Save = Save ! End \ No newline at end of file diff --git a/Resources/text/en/text_Forms_en.txt b/Resources/text/en/text_Forms_en.txt index e89339bce..114723069 100644 --- a/Resources/text/en/text_Forms_en.txt +++ b/Resources/text/en/text_Forms_en.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/es/text_Forms_es.txt b/Resources/text/es/text_Forms_es.txt index a6cef80de..2ad2e7655 100644 --- a/Resources/text/es/text_Forms_es.txt +++ b/Resources/text/es/text_Forms_es.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/fr/text_Forms_fr.txt b/Resources/text/fr/text_Forms_fr.txt index ed0229aa3..47befb30c 100644 --- a/Resources/text/fr/text_Forms_fr.txt +++ b/Resources/text/fr/text_Forms_fr.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/gen3/text_rsefrlg_00000_en.txt b/Resources/text/gen3/text_rsefrlg_00000_en.txt index b58af3a31..62f73ec94 100644 Binary files a/Resources/text/gen3/text_rsefrlg_00000_en.txt and b/Resources/text/gen3/text_rsefrlg_00000_en.txt differ diff --git a/Resources/text/it/lang_it.txt b/Resources/text/it/lang_it.txt index b819c06a5..192f8e996 100644 --- a/Resources/text/it/lang_it.txt +++ b/Resources/text/it/lang_it.txt @@ -793,8 +793,8 @@ L_Saying5 = 5: ------------------------------------------------------- L_Details = Details: L_Received = Received List: -B_Import = Import .wc6 -B_Output = Output .wc6 +B_Import = Import +B_Output = Export B_Cancel = Cancel B_Save = Save ! End \ No newline at end of file diff --git a/Resources/text/it/text_Forms_it.txt b/Resources/text/it/text_Forms_it.txt index ab2aca492..e773f7ee1 100644 --- a/Resources/text/it/text_Forms_it.txt +++ b/Resources/text/it/text_Forms_it.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/ja/text_Forms_ja.txt b/Resources/text/ja/text_Forms_ja.txt index 7c583c5fb..1b76f216c 100644 --- a/Resources/text/ja/text_Forms_ja.txt +++ b/Resources/text/ja/text_Forms_ja.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/ko/lang_ko.txt b/Resources/text/ko/lang_ko.txt index ae0c6f1c7..25078380f 100644 --- a/Resources/text/ko/lang_ko.txt +++ b/Resources/text/ko/lang_ko.txt @@ -793,8 +793,8 @@ L_Saying5 = 5: ------------------------------------------------------- L_Details = 세부사항: L_Received = 받은 것들: -B_Import = .wc6 넣기 -B_Output = .wc6 빼내기 +B_Import = 넣기 +B_Output = 빼내기 B_Cancel = 취소 B_Save = 저장 ! End \ No newline at end of file diff --git a/Resources/text/ko/text_Forms_ko.txt b/Resources/text/ko/text_Forms_ko.txt index 902904911..c1bb723bc 100644 --- a/Resources/text/ko/text_Forms_ko.txt +++ b/Resources/text/ko/text_Forms_ko.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Resources/text/other/lang_pt.txt b/Resources/text/other/lang_pt.txt index f1983449a..ef08a5fe5 100644 --- a/Resources/text/other/lang_pt.txt +++ b/Resources/text/other/lang_pt.txt @@ -793,8 +793,8 @@ L_Saying5 = 5: ------------------------------------------------------- L_Details = Detalhes: L_Received = Lista de Recebidos: -B_Import = Importar .wc6 -B_Output = Exportar .wc6 +B_Import = Importar +B_Output = Exportar B_Cancel = Cancelar B_Save = Gravar ! End \ No newline at end of file diff --git a/Resources/text/zh/text_Forms_zh.txt b/Resources/text/zh/text_Forms_zh.txt index 8c7767d34..5f28d4684 100644 --- a/Resources/text/zh/text_Forms_zh.txt +++ b/Resources/text/zh/text_Forms_zh.txt @@ -1,4 +1,4 @@ - +Spiky diff --git a/Saves/BoxWallpaper.cs b/Saves/BoxWallpaper.cs new file mode 100644 index 000000000..346c62bc7 --- /dev/null +++ b/Saves/BoxWallpaper.cs @@ -0,0 +1,37 @@ +using System.Drawing; + +namespace PKHeX +{ + public static class BoxWallpaper + { + public static Bitmap getWallpaper(SaveFile SAV, int index) + { + index++; + string s = "box_wp" + index.ToString("00"); + switch (SAV.Generation) + { + case 6: s += SAV.ORAS && index > 16 ? "ao" : "xy"; + break; + case 5: s += SAV.B2W2 && index > 16 ? "b2w2" : "bw"; + break; + case 4: + if (SAV.Pt && index > 16) + s += "pt"; + else if (SAV.HGSS && index > 16) + s += "hgss"; + else + s += "dp"; + break; + case 3: + if (SAV.E) + s += "e"; + else if (SAV.FRLG && index > 12) + s += "frlg"; + else + s += "rs"; + break; + } + return (Bitmap)(Properties.Resources.ResourceManager.GetObject(s) ?? Properties.Resources.box_wp16xy); + } + } +} diff --git a/Saves/SAV3.cs b/Saves/SAV3.cs index fb49f35c4..b70138539 100644 --- a/Saves/SAV3.cs +++ b/Saves/SAV3.cs @@ -46,18 +46,39 @@ namespace PKHeX else Version = SaveUtil.getIsG3SAV(Data); if (Version == GameVersion.Invalid) return; - - BlockOrder = new int[14]; - BlockOfs = new int[14]; - ActiveSAV = SaveUtil.SIZE_G3RAWHALF == data.Length || BitConverter.ToUInt32(Data, 0xFFC) > BitConverter.ToUInt32(Data, 0xEFFC) ? 0 : 1; + + + int[] BlockOrder1 = new int[14]; for (int i = 0; i < 14; i++) - BlockOrder[i] = BitConverter.ToInt16(Data, ABO + i*0x1000 + 0xFF4); + BlockOrder1[i] = BitConverter.ToInt16(Data, i*0x1000 + 0xFF4); + int zeroBlock1 = Array.IndexOf(BlockOrder1, 0); + + if (data.Length > SaveUtil.SIZE_G3RAWHALF) + { + int[] BlockOrder2 = new int[14]; + for (int i = 0; i < 14; i++) + BlockOrder2[i] = BitConverter.ToInt16(Data, 0xE000 + i*0x1000 + 0xFF4); + int zeroBlock2 = Array.IndexOf(BlockOrder2, 0); + + ActiveSAV = BitConverter.ToUInt32(Data, zeroBlock1*0x1000 + 0xFFC) > + BitConverter.ToUInt32(Data, zeroBlock2*0x1000 + 0xEFFC) + ? 0 + : 1; + BlockOrder = ActiveSAV == 0 ? BlockOrder1 : BlockOrder2; + } + else + { + ActiveSAV = 0; + BlockOrder = BlockOrder1; + } + + BlockOfs = new int[14]; for (int i = 0; i < 14; i++) BlockOfs[i] = Array.IndexOf(BlockOrder, i)*0x1000 + ABO; // Set up PC data buffer beyond end of save file. Box = Data.Length; - Array.Resize(ref Data, Data.Length + 0x10000); // More than enough empty space. + Array.Resize(ref Data, Data.Length + SIZE_RESERVED); // More than enough empty space. // Copy chunk to the allocated location for (int i = 5; i < 14; i++) @@ -77,7 +98,7 @@ namespace PKHeX OFS_PouchBalls = BlockOfs[1] + 0x0600; OFS_PouchTMHM = BlockOfs[1] + 0x0640; OFS_PouchBerry = BlockOfs[1] + 0x0740; - Personal = PersonalInfo.RS; + Personal = PersonalTable.RS; break; case GameVersion.FRLG: LegalKeyItems = Legal.Pouch_Key_FRLG; @@ -86,7 +107,7 @@ namespace PKHeX OFS_PouchBalls = BlockOfs[1] + 0x0430; OFS_PouchTMHM = BlockOfs[1] + 0x0464; OFS_PouchBerry = BlockOfs[1] + 0x054C; - Personal = PersonalInfo.FR; // todo split FR & LG + Personal = PersonalTable.FR; break; case GameVersion.E: LegalKeyItems = Legal.Pouch_Key_E; @@ -95,7 +116,7 @@ namespace PKHeX OFS_PouchBalls = BlockOfs[1] + 0x0650; OFS_PouchTMHM = BlockOfs[1] + 0x0690; OFS_PouchBerry = BlockOfs[1] + 0x0790; - Personal = PersonalInfo.E; + Personal = PersonalTable.E; break; } LegalItems = Legal.Pouch_Items_RS; @@ -109,6 +130,22 @@ namespace PKHeX resetBoxes(); } + private const int SIZE_RESERVED = 0x10000; // unpacked box data + public override byte[] Write(bool DSV) + { + // Copy Box data back + for (int i = 5; i < 14; i++) + { + int blockIndex = Array.IndexOf(BlockOrder, i); + if (blockIndex == -1) // block empty + continue; + Array.Copy(Data, Box + (i - 5) * 0xF80, Data, blockIndex * 0x1000 + ABO, chunkLength[i]); + } + + setChecksums(); + return Data.Take(Data.Length - SIZE_RESERVED).ToArray(); + } + private readonly int ActiveSAV; private int ABO => ActiveSAV*0xE000; private readonly int[] BlockOrder; @@ -145,7 +182,7 @@ namespace PKHeX { byte[] chunk = Data.Skip(ABO + i*0x1000).Take(chunkLength[BlockOrder[i]]).ToArray(); ushort chk = SaveUtil.check32(chunk); - BitConverter.GetBytes(chk).CopyTo(Data, ABO + i + 0xFF4); + BitConverter.GetBytes(chk).CopyTo(Data, ABO + i*0x1000 + 0xFF6); } } public override bool ChecksumsValid @@ -156,7 +193,7 @@ namespace PKHeX { byte[] chunk = Data.Skip(ABO + i * 0x1000).Take(chunkLength[BlockOrder[i]]).ToArray(); ushort chk = SaveUtil.check32(chunk); - if (chk != BitConverter.ToUInt16(Data, ABO + i*0xFF4)) + if (chk != BitConverter.ToUInt16(Data, ABO + i*0x1000 + 0xFF6)) return false; } return true; @@ -171,8 +208,9 @@ namespace PKHeX { byte[] chunk = Data.Skip(ABO + i * 0x1000).Take(chunkLength[BlockOrder[i]]).ToArray(); ushort chk = SaveUtil.check32(chunk); - if (chk != BitConverter.ToUInt16(Data, ABO + i * 0xFF4)) - r += $"Block {BlockOrder[i]} @ {i*0x1000} (len {chunkLength[BlockOrder[i]]}) invalid." + Environment.NewLine; + ushort old = BitConverter.ToUInt16(Data, ABO + i*0x1000 + 0xFF6); + if (chk != old) + r += $"Block {BlockOrder[i].ToString("00")} @ {(i*0x1000).ToString("X5")} invalid." + Environment.NewLine; } return r.Length == 0 ? "Checksums valid." : r.TrimEnd(); } @@ -392,7 +430,7 @@ namespace PKHeX { // Box Wallpaper is directly after the Box Names int offset = getBoxOffset(BoxCount); - offset += BoxCount * 0x9; + offset += BoxCount * 0x9 + box; return Data[offset]; } public override string getBoxName(int box) diff --git a/Saves/SAV4.cs b/Saves/SAV4.cs index d9d2b07e0..dabfeb61c 100644 --- a/Saves/SAV4.cs +++ b/Saves/SAV4.cs @@ -28,9 +28,9 @@ namespace PKHeX switch (Version) { - case GameVersion.DP: Personal = PersonalInfo.DP; break; - case GameVersion.Pt: Personal = PersonalInfo.Pt; break; - case GameVersion.HGSS: Personal = PersonalInfo.HGSS; break; + case GameVersion.DP: Personal = PersonalTable.DP; break; + case GameVersion.Pt: Personal = PersonalTable.Pt; break; + case GameVersion.HGSS: Personal = PersonalTable.HGSS; break; } if (!Exportable) @@ -535,15 +535,15 @@ namespace PKHeX // Storage public override int CurrentBox { - get { return Data[Box - 4]; } - set { Data[Box - 4] = (byte)value; } + get { return Data[Version == GameVersion.HGSS ? getBoxOffset(BoxCount) : Box - 4]; } + set { Data[Version == GameVersion.HGSS ? getBoxOffset(BoxCount) : Box - 4] = (byte)value; } } public override int getBoxWallpaper(int box) { // Box Wallpaper is directly after the Box Names int offset = getBoxOffset(BoxCount); if (Version == GameVersion.HGSS) offset += 0x18; - offset += BoxCount*0x28; + offset += BoxCount*0x28 + box; return Data[offset]; } public override string getBoxName(int box) diff --git a/Saves/SAV5.cs b/Saves/SAV5.cs index d383b6f1f..d4dc3b12b 100644 --- a/Saves/SAV5.cs +++ b/Saves/SAV5.cs @@ -55,7 +55,7 @@ namespace PKHeX LegalMedicine = Legal.Pouch_Medicine_BW; LegalBerries = Legal.Pouch_Berries_BW; - Personal = PersonalInfo.BW; + Personal = PersonalTable.BW; break; case GameVersion.B2W2: // B2W2 BattleBox = 0x20900; @@ -78,7 +78,7 @@ namespace PKHeX LegalMedicine = Legal.Pouch_Medicine_BW; LegalBerries = Legal.Pouch_Berries_BW; - Personal = PersonalInfo.B2W2; + Personal = PersonalTable.B2W2; break; } HeldItems = Legal.HeldItems_BW; diff --git a/Saves/SAV6.cs b/Saves/SAV6.cs index 65a472183..df076efb0 100644 --- a/Saves/SAV6.cs +++ b/Saves/SAV6.cs @@ -21,7 +21,7 @@ namespace PKHeX getSAVOffsets(); HeldItems = ORAS ? Legal.HeldItem_AO : Legal.HeldItem_XY; - Personal = ORAS ? PersonalInfo.AO : PersonalInfo.XY; + Personal = ORAS ? PersonalTable.AO : PersonalTable.XY; if (!Exportable) resetBoxes(); } @@ -102,8 +102,39 @@ namespace PKHeX BitConverter.GetBytes(SaveUtil.ccitt16(array)).CopyTo(Data, BlockInfoOffset + 6 + i * 8); } } - public override bool ChecksumsValid => SaveUtil.verifyG6SAV(Data); - public override string ChecksumInfo => SaveUtil.verifyG6CHK(Data); + public override bool ChecksumsValid + { + get + { + for (int i = 0; i < Blocks.Length; i++) + { + byte[] array = Data.Skip(Blocks[i].Offset).Take(Blocks[i].Length).ToArray(); + if (SaveUtil.ccitt16(array) != BitConverter.ToUInt16(Data, BlockInfoOffset + 6 + i * 8)) + return false; + } + return true; + } + } + public override string ChecksumInfo + { + get + { + int invalid = 0; + string rv = ""; + for (int i = 0; i < Blocks.Length; i++) + { + byte[] array = Data.Skip(Blocks[i].Offset).Take(Blocks[i].Length).ToArray(); + if (SaveUtil.ccitt16(array) == BitConverter.ToUInt16(Data, BlockInfoOffset + 6 + i * 8)) + continue; + + invalid++; + rv += $"Invalid: {i.ToString("X2")} @ Region {Blocks[i].Offset.ToString("X5") + Environment.NewLine}"; + } + // Return Outputs + rv += $"SAV: {Blocks.Length - invalid}/{Blocks.Length + Environment.NewLine}"; + return rv; + } + } public ulong Secure1 { get { return BitConverter.ToUInt64(Data, BlockInfoOffset - 0x14); } @@ -170,6 +201,7 @@ namespace PKHeX WondercardFlags = 0x1BC00; SUBE = 0x1D890; SuperTrain = 0x1F200; + LinkInfo = 0x1FE00; Box = 0x22600; JPEG = 0x57200; @@ -215,6 +247,7 @@ namespace PKHeX SUBE = 0x1D890; PSSStats = 0x1F400; SuperTrain = 0x20200; + LinkInfo = 0x20E00; Contest = 0x23600; SecretBase = 0x23A00; EonTicket = 0x319B8; @@ -254,6 +287,7 @@ namespace PKHeX private int JPEG { get; set; } = int.MinValue; private int ItemInfo { get; set; } = int.MinValue; private int Daycare2 { get; set; } = int.MinValue; + private int LinkInfo { get; set; } = int.MinValue; // Accessible as SAV6 public int TrainerCard { get; private set; } = 0x14000; @@ -615,7 +649,8 @@ namespace PKHeX } public override int getBoxWallpaper(int box) { - return 1 + Data[PCBackgrounds + box]; + int ofs = PCBackgrounds > 0 && PCBackgrounds < Data.Length ? PCBackgrounds : 0; + return Data[ofs + box]; } public override string getBoxName(int box) { @@ -692,7 +727,7 @@ namespace PKHeX Data[PokeDexLanguageFlags + (bit * 7 + lang) / 8] |= (byte)(1 << ((bit * 7 + lang) % 8)); // Set Form flags - int fc = PKX.Personal[pkm.Species].FormeCount; + int fc = Personal[pkm.Species].FormeCount; int f = ORAS ? SaveUtil.getDexFormIndexORAS(pkm.Species, fc) : SaveUtil.getDexFormIndexXY(pkm.Species, fc); if (f >= 0) { @@ -790,6 +825,25 @@ namespace PKHeX setWC6(new WC6(), i); } } + + public byte[] LinkBlock + { + get + { + if (LinkInfo < 0) + return null; + return Data.Skip(LinkInfo).Take(0xC48).ToArray(); + } + set + { + if (LinkInfo < 0) + return; + if (value.Length != 0xC48) + return; + value.CopyTo(Data, LinkInfo); + } + } + private WC6 getWC6(int index) { if (WondercardData < 0) diff --git a/Saves/SaveFile.cs b/Saves/SaveFile.cs index e7c837e23..bd6c70f09 100644 --- a/Saves/SaveFile.cs +++ b/Saves/SaveFile.cs @@ -32,7 +32,7 @@ namespace PKHeX public ushort[] HeldItems { get; protected set; } // General SAV Properties - public byte[] Write(bool DSV) + public virtual byte[] Write(bool DSV) { setChecksums(); if (Footer.Length > 0 && DSV) @@ -45,11 +45,19 @@ namespace PKHeX public abstract bool ChecksumsValid { get; } public abstract string ChecksumInfo { get; } public abstract int Generation { get; } - public PersonalInfo[] Personal { get; protected set; } + public PersonalTable Personal { get; set; } public bool ORASDEMO => Data.Length == SaveUtil.SIZE_G6ORASDEMO; public bool ORAS => Version == GameVersion.OR || Version == GameVersion.AS; public bool XY => Version == GameVersion.X || Version == GameVersion.Y; + public bool B2W2 => Version == GameVersion.B2W2; + public bool BW => Version == GameVersion.BW; + public bool HGSS => Version == GameVersion.HGSS; + public bool Pt => Version == GameVersion.Pt; + public bool DP => Version == GameVersion.DP; + public bool E => Version == GameVersion.E; + public bool FRLG => Version == GameVersion.FRLG; + public bool RS => Version == GameVersion.RS; public virtual int MaxMoveID => int.MaxValue; public virtual int MaxSpeciesID => int.MaxValue; @@ -80,6 +88,7 @@ namespace PKHeX public virtual bool HasGeolocation => false; public bool HasPokeBlock => ORAS && !ORASDEMO; public bool HasEvents => EventFlags != null; + public bool HasLink => ORAS && !ORASDEMO || XY; // Counts protected virtual int GiftCountMax { get; } = int.MinValue; @@ -123,6 +132,8 @@ namespace PKHeX { data[i] = getStoredSlot(getBoxOffset(i/30) + SIZE_STORED*(i%30)); data[i].Identifier = $"{getBoxName(i/30)}:{(i%30 + 1).ToString("00")}"; + data[i].Box = i/30 + 1; + data[i].Slot = i%30 + 1; } return data; } @@ -145,7 +156,7 @@ namespace PKHeX { PKM[] data = new PKM[PartyCount]; for (int i = 0; i < data.Length; i++) - data[i] = getPartySlot(Party + SIZE_PARTY * i); + data[i] = getPartySlot(getPartyOffset(i)); return data; } set diff --git a/Saves/SaveUtil.cs b/Saves/SaveUtil.cs index 12d8f07af..0413eab07 100644 --- a/Saves/SaveUtil.cs +++ b/Saves/SaveUtil.cs @@ -77,7 +77,11 @@ namespace PKHeX // Detect RS/E/FRLG // Section 0 stores Game Code @ 0x00AC; 0 for RS, 1 for FRLG, else for Emerald - uint GameCode = BitConverter.ToUInt32(data, Array.IndexOf(BlockOrder, 0) * 0x1000 + 0xAC); + int Block0 = Array.IndexOf(BlockOrder, 0); + uint GameCode = BitConverter.ToUInt32(data, Block0 * 0x1000 + 0xAC); + if (GameCode == uint.MaxValue) + return GameVersion.Unknown; // what a hack + switch (GameCode) { case 0: return GameVersion.RS; @@ -212,134 +216,6 @@ namespace PKHeX } return crc; } - /// Simple check to see if the save is valid. - /// Input binary file - /// True/False - public static bool verifyG6SAV(byte[] savefile) - { - // Dynamic handling of checksums regardless of save size. - - int verificationOffset = savefile.Length - 0x200 + 0x10; - if (BitConverter.ToUInt32(savefile, verificationOffset) != BEEF) - verificationOffset -= 0x200; // No savegames have more than 0x3D blocks, maybe in the future? - - int count = (savefile.Length - verificationOffset - 0x8) / 8; - verificationOffset += 4; - int[] Lengths = new int[count]; - ushort[] BlockIDs = new ushort[count]; - ushort[] Checksums = new ushort[count]; - int[] Start = new int[count]; - int CurrentPosition = 0; - for (int i = 0; i < count; i++) - { - Start[i] = CurrentPosition; - Lengths[i] = BitConverter.ToInt32(savefile, verificationOffset + 0 + 8 * i); - BlockIDs[i] = BitConverter.ToUInt16(savefile, verificationOffset + 4 + 8 * i); - Checksums[i] = BitConverter.ToUInt16(savefile, verificationOffset + 6 + 8 * i); - - CurrentPosition += Lengths[i] % 0x200 == 0 ? Lengths[i] : 0x200 - Lengths[i] % 0x200 + Lengths[i]; - - if ((BlockIDs[i] != 0) || i == 0) continue; - count = i; - break; - } - // Verify checksums - for (int i = 0; i < count; i++) - { - ushort chk = ccitt16(savefile.Skip(Start[i]).Take(Lengths[i]).ToArray()); - ushort old = BitConverter.ToUInt16(savefile, verificationOffset + 6 + i * 8); - - if (chk != old) - return false; - } - return true; - } - /// Verbose check to see if the save is valid. - /// Input binary file - /// String containing invalid blocks. - public static string verifyG6CHK(byte[] savefile) - { - string rv = ""; - int invalid = 0; - // Dynamic handling of checksums regardless of save size. - - int verificationOffset = savefile.Length - 0x200 + 0x10; - if (BitConverter.ToUInt32(savefile, verificationOffset) != BEEF) - verificationOffset -= 0x200; // No savegames have more than 0x3D blocks, maybe in the future? - - int count = (savefile.Length - verificationOffset - 0x8) / 8; - verificationOffset += 4; - int[] Lengths = new int[count]; - ushort[] BlockIDs = new ushort[count]; - ushort[] Checksums = new ushort[count]; - int[] Start = new int[count]; - int CurrentPosition = 0; - for (int i = 0; i < count; i++) - { - Start[i] = CurrentPosition; - Lengths[i] = BitConverter.ToInt32(savefile, verificationOffset + 0 + 8 * i); - BlockIDs[i] = BitConverter.ToUInt16(savefile, verificationOffset + 4 + 8 * i); - Checksums[i] = BitConverter.ToUInt16(savefile, verificationOffset + 6 + 8 * i); - - CurrentPosition += Lengths[i] % 0x200 == 0 ? Lengths[i] : 0x200 - Lengths[i] % 0x200 + Lengths[i]; - - if (BlockIDs[i] != 0 || i == 0) continue; - count = i; - break; - } - // Apply checksums - for (int i = 0; i < count; i++) - { - ushort chk = ccitt16(savefile.Skip(Start[i]).Take(Lengths[i]).ToArray()); - ushort old = BitConverter.ToUInt16(savefile, verificationOffset + 6 + i * 8); - - if (chk == old) continue; - - invalid++; - rv += $"Invalid: {i.ToString("X2")} @ Region {Start[i].ToString("X5") + Environment.NewLine}"; - } - // Return Outputs - rv += $"SAV: {count - invalid}/{count + Environment.NewLine}"; - return rv; - } - /// Fix checksums in the input save file. - /// Input binary file - /// Fixed save file. - public static void writeG6CHK(byte[] savefile) - { - // Dynamic handling of checksums regardless of save size. - - int verificationOffset = savefile.Length - 0x200 + 0x10; - if (BitConverter.ToUInt32(savefile, verificationOffset) != BEEF) - verificationOffset -= 0x200; // No savegames have more than 0x3D blocks, maybe in the future? - - int count = (savefile.Length - verificationOffset - 0x8) / 8; - verificationOffset += 4; - int[] Lengths = new int[count]; - ushort[] BlockIDs = new ushort[count]; - ushort[] Checksums = new ushort[count]; - int[] Start = new int[count]; - int CurrentPosition = 0; - for (int i = 0; i < count; i++) - { - Start[i] = CurrentPosition; - Lengths[i] = BitConverter.ToInt32(savefile, verificationOffset + 0 + 8 * i); - BlockIDs[i] = BitConverter.ToUInt16(savefile, verificationOffset + 4 + 8 * i); - Checksums[i] = BitConverter.ToUInt16(savefile, verificationOffset + 6 + 8 * i); - - CurrentPosition += Lengths[i] % 0x200 == 0 ? Lengths[i] : 0x200 - Lengths[i] % 0x200 + Lengths[i]; - - if (BlockIDs[i] != 0 || i == 0) continue; - count = i; - break; - } - // Apply checksums - for (int i = 0; i < count; i++) - { - byte[] array = savefile.Skip(Start[i]).Take(Lengths[i]).ToArray(); - BitConverter.GetBytes(ccitt16(array)).CopyTo(savefile, verificationOffset + 6 + i * 8); - } - } /// Calculates the 32bit checksum over an input byte array. Used in GBA save files. /// Input byte array /// Checksum @@ -348,7 +224,7 @@ namespace PKHeX uint val = 0; for (int i = 0; i < data.Length; i += 4) val += BitConverter.ToUInt32(data, i); - return (ushort)(val + val >> 16); + return (ushort)((val & 0xFFFF) + (val >> 16)); } public static int getDexFormIndexXY(int species, int formct) diff --git a/Subforms/PKM Editors/BatchEditor.Designer.cs b/Subforms/PKM Editors/BatchEditor.Designer.cs index 12b69494b..0d51bd986 100644 --- a/Subforms/PKM Editors/BatchEditor.Designer.cs +++ b/Subforms/PKM Editors/BatchEditor.Designer.cs @@ -36,6 +36,10 @@ this.RTB_Instructions = new System.Windows.Forms.RichTextBox(); this.B_Go = new System.Windows.Forms.Button(); this.PB_Show = new System.Windows.Forms.ProgressBar(); + this.CB_Format = new System.Windows.Forms.ComboBox(); + this.CB_Property = new System.Windows.Forms.ComboBox(); + this.CB_Require = new System.Windows.Forms.ComboBox(); + this.B_Add = new System.Windows.Forms.Button(); this.FLP_RB.SuspendLayout(); this.SuspendLayout(); // @@ -78,17 +82,18 @@ this.FLP_RB.Controls.Add(this.TB_Folder); this.FLP_RB.Location = new System.Drawing.Point(12, 10); this.FLP_RB.Name = "FLP_RB"; - this.FLP_RB.Size = new System.Drawing.Size(260, 24); + this.FLP_RB.Size = new System.Drawing.Size(370, 24); this.FLP_RB.TabIndex = 2; // // TB_Folder // - this.TB_Folder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.TB_Folder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.TB_Folder.Location = new System.Drawing.Point(118, 2); this.TB_Folder.Margin = new System.Windows.Forms.Padding(2); this.TB_Folder.Name = "TB_Folder"; this.TB_Folder.ReadOnly = true; - this.TB_Folder.Size = new System.Drawing.Size(140, 20); + this.TB_Folder.Size = new System.Drawing.Size(250, 20); this.TB_Folder.TabIndex = 4; this.TB_Folder.Visible = false; // @@ -99,16 +104,16 @@ | System.Windows.Forms.AnchorStyles.Right))); this.RTB_Instructions.Location = new System.Drawing.Point(12, 68); this.RTB_Instructions.Name = "RTB_Instructions"; - this.RTB_Instructions.Size = new System.Drawing.Size(260, 181); + this.RTB_Instructions.Size = new System.Drawing.Size(370, 157); this.RTB_Instructions.TabIndex = 5; - this.RTB_Instructions.Text = "!HeldItem=0\n=Gender=2\n.Species=1"; + this.RTB_Instructions.Text = ""; // // B_Go // - this.B_Go.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.B_Go.Location = new System.Drawing.Point(197, 39); + this.B_Go.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.B_Go.Location = new System.Drawing.Point(325, 230); this.B_Go.Name = "B_Go"; - this.B_Go.Size = new System.Drawing.Size(75, 23); + this.B_Go.Size = new System.Drawing.Size(57, 23); this.B_Go.TabIndex = 6; this.B_Go.Text = "Run"; this.B_Go.UseVisualStyleBackColor = true; @@ -116,17 +121,78 @@ // // PB_Show // - this.PB_Show.Location = new System.Drawing.Point(12, 41); + this.PB_Show.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PB_Show.Location = new System.Drawing.Point(12, 231); this.PB_Show.Name = "PB_Show"; - this.PB_Show.Size = new System.Drawing.Size(180, 18); + this.PB_Show.Size = new System.Drawing.Size(307, 21); this.PB_Show.TabIndex = 7; // + // CB_Format + // + this.CB_Format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_Format.FormattingEnabled = true; + this.CB_Format.Items.AddRange(new object[] { + "All", + "pk6", + "pk5", + "pk4", + "pk3", + "Any"}); + this.CB_Format.Location = new System.Drawing.Point(11, 40); + this.CB_Format.Name = "CB_Format"; + this.CB_Format.Size = new System.Drawing.Size(44, 21); + this.CB_Format.TabIndex = 8; + this.CB_Format.SelectedIndexChanged += new System.EventHandler(this.CB_Format_SelectedIndexChanged); + // + // CB_Property + // + this.CB_Property.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.CB_Property.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.CB_Property.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.CB_Property.DropDownWidth = 200; + this.CB_Property.FormattingEnabled = true; + this.CB_Property.Location = new System.Drawing.Point(61, 40); + this.CB_Property.Name = "CB_Property"; + this.CB_Property.Size = new System.Drawing.Size(140, 21); + this.CB_Property.TabIndex = 9; + // + // CB_Require + // + this.CB_Require.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.CB_Require.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_Require.FormattingEnabled = true; + this.CB_Require.Items.AddRange(new object[] { + "Set Equal To", + "Require Equals", + "Require Not Equals"}); + this.CB_Require.Location = new System.Drawing.Point(207, 40); + this.CB_Require.Name = "CB_Require"; + this.CB_Require.Size = new System.Drawing.Size(111, 21); + this.CB_Require.TabIndex = 10; + // + // B_Add + // + this.B_Add.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.B_Add.Location = new System.Drawing.Point(324, 39); + this.B_Add.Name = "B_Add"; + this.B_Add.Size = new System.Drawing.Size(57, 23); + this.B_Add.TabIndex = 11; + this.B_Add.Text = "Add"; + this.B_Add.UseVisualStyleBackColor = true; + this.B_Add.Click += new System.EventHandler(this.B_Add_Click); + // // BatchEditor // this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(284, 261); + this.ClientSize = new System.Drawing.Size(394, 261); + this.Controls.Add(this.B_Add); + this.Controls.Add(this.CB_Require); + this.Controls.Add(this.CB_Property); + this.Controls.Add(this.CB_Format); this.Controls.Add(this.PB_Show); this.Controls.Add(this.B_Go); this.Controls.Add(this.RTB_Instructions); @@ -134,6 +200,7 @@ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(410, 300); this.Name = "BatchEditor"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Batch Editor"; @@ -152,5 +219,9 @@ private System.Windows.Forms.RichTextBox RTB_Instructions; private System.Windows.Forms.Button B_Go; private System.Windows.Forms.ProgressBar PB_Show; + private System.Windows.Forms.ComboBox CB_Format; + private System.Windows.Forms.ComboBox CB_Property; + private System.Windows.Forms.ComboBox CB_Require; + private System.Windows.Forms.Button B_Add; } } \ No newline at end of file diff --git a/Subforms/PKM Editors/BatchEditor.cs b/Subforms/PKM Editors/BatchEditor.cs index a05ed20ae..ffb3f9d59 100644 --- a/Subforms/PKM Editors/BatchEditor.cs +++ b/Subforms/PKM Editors/BatchEditor.cs @@ -14,8 +14,19 @@ namespace PKHeX InitializeComponent(); DragDrop += tabMain_DragDrop; DragEnter += tabMain_DragEnter; + CB_Format.SelectedIndex = CB_Require.SelectedIndex = 0; } + private const string CONST_RAND = "$rand"; + private const string CONST_SHINY = "$shiny"; + private int currentFormat = -1; + private static readonly string[] pk6 = ReflectUtil.getPropertiesCanWritePublic(typeof(PK6)).OrderBy(i=>i).ToArray(); + private static readonly string[] pk5 = ReflectUtil.getPropertiesCanWritePublic(typeof(PK5)).OrderBy(i=>i).ToArray(); + private static readonly string[] pk4 = ReflectUtil.getPropertiesCanWritePublic(typeof(PK4)).OrderBy(i=>i).ToArray(); + private static readonly string[] pk3 = ReflectUtil.getPropertiesCanWritePublic(typeof(PK3)).OrderBy(i=>i).ToArray(); + private static readonly string[] all = pk6.Intersect(pk5).Intersect(pk4).Intersect(pk3).OrderBy(i => i).ToArray(); + private static readonly string[] any = pk6.Union(pk5).Union(pk4).Union(pk3).Distinct().OrderBy(i => i).ToArray(); + // GUI Methods private void B_Open_Click(object sender, EventArgs e) { @@ -46,10 +57,16 @@ namespace PKHeX private BackgroundWorker b = new BackgroundWorker { WorkerReportsProgress = true }; private void runBackgroundWorker() { + var Filters = getFilters().ToList(); + if (Filters.Any(z => string.IsNullOrWhiteSpace(z.PropertyValue))) + { Util.Error("Empty Filter Value detected."); return; } + + var Instructions = getInstructions().ToList(); + if (Instructions.Any(z => string.IsNullOrWhiteSpace(z.PropertyValue))) + { Util.Error("Empty Property Value detected."); return; } + FLP_RB.Enabled = RTB_Instructions.Enabled = B_Go.Enabled = false; - var Filters = getFilters().ToList(); - var Instructions = getInstructions().ToList(); b = new BackgroundWorker {WorkerReportsProgress = true}; b.DoWork += (sender, e) => { @@ -71,6 +88,9 @@ namespace PKHeX setProgressBar(e.ProgressPercentage); }; b.RunWorkerCompleted += (sender, e) => { + string result = $"Modified {ctr}/{len} files."; + if (err > 0) + result += Environment.NewLine + $"{err} files ignored due to an internal error."; Util.Alert(result); FLP_RB.Enabled = RTB_Instructions.Enabled = B_Go.Enabled = true; setupProgressBar(0); @@ -95,7 +115,7 @@ namespace PKHeX } // Mass Editing - private string result = ""; + private int ctr, len, err; private IEnumerable getFilters() { var raw = @@ -124,21 +144,26 @@ namespace PKHeX } private void processSAV(PKM[] data, List Filters, List Instructions) { - int ctr = 0; + len = err = ctr = 0; for (int i = 0; i < data.Length; i++) { var pkm = data[i]; - if (ProcessPKM(pkm, Filters, Instructions)) + ModifyResult r = ProcessPKM(pkm, Filters, Instructions); + if (r != ModifyResult.Invalid) + len++; + if (r == ModifyResult.Error) + err++; + if (r == ModifyResult.Modified) ctr++; + b.ReportProgress(i); } Main.SAV.BoxData = data; - result = $"Modified {ctr}/{data.Length} files."; } private void processFolder(string[] files, List Filters, List Instructions) { - int ctr = 0; + len = err = ctr = 0; for (int i = 0; i < files.Length; i++) { string file = files[i]; @@ -150,13 +175,19 @@ namespace PKHeX byte[] data = File.ReadAllBytes(file); var pkm = PKMConverter.getPKMfromBytes(data); - if (ProcessPKM(pkm, Filters, Instructions)) + ModifyResult r = ProcessPKM(pkm, Filters, Instructions); + if (r != ModifyResult.Invalid) + len++; + if (r == ModifyResult.Error) + err++; + if (r == ModifyResult.Modified) + { ctr++; + File.WriteAllBytes(file, pkm.DecryptedBoxData); + } - File.WriteAllBytes(file, pkm.DecryptedBoxData); b.ReportProgress(i); } - result = $"Modified {ctr}/{files.Length} files."; } private void tabMain_DragEnter(object sender, DragEventArgs e) @@ -175,38 +206,91 @@ namespace PKHeX } // Utility Methods - private class StringInstruction + public class StringInstruction { public string PropertyName; public string PropertyValue; public bool Evaluator; } - private static bool ProcessPKM(PKM PKM, IEnumerable Filters, IEnumerable Instructions) + private enum ModifyResult { - if (!PKM.ChecksumValid) - return false; - if (PKM.Species == 0) - return false; + Invalid, + Error, + Filtered, + Modified, + } + private static ModifyResult ProcessPKM(PKM PKM, IEnumerable Filters, IEnumerable Instructions) + { + if (!PKM.ChecksumValid || PKM.Species == 0) + return ModifyResult.Invalid; + + Type pkm = PKM.GetType(); + foreach (var cmd in Filters) { try { + if (!pkm.HasProperty(cmd.PropertyName)) + return ModifyResult.Filtered; if (ReflectUtil.GetValueEquals(PKM, cmd.PropertyName, cmd.PropertyValue) != cmd.Evaluator) - return false; + return ModifyResult.Filtered; } catch { Console.WriteLine($"Unable to compare {cmd.PropertyName} to {cmd.PropertyValue}."); - return false; + return ModifyResult.Filtered; } } + ModifyResult result = ModifyResult.Error; foreach (var cmd in Instructions) { - try { ReflectUtil.SetValue(PKM, cmd.PropertyName, cmd.PropertyValue); } + try + { + if (cmd.PropertyValue == CONST_RAND && (cmd.PropertyName == "PID" || cmd.PropertyName == "EncryptionConstant")) + ReflectUtil.SetValue(PKM, cmd.PropertyName, Util.rnd32().ToString()); + else if (cmd.PropertyValue == CONST_SHINY && cmd.PropertyName == "PID") + PKM.setShinyPID(); + else + ReflectUtil.SetValue(PKM, cmd.PropertyName, cmd.PropertyValue); + + result = ModifyResult.Modified; + } catch { Console.WriteLine($"Unable to set {cmd.PropertyName} to {cmd.PropertyValue}."); } } - return true; + return result; + } + + private void B_Add_Click(object sender, EventArgs e) + { + if (CB_Property.SelectedIndex < 0) + { Util.Alert("Invalid property selected."); return; } + + char[] prefix = {'.', '=', '!'}; + string s = prefix[CB_Require.SelectedIndex] + CB_Property.Items[CB_Property.SelectedIndex].ToString() + "="; + if (RTB_Instructions.Lines.Length != 0 && RTB_Instructions.Lines.Last().Length > 0) + s = Environment.NewLine + s; + + RTB_Instructions.AppendText(s); + } + + private void CB_Format_SelectedIndexChanged(object sender, EventArgs e) + { + if (currentFormat == CB_Format.SelectedIndex) + return; + + CB_Property.Items.Clear(); + switch (CB_Format.SelectedIndex) + { + case 0: CB_Property.Items.AddRange(all.ToArray()); break; // All + case 1: CB_Property.Items.AddRange(pk6.ToArray()); break; + case 2: CB_Property.Items.AddRange(pk5.ToArray()); break; + case 3: CB_Property.Items.AddRange(pk4.ToArray()); break; + case 4: CB_Property.Items.AddRange(pk3.ToArray()); break; + case 5: CB_Property.Items.AddRange(any.ToArray()); break; // Any + } + CB_Property.SelectedIndex = 0; + currentFormat = CB_Format.SelectedIndex; } } } diff --git a/Subforms/PKM Editors/MemoryAmie.cs b/Subforms/PKM Editors/MemoryAmie.cs index 54034e8cf..49534a774 100644 --- a/Subforms/PKM Editors/MemoryAmie.cs +++ b/Subforms/PKM Editors/MemoryAmie.cs @@ -425,9 +425,9 @@ namespace PKHeX } private void changeCountryText(object sender, EventArgs e) { - if ((sender as ComboBox).Text == "") + if (((ComboBox) sender).Text == "") { - (sender as ComboBox).SelectedValue = 0; + ((ComboBox) sender).SelectedValue = 0; changeCountryIndex(sender, e); } } @@ -437,7 +437,7 @@ namespace PKHeX MaskedTextBox mtb = sender as MaskedTextBox; try { - int val = Util.ToInt32(mtb.Text); + int val = Util.ToInt32(mtb?.Text); if (val > 255) mtb.Text = "255"; } catch { mtb.Text = "0"; } diff --git a/Subforms/PKM Editors/RibbonEditor.Designer.cs b/Subforms/PKM Editors/RibbonEditor.Designer.cs index a09a92cb6..d95fcad81 100644 --- a/Subforms/PKM Editors/RibbonEditor.Designer.cs +++ b/Subforms/PKM Editors/RibbonEditor.Designer.cs @@ -47,7 +47,7 @@ // 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(318, 249); + this.B_Save.Location = new System.Drawing.Point(418, 249); this.B_Save.Name = "B_Save"; this.B_Save.Size = new System.Drawing.Size(90, 23); this.B_Save.TabIndex = 1; @@ -58,7 +58,7 @@ // 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(222, 249); + this.B_Cancel.Location = new System.Drawing.Point(322, 249); this.B_Cancel.Name = "B_Cancel"; this.B_Cancel.Size = new System.Drawing.Size(90, 23); this.B_Cancel.TabIndex = 2; @@ -98,7 +98,7 @@ this.PAN_Container.Controls.Add(this.SPLIT_Ribbons); this.PAN_Container.Location = new System.Drawing.Point(12, 12); this.PAN_Container.Name = "PAN_Container"; - this.PAN_Container.Size = new System.Drawing.Size(396, 231); + this.PAN_Container.Size = new System.Drawing.Size(496, 231); this.PAN_Container.TabIndex = 6; // // SPLIT_Ribbons @@ -121,8 +121,8 @@ this.SPLIT_Ribbons.Panel2.Controls.Add(this.TLP_Ribbons); this.SPLIT_Ribbons.Panel2.RightToLeft = System.Windows.Forms.RightToLeft.No; this.SPLIT_Ribbons.Panel2MinSize = 1; - this.SPLIT_Ribbons.Size = new System.Drawing.Size(394, 229); - this.SPLIT_Ribbons.SplitterDistance = 180; + this.SPLIT_Ribbons.Size = new System.Drawing.Size(494, 229); + this.SPLIT_Ribbons.SplitterDistance = 270; this.SPLIT_Ribbons.SplitterWidth = 1; this.SPLIT_Ribbons.TabIndex = 7; // @@ -132,7 +132,7 @@ this.FLP_Ribbons.Dock = System.Windows.Forms.DockStyle.Fill; this.FLP_Ribbons.Location = new System.Drawing.Point(0, 0); this.FLP_Ribbons.Name = "FLP_Ribbons"; - this.FLP_Ribbons.Size = new System.Drawing.Size(178, 227); + this.FLP_Ribbons.Size = new System.Drawing.Size(268, 227); this.FLP_Ribbons.TabIndex = 5; // // TLP_Ribbons @@ -147,14 +147,14 @@ this.TLP_Ribbons.Name = "TLP_Ribbons"; this.TLP_Ribbons.RowCount = 1; this.TLP_Ribbons.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.TLP_Ribbons.Size = new System.Drawing.Size(211, 227); + this.TLP_Ribbons.Size = new System.Drawing.Size(221, 227); this.TLP_Ribbons.TabIndex = 3; // // RibbonEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(424, 281); + this.ClientSize = new System.Drawing.Size(524, 281); this.Controls.Add(this.PAN_Container); this.Controls.Add(this.B_None); this.Controls.Add(this.B_All); @@ -162,7 +162,7 @@ this.Controls.Add(this.B_Save); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; - this.MinimumSize = new System.Drawing.Size(440, 320); + this.MinimumSize = new System.Drawing.Size(540, 320); this.Name = "RibbonEditor"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Ribbon Editor"; diff --git a/Subforms/PKM Editors/RibbonEditor.cs b/Subforms/PKM Editors/RibbonEditor.cs index 18591b473..1a8ad5292 100644 --- a/Subforms/PKM Editors/RibbonEditor.cs +++ b/Subforms/PKM Editors/RibbonEditor.cs @@ -89,6 +89,7 @@ namespace PKHeX Name = PrefixLabel + rib.Name, Text = rib.Name, Padding = Padding.Empty, + Margin = Padding.Empty, AutoSize = true, }; TLP_Ribbons.Controls.Add(label, 1, row); @@ -103,6 +104,7 @@ namespace PKHeX Width = 35, Increment = 1, Padding = Padding.Empty, + Margin = Padding.Empty, }; if (rib.Name.Contains("MemoryContest")) nud.Maximum = 40; @@ -141,10 +143,13 @@ namespace PKHeX Name = PrefixCHK + rib.Name, AutoSize = true, Padding = Padding.Empty, + Margin = Padding.Empty, }; chk.CheckedChanged += (sender, e) => { rib.HasRibbon = chk.Checked; FLP_Ribbons.Controls[PrefixPB + rib.Name].Visible = rib.HasRibbon; }; chk.Checked = rib.HasRibbon; TLP_Ribbons.Controls.Add(chk, 0, row); + + label.Click += (sender, e) => { chk.Checked ^= true; }; } } private void save() diff --git a/Subforms/PKM Editors/Text.cs b/Subforms/PKM Editors/Text.cs index 145bb7ca1..b2b09a7d0 100644 --- a/Subforms/PKM Editors/Text.cs +++ b/Subforms/PKM Editors/Text.cs @@ -42,7 +42,7 @@ namespace PKHeX { string nickname = TB_Nickname.Text; if (nickname.Length < TB_Nickname.MaxLength) - TB_Nickname.Text += (sender as Label).Text; + TB_Nickname.Text += ((Label) sender).Text; } } } diff --git a/Subforms/SAV_Database.Designer.cs b/Subforms/SAV_Database.Designer.cs index 8c9920e2b..8e022359c 100644 --- a/Subforms/SAV_Database.Designer.cs +++ b/Subforms/SAV_Database.Designer.cs @@ -99,6 +99,7 @@ this.Menu_SearchDatabase = new System.Windows.Forms.ToolStripMenuItem(); this.Menu_SearchLegal = new System.Windows.Forms.ToolStripMenuItem(); this.Menu_SearchIllegal = new System.Windows.Forms.ToolStripMenuItem(); + this.Menu_SearchAdvanced = new System.Windows.Forms.ToolStripMenuItem(); this.Menu_OpenDB = new System.Windows.Forms.ToolStripMenuItem(); this.Menu_Report = new System.Windows.Forms.ToolStripMenuItem(); this.Menu_Export = new System.Windows.Forms.ToolStripMenuItem(); @@ -150,10 +151,11 @@ this.CHK_Shiny = new System.Windows.Forms.CheckBox(); this.TLP_Filters = new System.Windows.Forms.TableLayoutPanel(); this.FLP_Format = new System.Windows.Forms.FlowLayoutPanel(); - this.CB_Format = new System.Windows.Forms.ComboBox(); this.CB_FormatComparator = new System.Windows.Forms.ComboBox(); + this.CB_Format = new System.Windows.Forms.ComboBox(); this.L_Format = new System.Windows.Forms.Label(); this.FLP_Level = new System.Windows.Forms.FlowLayoutPanel(); + this.RTB_Instructions = new System.Windows.Forms.RichTextBox(); ((System.ComponentModel.ISupportInitialize)(this.bpkx30)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bpkx29)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bpkx28)).BeginInit(); @@ -947,7 +949,8 @@ this.Menu_SearchBoxes, this.Menu_SearchDatabase, this.Menu_SearchLegal, - this.Menu_SearchIllegal}); + this.Menu_SearchIllegal, + this.Menu_SearchAdvanced}); this.Menu_SearchSettings.Image = global::PKHeX.Properties.Resources.settings; this.Menu_SearchSettings.Name = "Menu_SearchSettings"; this.Menu_SearchSettings.Size = new System.Drawing.Size(197, 22); @@ -959,7 +962,7 @@ this.Menu_SearchBoxes.CheckOnClick = true; this.Menu_SearchBoxes.CheckState = System.Windows.Forms.CheckState.Checked; this.Menu_SearchBoxes.Name = "Menu_SearchBoxes"; - this.Menu_SearchBoxes.Size = new System.Drawing.Size(198, 22); + this.Menu_SearchBoxes.Size = new System.Drawing.Size(207, 22); this.Menu_SearchBoxes.Text = "Search Within Boxes"; // // Menu_SearchDatabase @@ -968,7 +971,7 @@ this.Menu_SearchDatabase.CheckOnClick = true; this.Menu_SearchDatabase.CheckState = System.Windows.Forms.CheckState.Checked; this.Menu_SearchDatabase.Name = "Menu_SearchDatabase"; - this.Menu_SearchDatabase.Size = new System.Drawing.Size(198, 22); + this.Menu_SearchDatabase.Size = new System.Drawing.Size(207, 22); this.Menu_SearchDatabase.Text = "Search Within Database"; // // Menu_SearchLegal @@ -977,7 +980,7 @@ this.Menu_SearchLegal.CheckOnClick = true; this.Menu_SearchLegal.CheckState = System.Windows.Forms.CheckState.Checked; this.Menu_SearchLegal.Name = "Menu_SearchLegal"; - this.Menu_SearchLegal.Size = new System.Drawing.Size(198, 22); + this.Menu_SearchLegal.Size = new System.Drawing.Size(207, 22); this.Menu_SearchLegal.Text = "Show Legal"; // // Menu_SearchIllegal @@ -986,9 +989,18 @@ this.Menu_SearchIllegal.CheckOnClick = true; this.Menu_SearchIllegal.CheckState = System.Windows.Forms.CheckState.Checked; this.Menu_SearchIllegal.Name = "Menu_SearchIllegal"; - this.Menu_SearchIllegal.Size = new System.Drawing.Size(198, 22); + this.Menu_SearchIllegal.Size = new System.Drawing.Size(207, 22); this.Menu_SearchIllegal.Text = "Show Illegal"; // + // Menu_SearchAdvanced + // + this.Menu_SearchAdvanced.CheckOnClick = true; + this.Menu_SearchAdvanced.Name = "Menu_SearchAdvanced"; + this.Menu_SearchAdvanced.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); + this.Menu_SearchAdvanced.Size = new System.Drawing.Size(207, 22); + this.Menu_SearchAdvanced.Text = "Advanced Search"; + this.Menu_SearchAdvanced.Click += new System.EventHandler(this.Menu_SearchAdvanced_Click); + // // Menu_OpenDB // this.Menu_OpenDB.Image = global::PKHeX.Properties.Resources.folder; @@ -1026,7 +1038,7 @@ // // PAN_Box // - this.PAN_Box.BackgroundImage = global::PKHeX.Properties.Resources.box_wp16; + this.PAN_Box.BackgroundImage = global::PKHeX.Properties.Resources.box_wp16xy; this.PAN_Box.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.PAN_Box.Controls.Add(this.bpkx66); this.PAN_Box.Controls.Add(this.bpkx65); @@ -1655,8 +1667,7 @@ // // TLP_Filters // - this.TLP_Filters.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.TLP_Filters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.TLP_Filters.AutoScroll = true; this.TLP_Filters.AutoScrollMargin = new System.Drawing.Size(3, 3); @@ -1730,6 +1741,23 @@ this.FLP_Format.Size = new System.Drawing.Size(122, 21); this.FLP_Format.TabIndex = 124; // + // CB_FormatComparator + // + this.CB_FormatComparator.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.CB_FormatComparator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_FormatComparator.FormattingEnabled = true; + this.CB_FormatComparator.Items.AddRange(new object[] { + "Any", + ">=", + "==", + "<="}); + this.CB_FormatComparator.Location = new System.Drawing.Point(0, 0); + this.CB_FormatComparator.Margin = new System.Windows.Forms.Padding(0); + this.CB_FormatComparator.Name = "CB_FormatComparator"; + this.CB_FormatComparator.Size = new System.Drawing.Size(54, 21); + this.CB_FormatComparator.TabIndex = 122; + this.CB_FormatComparator.SelectedIndexChanged += new System.EventHandler(this.changeFormatFilter); + // // CB_Format // this.CB_Format.Anchor = System.Windows.Forms.AnchorStyles.Left; @@ -1748,23 +1776,6 @@ this.CB_Format.TabIndex = 121; this.CB_Format.Visible = false; // - // CB_FormatComparator - // - this.CB_FormatComparator.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.CB_FormatComparator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CB_FormatComparator.FormattingEnabled = true; - this.CB_FormatComparator.Items.AddRange(new object[] { - "Any", - ">=", - "==", - "<="}); - this.CB_FormatComparator.Location = new System.Drawing.Point(0, 0); - this.CB_FormatComparator.Margin = new System.Windows.Forms.Padding(0); - this.CB_FormatComparator.Name = "CB_FormatComparator"; - this.CB_FormatComparator.Size = new System.Drawing.Size(54, 21); - this.CB_FormatComparator.TabIndex = 122; - this.CB_FormatComparator.SelectedIndexChanged += new System.EventHandler(this.changeFormatFilter); - // // L_Format // this.L_Format.Anchor = System.Windows.Forms.AnchorStyles.Right; @@ -1789,6 +1800,16 @@ this.FLP_Level.Size = new System.Drawing.Size(88, 21); this.FLP_Level.TabIndex = 119; // + // RTB_Instructions + // + this.RTB_Instructions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.RTB_Instructions.Location = new System.Drawing.Point(63, 27); + this.RTB_Instructions.Name = "RTB_Instructions"; + this.RTB_Instructions.Size = new System.Drawing.Size(235, 352); + this.RTB_Instructions.TabIndex = 119; + this.RTB_Instructions.Text = ""; + // // SAV_Database // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1801,6 +1822,7 @@ this.Controls.Add(this.B_Reset); this.Controls.Add(this.P_Results); this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.RTB_Instructions); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; @@ -2019,5 +2041,7 @@ private System.Windows.Forms.FlowLayoutPanel FLP_Format; private System.Windows.Forms.ComboBox CB_FormatComparator; private System.Windows.Forms.ComboBox CB_Format; + private System.Windows.Forms.RichTextBox RTB_Instructions; + private System.Windows.Forms.ToolStripMenuItem Menu_SearchAdvanced; } } \ No newline at end of file diff --git a/Subforms/SAV_Database.cs b/Subforms/SAV_Database.cs index 7b274db36..f9c0f5b2d 100644 --- a/Subforms/SAV_Database.cs +++ b/Subforms/SAV_Database.cs @@ -306,6 +306,7 @@ namespace PKHeX CB_Generation.SelectedIndex = 0; MT_ESV.Visible = L_ESV.Visible = false; + RTB_Instructions.Clear(); if (sender != null) System.Media.SystemSounds.Asterisk.Play(); @@ -547,6 +548,36 @@ namespace PKHeX if (!Menu_SearchLegal.Checked && Menu_SearchIllegal.Checked) // Illegal Only res = res.Where(pk => pk.Gen6 && pk is PK6 && !new LegalityAnalysis((PK6) pk).Valid); + if (RTB_Instructions.Lines.Any(line => line.Length > 0)) + { + var raw = + RTB_Instructions.Lines + .Where(line => !string.IsNullOrWhiteSpace(line)) + .Where(line => new[] { '!', '=' }.Contains(line[0])); + + var filters = (from line in raw + let eval = line[0] == '=' + let split = line.Substring(1).Split('=') + where split.Length == 2 && !string.IsNullOrWhiteSpace(split[0]) + select new BatchEditor.StringInstruction { PropertyName = split[0], PropertyValue = split[1], Evaluator = eval }).ToArray(); + + if (filters.Any(z => string.IsNullOrWhiteSpace(z.PropertyValue))) + { Util.Error("Empty Filter Value detected."); return; } + + res = res.Where(pkm => // Compare across all filters + { + foreach (var cmd in filters) + { + if (!pkm.GetType().HasProperty(cmd.PropertyName)) + return false; + try { if (ReflectUtil.GetValueEquals(pkm, cmd.PropertyName, cmd.PropertyValue) == cmd.Evaluator) continue; } + catch { Console.WriteLine($"Unable to compare {cmd.PropertyName} to {cmd.PropertyValue}."); } + return false; + } + return true; + }); + } + var results = res.ToArray(); if (results.Length == 0) { @@ -639,6 +670,12 @@ namespace PKHeX var any = result[0][0]; m_parent.populateFields(any); } + private void Menu_SearchAdvanced_Click(object sender, EventArgs e) + { + if (!Menu_SearchAdvanced.Checked) + { Size = MinimumSize; RTB_Instructions.Clear(); } + else Size = MaximumSize; + } private void Menu_Exit_Click(object sender, EventArgs e) { diff --git a/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs b/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs index fb2a0ff4b..671edb669 100644 --- a/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs +++ b/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs @@ -1,5 +1,4 @@ using System; -using System.Drawing; using System.Windows.Forms; namespace PKHeX @@ -61,8 +60,7 @@ namespace PKHeX if (!editing) SAV.Data[SAV.PCBackgrounds + LB_BoxSelect.SelectedIndex] = (byte)CB_BG.SelectedIndex; - string imagename = "box_wp" + (CB_BG.SelectedIndex + 1).ToString("00"); if (SAV.ORAS && CB_BG.SelectedIndex + 1 > 16) imagename += "o"; - PAN_BG.BackgroundImage = (Image)Properties.Resources.ResourceManager.GetObject(imagename); + PAN_BG.BackgroundImage = BoxWallpaper.getWallpaper(SAV, CB_BG.SelectedIndex); } } } \ No newline at end of file diff --git a/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs b/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs index 9176c646f..fcfebd46c 100644 --- a/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs +++ b/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs @@ -15,7 +15,7 @@ namespace PKHeX Array.Copy(SAV.Data, SAV.HoF, data, 0, data.Length); //Copy HoF section of save into Data Setup(); - editor_spec = new object[]{ + editor_spec = new Control[]{ GB_OT, GB_CurrentMoves, CB_Species, @@ -54,7 +54,7 @@ namespace PKHeX private readonly string[] gendersymbols = Main.gendersymbols; private readonly byte[] data = new byte[0x1B40]; - private readonly object[] editor_spec; + private readonly Control[] editor_spec; private void Setup() { @@ -64,33 +64,24 @@ namespace PKHeX CB_Move2.Items.Clear(); CB_Move3.Items.Clear(); CB_Move4.Items.Clear(); + + CB_Species.DisplayMember = "Text"; + CB_Species.ValueMember = "Value"; + CB_Species.DataSource = new BindingSource(Main.SpeciesDataSource.Skip(1), null); - #region Species - { - CB_Species.DisplayMember = "Text"; - CB_Species.ValueMember = "Value"; - CB_Species.DataSource = Util.getCBList(Main.specieslist.Skip(1).Take(SAV.MaxSpeciesID).ToArray(), null); - } - #endregion - #region Moves - { - CB_Move1.DisplayMember = CB_Move2.DisplayMember = CB_Move3.DisplayMember = CB_Move4.DisplayMember = "Text"; - CB_Move1.ValueMember = CB_Move2.ValueMember = CB_Move3.ValueMember = CB_Move4.ValueMember = "Value"; + CB_Move1.DisplayMember = CB_Move2.DisplayMember = CB_Move3.DisplayMember = CB_Move4.DisplayMember = "Text"; + CB_Move1.ValueMember = CB_Move2.ValueMember = CB_Move3.ValueMember = CB_Move4.ValueMember = "Value"; - CB_Move1.DataSource = new BindingSource(Main.MoveDataSource, null); - CB_Move2.DataSource = new BindingSource(Main.MoveDataSource, null); - CB_Move3.DataSource = new BindingSource(Main.MoveDataSource, null); - CB_Move4.DataSource = new BindingSource(Main.MoveDataSource, null); - } - #endregion - #region Items - { - CB_HeldItem.DisplayMember = "Text"; - CB_HeldItem.ValueMember = "Value"; - CB_HeldItem.DataSource = new BindingSource(Main.ItemDataSource, null); - } - #endregion + CB_Move1.DataSource = new BindingSource(Main.MoveDataSource, null); + CB_Move2.DataSource = new BindingSource(Main.MoveDataSource, null); + CB_Move3.DataSource = new BindingSource(Main.MoveDataSource, null); + CB_Move4.DataSource = new BindingSource(Main.MoveDataSource, null); + + CB_HeldItem.DisplayMember = "Text"; + CB_HeldItem.ValueMember = "Value"; + CB_HeldItem.DataSource = new BindingSource(Main.ItemDataSource, null); } + private void B_Cancel_Click(object sender, EventArgs e) { Close(); @@ -120,15 +111,15 @@ namespace PKHeX if (day == 0) { s += "No records in this slot."; - foreach (object t in editor_spec) - ((Control)t).Enabled = false; + foreach (Control t in editor_spec) + t.Enabled = false; editing = false; NUP_PartyIndex_ValueChanged(sender, e); goto end; } - foreach (object t in editor_spec) - ((Control)t).Enabled = true; + foreach (Control t in editor_spec) + t.Enabled = true; s += "Date: " + year + "/" + month + "/" + day + "" + Environment.NewLine + Environment.NewLine; CAL_MetDate.Value = new DateTime((int)year, (int)month, (int)day); @@ -363,7 +354,7 @@ namespace PKHeX private void setForms() { int species = Util.getIndex(CB_Species); - bool hasForms = PersonalInfo.AO[species].HasFormes || new[] { 664, 665, 414 }.Contains(species); + bool hasForms = PersonalTable.AO[species].HasFormes || new[] { 664, 665, 414 }.Contains(species); CB_Form.Enabled = CB_Form.Visible = hasForms; CB_Form.DisplayMember = "Text"; @@ -387,7 +378,7 @@ namespace PKHeX { // Get Gender Threshold int species = Util.getIndex(CB_Species); - int gt = PKX.Personal[species].Gender; + int gt = SAV.Personal[species].Gender; if (gt == 255) Label_Gender.Text = gendersymbols[2]; diff --git a/Subforms/Save Editors/Gen6/SAV_Link6.Designer.cs b/Subforms/Save Editors/Gen6/SAV_Link6.Designer.cs new file mode 100644 index 000000000..4796710d6 --- /dev/null +++ b/Subforms/Save Editors/Gen6/SAV_Link6.Designer.cs @@ -0,0 +1,621 @@ +namespace PKHeX +{ + partial class SAV_Link6 + { + private System.Windows.Forms.TextBox TB_PKM1; + private System.Windows.Forms.TextBox TB_PKM2; + private System.Windows.Forms.TextBox TB_PKM3; + private System.Windows.Forms.Label L_PKM1; + private System.Windows.Forms.Label L_PKM2; + private System.Windows.Forms.Label L_PKM3; + private System.Windows.Forms.Label L_PKM6; + private System.Windows.Forms.Label L_PKM5; + private System.Windows.Forms.Label L_PKM4; + private System.Windows.Forms.TextBox TB_PKM6; + private System.Windows.Forms.TextBox TB_PKM5; + private System.Windows.Forms.TextBox TB_PKM4; + private System.Windows.Forms.Button B_Export; + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_Link6)); + this.TB_PKM1 = new System.Windows.Forms.TextBox(); + this.TB_PKM2 = new System.Windows.Forms.TextBox(); + this.TB_PKM3 = new System.Windows.Forms.TextBox(); + this.L_PKM1 = new System.Windows.Forms.Label(); + this.L_PKM2 = new System.Windows.Forms.Label(); + this.L_PKM3 = new System.Windows.Forms.Label(); + this.L_PKM6 = new System.Windows.Forms.Label(); + this.L_PKM5 = new System.Windows.Forms.Label(); + this.L_PKM4 = new System.Windows.Forms.Label(); + this.TB_PKM6 = new System.Windows.Forms.TextBox(); + this.TB_PKM5 = new System.Windows.Forms.TextBox(); + this.TB_PKM4 = new System.Windows.Forms.TextBox(); + this.B_Export = new System.Windows.Forms.Button(); + this.B_Import = new System.Windows.Forms.Button(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.TAB_Main = new System.Windows.Forms.TabPage(); + this.CHK_LinkAvailable = new System.Windows.Forms.CheckBox(); + this.RTB_LinkSource = new System.Windows.Forms.TextBox(); + this.L_BP = new System.Windows.Forms.Label(); + this.L_Pokemiles = new System.Windows.Forms.Label(); + this.NUD_Pokemiles = new System.Windows.Forms.NumericUpDown(); + this.NUD_BP = new System.Windows.Forms.NumericUpDown(); + this.TAB_PKM = new System.Windows.Forms.TabPage(); + this.TAB_Items = new System.Windows.Forms.TabPage(); + this.CB_Item6 = new System.Windows.Forms.ComboBox(); + this.NUD_Item6 = new System.Windows.Forms.NumericUpDown(); + this.L_Item6 = new System.Windows.Forms.Label(); + this.CB_Item5 = new System.Windows.Forms.ComboBox(); + this.NUD_Item5 = new System.Windows.Forms.NumericUpDown(); + this.L_Item5 = new System.Windows.Forms.Label(); + this.CB_Item4 = new System.Windows.Forms.ComboBox(); + this.NUD_Item4 = new System.Windows.Forms.NumericUpDown(); + this.L_Item4 = new System.Windows.Forms.Label(); + this.CB_Item3 = new System.Windows.Forms.ComboBox(); + this.NUD_Item3 = new System.Windows.Forms.NumericUpDown(); + this.L_Item3 = new System.Windows.Forms.Label(); + this.CB_Item2 = new System.Windows.Forms.ComboBox(); + this.NUD_Item2 = new System.Windows.Forms.NumericUpDown(); + this.L_Item2 = new System.Windows.Forms.Label(); + this.CB_Item1 = new System.Windows.Forms.ComboBox(); + this.NUD_Item1 = new System.Windows.Forms.NumericUpDown(); + this.L_Item1 = new System.Windows.Forms.Label(); + this.B_Save = new System.Windows.Forms.Button(); + this.B_Cancel = new System.Windows.Forms.Button(); + this.tabControl1.SuspendLayout(); + this.TAB_Main.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Pokemiles)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_BP)).BeginInit(); + this.TAB_PKM.SuspendLayout(); + this.TAB_Items.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item1)).BeginInit(); + this.SuspendLayout(); + // + // TB_PKM1 + // + this.TB_PKM1.Location = new System.Drawing.Point(49, 5); + this.TB_PKM1.Name = "TB_PKM1"; + this.TB_PKM1.ReadOnly = true; + this.TB_PKM1.Size = new System.Drawing.Size(160, 20); + this.TB_PKM1.TabIndex = 117; + // + // TB_PKM2 + // + this.TB_PKM2.Location = new System.Drawing.Point(49, 27); + this.TB_PKM2.Name = "TB_PKM2"; + this.TB_PKM2.ReadOnly = true; + this.TB_PKM2.Size = new System.Drawing.Size(160, 20); + this.TB_PKM2.TabIndex = 118; + // + // TB_PKM3 + // + this.TB_PKM3.Location = new System.Drawing.Point(49, 49); + this.TB_PKM3.Name = "TB_PKM3"; + this.TB_PKM3.ReadOnly = true; + this.TB_PKM3.Size = new System.Drawing.Size(160, 20); + this.TB_PKM3.TabIndex = 119; + // + // L_PKM1 + // + this.L_PKM1.Location = new System.Drawing.Point(6, 3); + this.L_PKM1.Name = "L_PKM1"; + this.L_PKM1.Size = new System.Drawing.Size(37, 23); + this.L_PKM1.TabIndex = 123; + this.L_PKM1.Text = "#1:"; + this.L_PKM1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_PKM2 + // + this.L_PKM2.Location = new System.Drawing.Point(6, 25); + this.L_PKM2.Name = "L_PKM2"; + this.L_PKM2.Size = new System.Drawing.Size(37, 23); + this.L_PKM2.TabIndex = 124; + this.L_PKM2.Text = "#2:"; + this.L_PKM2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_PKM3 + // + this.L_PKM3.Location = new System.Drawing.Point(6, 48); + this.L_PKM3.Name = "L_PKM3"; + this.L_PKM3.Size = new System.Drawing.Size(37, 23); + this.L_PKM3.TabIndex = 126; + this.L_PKM3.Text = "#3:"; + this.L_PKM3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_PKM6 + // + this.L_PKM6.Location = new System.Drawing.Point(6, 114); + this.L_PKM6.Name = "L_PKM6"; + this.L_PKM6.Size = new System.Drawing.Size(37, 23); + this.L_PKM6.TabIndex = 138; + this.L_PKM6.Text = "#6:"; + this.L_PKM6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_PKM5 + // + this.L_PKM5.Location = new System.Drawing.Point(6, 91); + this.L_PKM5.Name = "L_PKM5"; + this.L_PKM5.Size = new System.Drawing.Size(37, 23); + this.L_PKM5.TabIndex = 137; + this.L_PKM5.Text = "#5:"; + this.L_PKM5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_PKM4 + // + this.L_PKM4.Location = new System.Drawing.Point(6, 69); + this.L_PKM4.Name = "L_PKM4"; + this.L_PKM4.Size = new System.Drawing.Size(37, 23); + this.L_PKM4.TabIndex = 136; + this.L_PKM4.Text = "#4:"; + this.L_PKM4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // TB_PKM6 + // + this.TB_PKM6.Location = new System.Drawing.Point(49, 115); + this.TB_PKM6.Name = "TB_PKM6"; + this.TB_PKM6.ReadOnly = true; + this.TB_PKM6.Size = new System.Drawing.Size(160, 20); + this.TB_PKM6.TabIndex = 135; + // + // TB_PKM5 + // + this.TB_PKM5.Location = new System.Drawing.Point(49, 93); + this.TB_PKM5.Name = "TB_PKM5"; + this.TB_PKM5.ReadOnly = true; + this.TB_PKM5.Size = new System.Drawing.Size(160, 20); + this.TB_PKM5.TabIndex = 134; + // + // TB_PKM4 + // + this.TB_PKM4.Location = new System.Drawing.Point(49, 71); + this.TB_PKM4.Name = "TB_PKM4"; + this.TB_PKM4.ReadOnly = true; + this.TB_PKM4.Size = new System.Drawing.Size(160, 20); + this.TB_PKM4.TabIndex = 133; + // + // B_Export + // + this.B_Export.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.B_Export.Location = new System.Drawing.Point(163, 87); + this.B_Export.Name = "B_Export"; + this.B_Export.Size = new System.Drawing.Size(80, 23); + this.B_Export.TabIndex = 4; + this.B_Export.Text = "Export"; + this.B_Export.UseVisualStyleBackColor = true; + this.B_Export.Click += new System.EventHandler(this.B_Export_Click); + // + // B_Import + // + this.B_Import.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.B_Import.Location = new System.Drawing.Point(163, 64); + this.B_Import.Name = "B_Import"; + this.B_Import.Size = new System.Drawing.Size(80, 23); + this.B_Import.TabIndex = 0; + this.B_Import.Text = "Import"; + this.B_Import.UseVisualStyleBackColor = true; + this.B_Import.Click += new System.EventHandler(this.B_Import_Click); + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.TAB_Main); + this.tabControl1.Controls.Add(this.TAB_PKM); + this.tabControl1.Controls.Add(this.TAB_Items); + this.tabControl1.Location = new System.Drawing.Point(12, 12); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(307, 183); + this.tabControl1.TabIndex = 143; + // + // TAB_Main + // + this.TAB_Main.Controls.Add(this.CHK_LinkAvailable); + this.TAB_Main.Controls.Add(this.RTB_LinkSource); + this.TAB_Main.Controls.Add(this.L_BP); + this.TAB_Main.Controls.Add(this.L_Pokemiles); + this.TAB_Main.Controls.Add(this.NUD_Pokemiles); + this.TAB_Main.Controls.Add(this.B_Export); + this.TAB_Main.Controls.Add(this.B_Import); + this.TAB_Main.Controls.Add(this.NUD_BP); + this.TAB_Main.Location = new System.Drawing.Point(4, 22); + this.TAB_Main.Name = "TAB_Main"; + this.TAB_Main.Padding = new System.Windows.Forms.Padding(3); + this.TAB_Main.Size = new System.Drawing.Size(299, 157); + this.TAB_Main.TabIndex = 0; + this.TAB_Main.Text = "Main"; + this.TAB_Main.UseVisualStyleBackColor = true; + // + // CHK_LinkAvailable + // + this.CHK_LinkAvailable.Enabled = false; + this.CHK_LinkAvailable.Location = new System.Drawing.Point(9, 116); + this.CHK_LinkAvailable.Name = "CHK_LinkAvailable"; + this.CHK_LinkAvailable.Size = new System.Drawing.Size(146, 21); + this.CHK_LinkAvailable.TabIndex = 149; + this.CHK_LinkAvailable.Text = "Pokémon Link Enabled"; + this.CHK_LinkAvailable.UseVisualStyleBackColor = true; + // + // RTB_LinkSource + // + this.RTB_LinkSource.Enabled = false; + this.RTB_LinkSource.Location = new System.Drawing.Point(6, 6); + this.RTB_LinkSource.MaxLength = 54; + this.RTB_LinkSource.Multiline = true; + this.RTB_LinkSource.Name = "RTB_LinkSource"; + this.RTB_LinkSource.Size = new System.Drawing.Size(237, 52); + this.RTB_LinkSource.TabIndex = 148; + // + // L_BP + // + this.L_BP.Location = new System.Drawing.Point(6, 61); + this.L_BP.Name = "L_BP"; + this.L_BP.Size = new System.Drawing.Size(73, 23); + this.L_BP.TabIndex = 146; + this.L_BP.Text = "Battle Points:"; + this.L_BP.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_Pokemiles + // + this.L_Pokemiles.Location = new System.Drawing.Point(16, 87); + this.L_Pokemiles.Name = "L_Pokemiles"; + this.L_Pokemiles.Size = new System.Drawing.Size(63, 23); + this.L_Pokemiles.TabIndex = 147; + this.L_Pokemiles.Text = "PokéMiles:"; + this.L_Pokemiles.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // NUD_Pokemiles + // + this.NUD_Pokemiles.Enabled = false; + this.NUD_Pokemiles.Location = new System.Drawing.Point(85, 90); + this.NUD_Pokemiles.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Pokemiles.Name = "NUD_Pokemiles"; + this.NUD_Pokemiles.Size = new System.Drawing.Size(58, 20); + this.NUD_Pokemiles.TabIndex = 145; + // + // NUD_BP + // + this.NUD_BP.Enabled = false; + this.NUD_BP.Location = new System.Drawing.Point(85, 64); + this.NUD_BP.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_BP.Name = "NUD_BP"; + this.NUD_BP.Size = new System.Drawing.Size(58, 20); + this.NUD_BP.TabIndex = 144; + // + // TAB_PKM + // + this.TAB_PKM.Controls.Add(this.TB_PKM1); + this.TAB_PKM.Controls.Add(this.TB_PKM2); + this.TAB_PKM.Controls.Add(this.L_PKM6); + this.TAB_PKM.Controls.Add(this.TB_PKM3); + this.TAB_PKM.Controls.Add(this.L_PKM5); + this.TAB_PKM.Controls.Add(this.L_PKM1); + this.TAB_PKM.Controls.Add(this.L_PKM4); + this.TAB_PKM.Controls.Add(this.L_PKM2); + this.TAB_PKM.Controls.Add(this.TB_PKM6); + this.TAB_PKM.Controls.Add(this.L_PKM3); + this.TAB_PKM.Controls.Add(this.TB_PKM5); + this.TAB_PKM.Controls.Add(this.TB_PKM4); + this.TAB_PKM.Location = new System.Drawing.Point(4, 22); + this.TAB_PKM.Name = "TAB_PKM"; + this.TAB_PKM.Padding = new System.Windows.Forms.Padding(3); + this.TAB_PKM.Size = new System.Drawing.Size(299, 157); + this.TAB_PKM.TabIndex = 1; + this.TAB_PKM.Text = "Pokémon"; + this.TAB_PKM.UseVisualStyleBackColor = true; + // + // TAB_Items + // + this.TAB_Items.Controls.Add(this.CB_Item6); + this.TAB_Items.Controls.Add(this.NUD_Item6); + this.TAB_Items.Controls.Add(this.L_Item6); + this.TAB_Items.Controls.Add(this.CB_Item5); + this.TAB_Items.Controls.Add(this.NUD_Item5); + this.TAB_Items.Controls.Add(this.L_Item5); + this.TAB_Items.Controls.Add(this.CB_Item4); + this.TAB_Items.Controls.Add(this.NUD_Item4); + this.TAB_Items.Controls.Add(this.L_Item4); + this.TAB_Items.Controls.Add(this.CB_Item3); + this.TAB_Items.Controls.Add(this.NUD_Item3); + this.TAB_Items.Controls.Add(this.L_Item3); + this.TAB_Items.Controls.Add(this.CB_Item2); + this.TAB_Items.Controls.Add(this.NUD_Item2); + this.TAB_Items.Controls.Add(this.L_Item2); + this.TAB_Items.Controls.Add(this.CB_Item1); + this.TAB_Items.Controls.Add(this.NUD_Item1); + this.TAB_Items.Controls.Add(this.L_Item1); + this.TAB_Items.Location = new System.Drawing.Point(4, 22); + this.TAB_Items.Name = "TAB_Items"; + this.TAB_Items.Size = new System.Drawing.Size(299, 157); + this.TAB_Items.TabIndex = 2; + this.TAB_Items.Text = "Items"; + this.TAB_Items.UseVisualStyleBackColor = true; + // + // CB_Item6 + // + this.CB_Item6.Enabled = false; + this.CB_Item6.FormattingEnabled = true; + this.CB_Item6.Location = new System.Drawing.Point(69, 117); + this.CB_Item6.Name = "CB_Item6"; + this.CB_Item6.Size = new System.Drawing.Size(139, 21); + this.CB_Item6.TabIndex = 133; + // + // NUD_Item6 + // + this.NUD_Item6.Enabled = false; + this.NUD_Item6.Location = new System.Drawing.Point(214, 117); + this.NUD_Item6.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Item6.Name = "NUD_Item6"; + this.NUD_Item6.Size = new System.Drawing.Size(58, 20); + this.NUD_Item6.TabIndex = 131; + // + // L_Item6 + // + this.L_Item6.Location = new System.Drawing.Point(3, 115); + this.L_Item6.Name = "L_Item6"; + this.L_Item6.Size = new System.Drawing.Size(60, 23); + this.L_Item6.TabIndex = 132; + this.L_Item6.Text = "Item 6:"; + this.L_Item6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // CB_Item5 + // + this.CB_Item5.Enabled = false; + this.CB_Item5.FormattingEnabled = true; + this.CB_Item5.Location = new System.Drawing.Point(69, 94); + this.CB_Item5.Name = "CB_Item5"; + this.CB_Item5.Size = new System.Drawing.Size(139, 21); + this.CB_Item5.TabIndex = 130; + // + // NUD_Item5 + // + this.NUD_Item5.Enabled = false; + this.NUD_Item5.Location = new System.Drawing.Point(214, 94); + this.NUD_Item5.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Item5.Name = "NUD_Item5"; + this.NUD_Item5.Size = new System.Drawing.Size(58, 20); + this.NUD_Item5.TabIndex = 128; + // + // L_Item5 + // + this.L_Item5.Location = new System.Drawing.Point(3, 92); + this.L_Item5.Name = "L_Item5"; + this.L_Item5.Size = new System.Drawing.Size(60, 23); + this.L_Item5.TabIndex = 129; + this.L_Item5.Text = "Item 5:"; + this.L_Item5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // CB_Item4 + // + this.CB_Item4.Enabled = false; + this.CB_Item4.FormattingEnabled = true; + this.CB_Item4.Location = new System.Drawing.Point(69, 71); + this.CB_Item4.Name = "CB_Item4"; + this.CB_Item4.Size = new System.Drawing.Size(139, 21); + this.CB_Item4.TabIndex = 127; + // + // NUD_Item4 + // + this.NUD_Item4.Enabled = false; + this.NUD_Item4.Location = new System.Drawing.Point(214, 71); + this.NUD_Item4.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Item4.Name = "NUD_Item4"; + this.NUD_Item4.Size = new System.Drawing.Size(58, 20); + this.NUD_Item4.TabIndex = 125; + // + // L_Item4 + // + this.L_Item4.Location = new System.Drawing.Point(3, 69); + this.L_Item4.Name = "L_Item4"; + this.L_Item4.Size = new System.Drawing.Size(60, 23); + this.L_Item4.TabIndex = 126; + this.L_Item4.Text = "Item 4:"; + this.L_Item4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // CB_Item3 + // + this.CB_Item3.Enabled = false; + this.CB_Item3.FormattingEnabled = true; + this.CB_Item3.Location = new System.Drawing.Point(69, 48); + this.CB_Item3.Name = "CB_Item3"; + this.CB_Item3.Size = new System.Drawing.Size(139, 21); + this.CB_Item3.TabIndex = 124; + // + // NUD_Item3 + // + this.NUD_Item3.Enabled = false; + this.NUD_Item3.Location = new System.Drawing.Point(214, 48); + this.NUD_Item3.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Item3.Name = "NUD_Item3"; + this.NUD_Item3.Size = new System.Drawing.Size(58, 20); + this.NUD_Item3.TabIndex = 122; + // + // L_Item3 + // + this.L_Item3.Location = new System.Drawing.Point(3, 46); + this.L_Item3.Name = "L_Item3"; + this.L_Item3.Size = new System.Drawing.Size(60, 23); + this.L_Item3.TabIndex = 123; + this.L_Item3.Text = "Item 3:"; + this.L_Item3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // CB_Item2 + // + this.CB_Item2.Enabled = false; + this.CB_Item2.FormattingEnabled = true; + this.CB_Item2.Location = new System.Drawing.Point(69, 25); + this.CB_Item2.Name = "CB_Item2"; + this.CB_Item2.Size = new System.Drawing.Size(139, 21); + this.CB_Item2.TabIndex = 121; + // + // NUD_Item2 + // + this.NUD_Item2.Enabled = false; + this.NUD_Item2.Location = new System.Drawing.Point(214, 25); + this.NUD_Item2.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Item2.Name = "NUD_Item2"; + this.NUD_Item2.Size = new System.Drawing.Size(58, 20); + this.NUD_Item2.TabIndex = 119; + // + // L_Item2 + // + this.L_Item2.Location = new System.Drawing.Point(3, 23); + this.L_Item2.Name = "L_Item2"; + this.L_Item2.Size = new System.Drawing.Size(60, 23); + this.L_Item2.TabIndex = 120; + this.L_Item2.Text = "Item 2:"; + this.L_Item2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // CB_Item1 + // + this.CB_Item1.Enabled = false; + this.CB_Item1.FormattingEnabled = true; + this.CB_Item1.Location = new System.Drawing.Point(69, 2); + this.CB_Item1.Name = "CB_Item1"; + this.CB_Item1.Size = new System.Drawing.Size(139, 21); + this.CB_Item1.TabIndex = 118; + // + // NUD_Item1 + // + this.NUD_Item1.Enabled = false; + this.NUD_Item1.Location = new System.Drawing.Point(214, 2); + this.NUD_Item1.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.NUD_Item1.Name = "NUD_Item1"; + this.NUD_Item1.Size = new System.Drawing.Size(58, 20); + this.NUD_Item1.TabIndex = 116; + // + // L_Item1 + // + this.L_Item1.Location = new System.Drawing.Point(3, 0); + this.L_Item1.Name = "L_Item1"; + this.L_Item1.Size = new System.Drawing.Size(60, 23); + this.L_Item1.TabIndex = 117; + this.L_Item1.Text = "Item 1:"; + this.L_Item1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // 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(239, 201); + this.B_Save.Name = "B_Save"; + this.B_Save.Size = new System.Drawing.Size(80, 23); + this.B_Save.TabIndex = 144; + this.B_Save.Text = "Save"; + this.B_Save.UseVisualStyleBackColor = true; + this.B_Save.Click += new System.EventHandler(this.B_Save_Click); + // + // 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(153, 201); + this.B_Cancel.Name = "B_Cancel"; + this.B_Cancel.Size = new System.Drawing.Size(80, 23); + this.B_Cancel.TabIndex = 145; + this.B_Cancel.Text = "Cancel"; + this.B_Cancel.UseVisualStyleBackColor = true; + this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click); + // + // SAV_Link6 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(334, 236); + this.Controls.Add(this.B_Cancel); + this.Controls.Add(this.B_Save); + this.Controls.Add(this.tabControl1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(350, 275); + this.Name = "SAV_Link6"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Pokemon Link Tool"; + this.tabControl1.ResumeLayout(false); + this.TAB_Main.ResumeLayout(false); + this.TAB_Main.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Pokemiles)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_BP)).EndInit(); + this.TAB_PKM.ResumeLayout(false); + this.TAB_PKM.PerformLayout(); + this.TAB_Items.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Item1)).EndInit(); + this.ResumeLayout(false); + + } + + private System.Windows.Forms.Button B_Import; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage TAB_Main; + private System.Windows.Forms.TabPage TAB_PKM; + private System.Windows.Forms.TabPage TAB_Items; + private System.Windows.Forms.Label L_Item1; + private System.Windows.Forms.NumericUpDown NUD_Item1; + private System.Windows.Forms.ComboBox CB_Item1; + private System.Windows.Forms.Label L_Item2; + private System.Windows.Forms.NumericUpDown NUD_Item2; + private System.Windows.Forms.ComboBox CB_Item2; + private System.Windows.Forms.Label L_Item3; + private System.Windows.Forms.NumericUpDown NUD_Item3; + private System.Windows.Forms.ComboBox CB_Item3; + private System.Windows.Forms.Label L_Item4; + private System.Windows.Forms.NumericUpDown NUD_Item4; + private System.Windows.Forms.ComboBox CB_Item4; + private System.Windows.Forms.Label L_Item5; + private System.Windows.Forms.NumericUpDown NUD_Item5; + private System.Windows.Forms.ComboBox CB_Item5; + private System.Windows.Forms.Label L_Item6; + private System.Windows.Forms.NumericUpDown NUD_Item6; + private System.Windows.Forms.ComboBox CB_Item6; + private System.Windows.Forms.Button B_Save; + private System.Windows.Forms.Button B_Cancel; + private System.Windows.Forms.NumericUpDown NUD_BP; + private System.Windows.Forms.NumericUpDown NUD_Pokemiles; + private System.Windows.Forms.Label L_Pokemiles; + private System.Windows.Forms.Label L_BP; + private System.Windows.Forms.TextBox RTB_LinkSource; + private System.Windows.Forms.CheckBox CHK_LinkAvailable; + } +} \ No newline at end of file diff --git a/Subforms/Save Editors/Gen6/SAV_Link6.cs b/Subforms/Save Editors/Gen6/SAV_Link6.cs new file mode 100644 index 000000000..97e7d9aac --- /dev/null +++ b/Subforms/Save Editors/Gen6/SAV_Link6.cs @@ -0,0 +1,110 @@ +using System; +using System.IO; +using System.Linq; +using System.Windows.Forms; + +namespace PKHeX +{ + public partial class SAV_Link6 : Form + { + public SAV_Link6() + { + InitializeComponent(); + foreach (var cb in TAB_Items.Controls.OfType()) + { + cb.DisplayMember = "Text"; + cb.ValueMember = "Value"; + cb.DataSource = new BindingSource(Main.ItemDataSource.Where(item => item.Value <= SAV.MaxItemID).ToArray(), null); + } + Util.TranslateInterface(this, Main.curlanguage); + byte[] data = SAV.LinkBlock; + if (data == null) + { + Util.Alert("Invalid save file / Link Information"); + Close(); + } + data = data.Skip(0x1FF).Take(PL6.Size).ToArray(); + loadLinkData(data); + } + + private readonly SAV6 SAV = Main.SAV.Clone() as SAV6; + private PL6 LinkInfo; + + private void B_Save_Click(object sender, EventArgs e) + { + byte[] data = new byte[SAV.LinkBlock.Length]; + Array.Copy(LinkInfo.Data, 0, data, 0x1FF, LinkInfo.Data.Length); + + // Fix Checksum just in case. + ushort ccitt = SaveUtil.ccitt16(data.Skip(0x200).Take(data.Length - 4 - 0x200).ToArray()); // [app,chk) + BitConverter.GetBytes(ccitt).CopyTo(data, data.Length - 4); + + SAV.LinkBlock = data; + Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length); + Close(); + } + private void B_Cancel_Click(object sender, EventArgs e) + { + Close(); + } + private void B_Import_Click(object sender, EventArgs e) + { + OpenFileDialog ofd = new OpenFileDialog {Filter = PL6.Filter}; + if (ofd.ShowDialog() != DialogResult.OK) + return; + + if (new FileInfo(ofd.FileName).Length != PL6.Size) + { Util.Alert("Invalid file length"); return; } + + byte[] data = File.ReadAllBytes(ofd.FileName); + + loadLinkData(data); + B_Export.Enabled = true; + } + private void B_Export_Click(object sender, EventArgs e) + { + if (LinkInfo.Data == null) + return; + + SaveFileDialog sfd = new SaveFileDialog {Filter = PL6.Filter}; + if (sfd.ShowDialog() != DialogResult.OK) + return; + + File.WriteAllBytes(sfd.FileName, LinkInfo.Data); + Util.Alert("Pokémon Link data saved to:\r" + sfd.FileName + "."); + } + + private void loadLinkData(byte[] data) + { + LinkInfo = new PL6(data); + + RTB_LinkSource.Text = LinkInfo.Origin_app; + CHK_LinkAvailable.Checked = LinkInfo.PL_enabled; + + NUD_BP.Value = LinkInfo.BattlePoints; + NUD_Pokemiles.Value = LinkInfo.Pokemiles; + + CB_Item1.SelectedIndex = LinkInfo.Item_1; + CB_Item2.SelectedIndex = LinkInfo.Item_2; + CB_Item3.SelectedIndex = LinkInfo.Item_3; + CB_Item4.SelectedIndex = LinkInfo.Item_4; + CB_Item5.SelectedIndex = LinkInfo.Item_5; + CB_Item6.SelectedIndex = LinkInfo.Item_6; + + NUD_Item1.Value = LinkInfo.Quantity_1; + NUD_Item2.Value = LinkInfo.Quantity_2; + NUD_Item3.Value = LinkInfo.Quantity_3; + NUD_Item4.Value = LinkInfo.Quantity_4; + NUD_Item5.Value = LinkInfo.Quantity_5; + NUD_Item6.Value = LinkInfo.Quantity_6; + + // Pokemon slots + TB_PKM1.Text = Main.specieslist[LinkInfo.Pokes[0].Species]; + TB_PKM2.Text = Main.specieslist[LinkInfo.Pokes[1].Species]; + TB_PKM3.Text = Main.specieslist[LinkInfo.Pokes[2].Species]; + TB_PKM4.Text = Main.specieslist[LinkInfo.Pokes[3].Species]; + TB_PKM5.Text = Main.specieslist[LinkInfo.Pokes[4].Species]; + TB_PKM6.Text = Main.specieslist[LinkInfo.Pokes[5].Species]; + } + } +} diff --git a/Subforms/Save Editors/Gen6/SAV_Link6.resx b/Subforms/Save Editors/Gen6/SAV_Link6.resx new file mode 100644 index 000000000..603f660be --- /dev/null +++ b/Subforms/Save Editors/Gen6/SAV_Link6.resx @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE + AAAAAAAAAAAAAAAAAAAAAAAAIyMjAQAAAAALCwsPJiYmJysrKycqKionKSkpJykpKScpKSknKioqJyoq + KicrKysnJycnJw0ODQ8AAAAAJiYmAQAAAABpaWlHq6ur17+/v+6+vr7svr6+7b6+vu2+vr7tvr6+7b6+ + vu2+vr7tvr6+7L+/v+6rq6vXampqSAAAAAAoKSgXvr++3eLi4v/g4OD94eHh/+Hh4f/i4uL/4uLi/+Li + 4v/i4uL/4eHh/+Dh4P/g4OD94uLi/7+/v90sLCwXfn5+PNna2frg4OD/39/f/uHh4f7h4eH+39/f/uDg + 4P7g4OD+39/f/uHh4f7h4OH+39/f/t/g3//a2tr6g4ODPoOCgz7X19f64+Pj/+Li4v7k5OT/4+Tj//Ly + 8v/19fX/9PT0//T09P/k5OT/5OTk/+Pj4/7j4+P/19jX+4qLikCDhIM+2tra++Xl5f/k5eT+5OTk//Lz + 8v+urq7/RUVF/z4+Pv+Zmpn/8fHx/+Xm5f/k5eT+5eXl/9ra2vyLi4tAhYWFPuXm5vvx8vP/7+/w/v// + //+sra3/AgIC/15eXv9tbG3/BQUF/4yMjP//////7+/w/vHy8//l5ub8jY2NQC4uLD5LS0f7UFBL/09P + Sv5YWVP/FBUS/29wcP///////////5SUlP8PDw//U1NO/1BQS/5PT0r/S0tH/DIyMEAAAAs+AAAM+wAA + Dv8AAA/+AwMS/wAAAP+UlJX///////////+3t7n/AAAA/wAAD/8BAQ/+AAAO/wAADPwCAg5ABARSPgoK + k/sNDab/DQ2o/hAQvP8CAmj/IiIW/7Kzrv/Cw8D/NDQm/wAATf8QELz/DQ2q/gwMp/8LC5T8Dg5bQAUF + Xj4KCpz7DQ2u/w0NsP4NDbX/Dw+//wUFYf8CAhL/AwMP/wMDTf8ODrj/Dg64/w0NsP4MDK7/Cwud/A8P + aEEGBmU9DAyl+w4Otf8ODrf+Dw+6/xAQvv8TE8v/EhK+/xAQvP8TE8v/EBDA/w8Puf8PD7f+Dg61/w0N + pvsREW9ACAhtQA8PsfsTE77/ExO//xQUwP8UFML/FBTD/xUVyP8WFsn/FRXE/xQUw/8UFMH/ExO//xMT + vv8QELL7ERF3QxkZdCgXF771ExPH/xUVyPwVFcn9FhbL/RcXzP0XF8z9FxfM/RcXy/0XF8v9FhbJ/RUV + yPwTE8f/Fxe+9RkZdykAAAAAIyOtghsbx/8ZGcj+GRnJ/xoayf8aGsn/GhrK/xoayv8aGsn/GhrJ/xkZ + yf8ZGcj+GxvH/yMjrYQAAAAAAADHAQAAAAAzM51FLCyscCoqrGwqKqxtKSmsbSoqrG0qKqxtKSmsbSoq + rG0qKqxsLCyscDMznUUAAAAAAAAAAP//AADAAwAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB + AACAAQAAgAEAAIABAACAAQAAgAEAAP//AAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKysrCR0dHSMWFhY3GBgYORgYGDkYGBg5GBgYORgY + GDkYGBg5GBgYORgYGDkYGBg5GBgYORgYGDkYGBg5GBgYORgYGDkYGBg5GBgYORgYGDkYGBg5FxcXNx4e + HiQuLi4JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASEhIARYWFis7OzuVkJCQ2ampqeqqqqrsqqqq7Kqq + quyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqq + quypqanqkZGR2j09PZcXFxcsUFBQAQAAAAAAAAAAAAAAAAAAAAASEhIuhISEytvb2/7W1tb/19fX/9jY + 2P/Y2Nj/2NjY/9jY2P/Y2Nj/2NjY/9nZ2f/Z2dn/2dnZ/9nZ2f/Z2dn/2dnZ/9nZ2f/Y2Nj/2NjY/9jY + 2P/Y2Nj/2NjY/9fX1//W1tb/29vb/oeHh8sTExMvAAAAAAAAAAAAAAAAPDw8DGtra6zZ2dn/2dnZ/9ra + 2v/b29v/29vb/9vb2//c3Nz/3Nzc/9zc3P/c3Nz/3d3d/93d3f/d3d3/3d3d/93d3f/d3d3/3Nzc/9zc + 3P/c3Nz/3Nzc/9vb2//b29v/29vb/9ra2v/Z2dn/2dnZ/21tba5DQ0MNAAAAAAAAAAAiIiIx1NXU9tna + 2f/c3Nz/3d3d/93e3f/e3t7/3t7e/9/f3//f39//39/f/9/g3//g4OD/4ODg/+Dg4P/g4OD/4ODg/+Dg + 4P/g4OD/39/f/9/f3//f39//3t/e/97e3v/d3t3/3d3d/9zc3P/Z2tn/1dXV9icnJzMAAAAAAAAAAFhZ + WFzf4N//3Nzc/97e3v/f39//39/f/9/g3//g4OD/4ODg/+Hh4f/h4eH/4eHh/+Li4v/i4uL/4uLi/+Li + 4v/i4uL/4uLi/+Hi4f/h4eH/4eHh/+Dg4P/g4OD/3+Df/9/f3//f39//3t7e/9zc3P/f39//XV1dXQAA + AAAAAAAAZmZmZdvc2//e3t7/3+Df/+Dg4P/g4eD/4eHh/+Hi4f/i4uL/4uPi/+Pj4//j4+P/5OTk/+Tk + 5P/k5OT/5OTk/+Tk5P/k5OT/4+Pj/+Pj4//j4+P/4uLi/+Li4v/h4eH/4eHh/+Dg4P/f4N//3t7e/9vb + 2/9wcHBoAAAAAAAAAABoaGhl3d3d/9/f3//h4eH/4eLh/+Li4v/j4+P/4+Pj/+Tk5P/k5OT/5eXl/+Xl + 5f/l5uX/5ubm/+bm5v/m5ub/5ubm/+bm5v/l5eX/5eXl/+Tk5P/k5OT/4+Pj/+Pj4//i4uL/4uLi/+Hh + 4f/f39//3N3c/3Nzc2kAAAAAAAAAAGhoaGXe3t7/4ODg/+Li4v/j4+P/4+Pj/+Tk5P/l5eX/5eXl/+bm + 5v/m5+b/5+fn/+fn5//n6Of/6Ojo/+jo6P/o6Oj/5+fn/+fn5//n5+f/5ubm/+Xl5f/l5eX/5OTk/+Pk + 4//j4+P/4uLi/+Dg4P/e3t7/c3NzaQAAAAAAAAAAaGhoZd/g3//i4uL/5OTk/+Tl5P/l5eX/5ebl/+bn + 5v/n5+f/5+jn/+jp6P/p6en/7Ozs/8LCwv+Tk5P/ioqK/66urv/o6ej/6enp/+jp6P/o6Oj/5+jn/+bn + 5v/m5ub/5ebl/+Tl5P/k5OT/4uLi/9/g3/9zdHNpAAAAAAAAAABoaWhl4eLh/+Pk4//m5ub/5ubm/+fn + 5//n6Of/6Ojo/+np6f/p6un/6urq/8bGxv8yMjL/AAAA/wAAAP8AAAD/AAAA/xMTE/+ZmZn/7Ozs/+rq + 6v/p6en/6Ojo/+jo6P/n5+f/5ubm/+bm5v/k5OT/4eHh/3R0dGkAAAAAAAAAAGhpaGXj4+P/5eXl/+fn + 5//n6Of/6Ojo/+np6f/q6ur/6urq/+vr6//Dw8P/DAwM/wAAAP8AAAD/Gxsb/ygoKP8BAQH/AAAA/wAA + AP+FhYX/7O3s/+rr6v/q6ur/6enp/+jo6P/o6Oj/5+fn/+Xl5f/i4+L/dHR0aQAAAAAAAAAAYWFhZeTl + 5P/m5+b/6Ono/+np6f/p6un/6uvq/+vr6//s7Oz/7e7t/ycnJ/8AAAD/Ghoa/7S0tP/m5ub/5OTk/9HR + 0f9GRkb/AAAA/wICAv/IyMj/7Ozs/+vs6//q6+r/6urq/+nq6f/o6ej/5+fn/+Tk5P9sbGxpAAAAAAAA + AAA9Pj1lj4+P/5OTk/+VlZX/lpaW/5eXl/+YmJj/mZmZ/5qamv92dnb/AAAA/wEBAf+/wL//3Nzc/+Tk + 5P/l5eX/3d3d/+Li4v8mJib/AAAA/0ZGRv+ampr/mZmZ/5iYmP+Xl5f/lpaW/5WVlf+Tk5P/j4+P/0ZG + RmoAAAAAAAAAAAwMDGUAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/Nzc3/+fn + 5//q6ur/7O3s/+zt7P/v7+//39/f/4WFhf8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA + AP8AAAD/EBAQagAAAAAAAAAAAwMHZQAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA + AP9NTU3/5ufm//Lz8v/z9PP/8/Tz//X19f/l5eX/nZ2d/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA + AP8AAAD/AAAA/wAAAP8GBgpqAAAAAAAAAAAAABZlAQEk/wEBJ/8CAin/AgIq/wICKv8CAiv/AgIs/wIC + LP8BAR3/AAAA/xwcHP/w8PD/6+zr//r6+v/6+vr/9PT0/+vr6/9lZWX/AAAA/wAAD/8CAi3/AgIs/wIC + K/8CAir/AgIq/wICKf8BASf/AQEl/wUFG2oAAAAAAAAAAAICQGUGBpL/Bwec/wgIo/8JCaf/CQmq/wkJ + rf8JCa//Cgqz/wkJqP8AAAL/AAAA/4CAgP/y8/L/6+zr/+3t7f/u7u7/xMTE/wcHB/8AAAD/BgZz/woK + s/8JCbD/CQmt/wkJqv8JCaj/CAik/wcHnf8HB5P/Dg5MagAAAAAAAAAAAwNHZQgIk/8JCZ3/Cgqj/wsL + p/8LC6n/Cwus/wsLr/8MDLL/DAy2/wYGW/8AAAD/AAAA/1JSUv+sraz/tra2/3h4eP8KCgr/AAAA/wIC + Iv8MDLb/DAyy/wsLsP8LC63/Cwuq/wsLp/8KCqT/CQmd/wgIk/8PD1VrAAAAAAAAAAAEBE1lCQmY/woK + ov8LC6j/DAyr/wwMrf8MDLD/DAyy/w0Ntf8NDbf/Dg67/wUFSv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA + AP8CAiH/DQ2q/w0NuP8NDbX/DQ2z/wwMsP8MDK7/DAyr/wsLqP8KCqL/CQmZ/xAQWmsAAAAAAAAAAAQE + UGUKCp7/Cwum/wwMrP8NDa//DQ2w/w0Ns/8ODrX/Dg63/w4Ouf8ODrv/Dw/A/wwMiv8FBTj/AAAG/wAA + AP8DAyb/CQls/w8Pu/8PD7z/Dg66/w4OuP8ODrX/DQ2z/w0Nsf8NDa//DAys/wsLp/8KCp7/ERFeawAA + AAAAAAAABQVTZQsLpP8MDKv/DQ2w/w4Os/8ODrT/Dg62/w8PuP8PD7r/Dw+8/w8Pvf8QEL//EBDA/xER + w/8SEsn/ERHJ/xERxf8QEMD/EBC//w8Pvv8PD7z/Dw+6/w8PuP8ODrf/Dg61/w4Os/8NDbH/DAyr/wsL + pP8SEmFrAAAAAAAAAAAGBlZlDAyq/w4OsP8PD7X/Dw+3/w8PuP8QELr/EBC7/xAQvf8REb7/ERHA/xER + wf8REcL/EhLC/xISw/8SEsP/EhLC/xERwv8REcH/ERHA/xERvv8QEL3/EBC7/xAQuv8QELj/Dw+3/w8P + tf8ODrD/DAyq/xMTZWsAAAAAAAAAAAcHWmUODrD/EBC2/xERuv8REbz/ERG9/xISvv8SEr//EhLA/xMT + wf8TE8P/ExPD/xMTxP8TE8X/FBTF/xQUxf8UFMX/ExPE/xMTxP8TE8P/ExPC/xISwf8SEr//EhK+/xER + vf8REbz/ERG6/xAQtv8ODrD/FBRpawAAAAAAAAAACAhcYxAQtf8SErv/ExO+/xQUwP8UFMD/FBTB/xUV + wv8VFcP/FRXE/xUVxf8WFsb/FhbG/xYWx/8WFsf/FhbH/xYWx/8WFsf/FhbG/xYWxf8VFcT/FRXD/xUV + wv8UFMH/FBTB/xQUwP8TE77/EhK7/xAQtf8TE2hoAAAAAAAAAAAQEFNUFRXC/xMTv/8UFMP/FRXE/xUV + xP8VFcX/FRXG/xYWx/8WFsf/FhbI/xYWyf8XF8n/FxfK/xcXyv8XF8r/FxfK/xcXyf8XF8n/FhbI/xYW + yP8WFsf/FhbG/xUVxf8VFcT/FRXE/xQUw/8TE7//FRXB/xAQV1UAAAAAAAAAAA0NPxkjI8byFBTD/xUV + x/8WFsj/FxfJ/xcXyf8XF8r/FxfK/xcXy/8YGMz/GBjM/xgYzP8YGM3/GBjN/xgYzf8YGM3/GBjM/xgY + zP8YGMz/GBjL/xcXy/8XF8r/FxfJ/xcXyf8WFsj/FRXH/xQUw/8jI8f0Dg5GGwAAAAAAAAAAFhZxAiUl + eIUZGcr/FBTI/xUVyv8WFsv/FhbM/xYWzP8WFsz/FhbN/xcXzf8XF83/FxfN/xcXzv8XF87/FxfO/xcX + zv8XF87/FxfN/xcXzf8WFs3/FhbM/xYWzP8WFsz/FhbL/xUVyv8UFMj/GBjJ/yYmeogWFnYCAAAAAAAA + AAAAAAAAGBh1BzMzk50kJNP+FxfK/xgYzP8YGMz/GBjN/xgYzf8YGM3/GBjN/xgYzf8ZGc7/GRnO/xkZ + zv8ZGc7/GRnO/xkZzv8YGM3/GBjN/xgYzf8YGM3/GBjN/xgYzP8YGMz/FxfK/yMj0v4zM5WfFBRkBwAA + AAAAAAAAAAAAAAAAAAAAAAAAHBx7Ay0tdkg3N5emMTGpxSwsp8gsLKfILCynyCwsp8gsLKfILCynyCws + p8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyDExqcU2NpenLi54Shsb + ewMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA8AA + AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA + AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB////// + + + \ No newline at end of file diff --git a/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs b/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs index 71daec422..4e035629d 100644 --- a/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs +++ b/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs @@ -23,7 +23,7 @@ namespace PKHeX // Fill List CB_Species.DisplayMember = "Text"; CB_Species.ValueMember = "Value"; - CB_Species.DataSource = Util.getCBList(Main.specieslist.Skip(1).Take(SAV.MaxSpeciesID).ToArray(), null); + CB_Species.DataSource = new BindingSource(Main.SpeciesDataSource.Skip(1), null); for (int i = 1; i < SAV.MaxSpeciesID + 1; i++) LB_Species.Items.Add(i.ToString("000") + " - " + Main.specieslist[i]); @@ -73,7 +73,7 @@ namespace PKHeX } private void changeDisplayed(object sender, EventArgs e) { - if (!(sender as CheckBox).Checked) + if (!((CheckBox) sender).Checked) return; CHK_P6.Checked = sender == CHK_P6; @@ -116,7 +116,7 @@ namespace PKHeX for (int i = 0; i < 7; i++) CL[i].Checked = langbools[i, pk - 1]; - int gt = PKX.Personal[pk].Gender; + int gt = SAV.Personal[pk].Gender; CHK_P2.Enabled = CHK_P4.Enabled = CHK_P6.Enabled = CHK_P8.Enabled = gt != 254; // Not Female-Only CHK_P3.Enabled = CHK_P5.Enabled = CHK_P7.Enabled = CHK_P9.Enabled = gt != 0 && gt != 255; // Not Male-Only and Not Genderless @@ -127,7 +127,7 @@ namespace PKHeX CLB_FormsSeen.Items.Clear(); CLB_FormDisplayed.Items.Clear(); - int fc = PKX.Personal[species].FormeCount; + int fc = SAV.Personal[species].FormeCount; int f = SaveUtil.getDexFormIndexORAS(species, fc); if (f < 0) return; @@ -171,7 +171,7 @@ namespace PKHeX BitConverter.GetBytes((ushort)Math.Min(0xFFFF, Util.ToUInt32(MT_Count.Text))).CopyTo(SAV.Data, SAV.EncounterCount + (species - 1) * 2); - int fc = PKX.Personal[species].FormeCount; + int fc = SAV.Personal[species].FormeCount; int f = SaveUtil.getDexFormIndexORAS(species, fc); if (f < 0) return; @@ -283,7 +283,7 @@ namespace PKHeX CHK_P1.Checked = ModifierKeys != Keys.Control; } int index = LB_Species.SelectedIndex+1; - int gt = PKX.Personal[index].Gender; + int gt = SAV.Personal[index].Gender; CHK_P2.Checked = CHK_P4.Checked = gt != 254 && ModifierKeys != Keys.Control; CHK_P3.Checked = CHK_P5.Checked = gt != 0 && gt != 255 && ModifierKeys != Keys.Control; @@ -329,7 +329,7 @@ namespace PKHeX if (sender == mnuSeenNone || sender == mnuSeenAll || sender == mnuComplete) for (int i = 0; i < CB_Species.Items.Count; i++) { - int gt = PKX.Personal[i + 1].Gender; + int gt = SAV.Personal[i + 1].Gender; LB_Species.SelectedIndex = i; foreach (CheckBox t in new[] { CHK_P2, CHK_P3, CHK_P4, CHK_P5 }) t.Checked = mnuSeenNone != sender && t.Enabled; @@ -354,7 +354,7 @@ namespace PKHeX if (sender == mnuCaughtNone || sender == mnuCaughtAll || sender == mnuComplete) for (int i = 0; i < CB_Species.Items.Count; i++) { - int gt = PKX.Personal[i + 1].Gender; + int gt = SAV.Personal[i + 1].Gender; LB_Species.SelectedIndex = i; foreach (CheckBox t in new[] { CHK_P1 }) t.Checked = mnuCaughtNone != sender; diff --git a/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs b/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs index 8eb4f4927..bc703fa39 100644 --- a/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs +++ b/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs @@ -23,7 +23,7 @@ namespace PKHeX // Fill List CB_Species.DisplayMember = "Text"; CB_Species.ValueMember = "Value"; - CB_Species.DataSource = Util.getCBList(Main.specieslist.Skip(1).Take(SAV.MaxSpeciesID).ToArray(), null); + CB_Species.DataSource = new BindingSource(Main.SpeciesDataSource.Skip(1), null); for (int i = 1; i < SAV.MaxSpeciesID + 1; i++) LB_Species.Items.Add(i.ToString("000") + " - " + Main.specieslist[i]); @@ -74,7 +74,7 @@ namespace PKHeX } private void changeDisplayed(object sender, EventArgs e) { - if (!(sender as CheckBox).Checked) + if (!((CheckBox) sender).Checked) return; CHK_P6.Checked = sender == CHK_P6; @@ -120,7 +120,7 @@ namespace PKHeX if (pk < 650) { CHK_F1.Enabled = true; CHK_F1.Checked = foreignbools[pk - 1]; } else { CHK_F1.Enabled = CHK_F1.Checked = false; } - int gt = PKX.Personal[pk].Gender; + int gt = SAV.Personal[pk].Gender; CHK_P2.Enabled = CHK_P4.Enabled = CHK_P6.Enabled = CHK_P8.Enabled = gt != 254; // Not Female-Only CHK_P3.Enabled = CHK_P5.Enabled = CHK_P7.Enabled = CHK_P9.Enabled = !(gt == 0 || (gt == 255)); // Not Male-Only and Not Genderless @@ -128,7 +128,7 @@ namespace PKHeX CLB_FormsSeen.Items.Clear(); CLB_FormDisplayed.Items.Clear(); - int fc = PKX.Personal[species].FormeCount; + int fc = SAV.Personal[species].FormeCount; int f = SaveUtil.getDexFormIndexXY(species, fc); if (f < 0) return; @@ -172,7 +172,7 @@ namespace PKHeX langbools[5, species - 1] = CHK_L6.Checked; langbools[6, species - 1] = CHK_L7.Checked; - int fc = PKX.Personal[species].FormeCount; + int fc = SAV.Personal[species].FormeCount; int f = SaveUtil.getDexFormIndexORAS(species, fc); if (f < 0) return; @@ -305,7 +305,7 @@ namespace PKHeX CHK_F1.Checked = ModifierKeys != Keys.Control; } int index = LB_Species.SelectedIndex+1; - int gt = PKX.Personal[index].Gender; + int gt = SAV.Personal[index].Gender; CHK_P2.Checked = CHK_P4.Checked = gt != 254 && ModifierKeys != Keys.Control; CHK_P3.Checked = CHK_P5.Checked = gt != 0 && gt != 255 && ModifierKeys != Keys.Control; @@ -330,7 +330,7 @@ namespace PKHeX if (sender == mnuSeenNone || sender == mnuSeenAll || sender == mnuComplete) for (int i = 0; i < CB_Species.Items.Count; i++) { - int gt = PKX.Personal[i + 1].Gender; + int gt = SAV.Personal[i + 1].Gender; LB_Species.SelectedIndex = i; foreach (CheckBox t in new[] { CHK_P2, CHK_P3, CHK_P4, CHK_P5 }) t.Checked = mnuSeenNone != sender && t.Enabled; @@ -355,7 +355,7 @@ namespace PKHeX if (sender == mnuCaughtNone || sender == mnuCaughtAll || sender == mnuComplete) for (int i = 0; i < CB_Species.Items.Count; i++) { - int gt = PKX.Personal[i + 1].Gender; + int gt = SAV.Personal[i + 1].Gender; LB_Species.SelectedIndex = i; foreach (CheckBox t in new[] { CHK_P1, CHK_F1 }) t.Checked = mnuCaughtNone != sender; diff --git a/Subforms/Save Editors/Gen6/SAV_Pokepuff.cs b/Subforms/Save Editors/Gen6/SAV_Pokepuff.cs index 63b89bd38..915668503 100644 --- a/Subforms/Save Editors/Gen6/SAV_Pokepuff.cs +++ b/Subforms/Save Editors/Gen6/SAV_Pokepuff.cs @@ -59,7 +59,7 @@ namespace PKHeX private void dropclick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex != 1) return; - ((ComboBox)(sender as DataGridView).EditingControl).DroppedDown = true; + ((ComboBox)((DataGridView) sender).EditingControl).DroppedDown = true; } private void B_Cancel_Click(object sender, EventArgs e) diff --git a/Subforms/Save Editors/Gen6/SAV_SecretBase.cs b/Subforms/Save Editors/Gen6/SAV_SecretBase.cs index d1ab54463..9392bb4d9 100644 --- a/Subforms/Save Editors/Gen6/SAV_SecretBase.cs +++ b/Subforms/Save Editors/Gen6/SAV_SecretBase.cs @@ -411,7 +411,7 @@ namespace PKHeX int newabil = Convert.ToInt16(MT_AbilNo.Text) >> 1; int species = Util.getIndex(CB_Species); int formnum = CB_Form.SelectedIndex; - int[] abils = PersonalInfo.AO[PersonalInfo.AO[species].FormeIndex(species, formnum)].Abilities; + int[] abils = PersonalTable.AO.getAbilities(species, formnum); // Build Ability List List ability_list = new List @@ -428,7 +428,7 @@ namespace PKHeX private void setForms() { int species = Util.getIndex(CB_Species); - bool hasForms = PersonalInfo.AO[species].HasFormes || new[] { 664, 665, 414 }.Contains(species); + bool hasForms = PersonalTable.AO[species].HasFormes || new[] { 664, 665, 414 }.Contains(species); CB_Form.Enabled = CB_Form.Visible = hasForms; CB_Form.DisplayMember = "Text"; @@ -443,7 +443,7 @@ namespace PKHeX // Check for Gender Changes // Get Gender Threshold - int gt = PKX.Personal[Util.getIndex(CB_Species)].Gender; + int gt = SAV.Personal[Util.getIndex(CB_Species)].Gender; if (gt == 255) // Genderless genderflag = 2; @@ -468,7 +468,7 @@ namespace PKHeX private void Label_Gender_Click(object sender, EventArgs e) { // Get Gender Threshold - int gt = PKX.Personal[Util.getIndex(CB_Species)].Gender; + int gt = SAV.Personal[Util.getIndex(CB_Species)].Gender; if (gt == 255 || gt == 0 || gt == 254) // Single gender/genderless return; diff --git a/Subforms/Save Editors/Gen6/SAV_SuperTrain.cs b/Subforms/Save Editors/Gen6/SAV_SuperTrain.cs index 69263f969..79b819c36 100644 --- a/Subforms/Save Editors/Gen6/SAV_SuperTrain.cs +++ b/Subforms/Save Editors/Gen6/SAV_SuperTrain.cs @@ -24,18 +24,7 @@ namespace PKHeX } private readonly SAV6 SAV = new SAV6(Main.SAV.Data); - private readonly string[] trba = { - "Empty", - "HP Bag S","HP Bag M","HP Bag L", - "ATK Bag S","ATK Bag M","ATK Bag L", - "DEF Bag S","DEF Bag M","DEF Bag L", - "SpA Bag S","SpA Bag M","SpA Bag L", - "SpD Bag S","SpD Bag M","SpD Bag L", - "Speed Bag S","Speed Bag M","Speed Bag L", - "Strength Bag","Toughen Up Bag","Swiftness Bag", - "Big-Shot Bag","Double-Up Bag","Team Flare Bag", - "Reset Bag","Soothing Bag", - }; + private readonly string[] trba; private readonly int offsetVal; private readonly int offsetTime; private readonly int offsetSpec; diff --git a/Subforms/Save Editors/Gen6/SAV_Trainer.cs b/Subforms/Save Editors/Gen6/SAV_Trainer.cs index fbf2da068..0e089dde9 100644 --- a/Subforms/Save Editors/Gen6/SAV_Trainer.cs +++ b/Subforms/Save Editors/Gen6/SAV_Trainer.cs @@ -560,7 +560,7 @@ namespace PKHeX { uint TID = Util.ToUInt32(MT_TID.Text); uint SID = Util.ToUInt32(MT_SID.Text); - uint tsv = PKX.getTSV(TID, SID); + uint tsv = (TID ^ SID) >> 4; Tip1.SetToolTip(MT_TID, "TSV: " + tsv.ToString("0000")); Tip2.SetToolTip(MT_SID, "TSV: " + tsv.ToString("0000")); } @@ -583,7 +583,7 @@ namespace PKHeX private void changeSpecial(object sender, EventArgs e) { MaskedTextBox box = sender as MaskedTextBox; - int val = Util.ToInt32(box.Text); + int val = Util.ToInt32(box?.Text); if (box == MT_HairColor) box.Text = (val > 7 ? 7 : val).ToString(); @@ -593,13 +593,13 @@ namespace PKHeX private void change255(object sender, EventArgs e) { MaskedTextBox box = sender as MaskedTextBox; - if (box.Text == "") box.Text = "0"; + if (box?.Text == "") box.Text = "0"; if (Util.ToInt32(box.Text) > 255) box.Text = "255"; } private void changeFFFF(object sender, EventArgs e) { MaskedTextBox box = sender as MaskedTextBox; - if (box.Text == "") box.Text = "0"; + if (box?.Text == "") box.Text = "0"; if (Util.ToInt32(box.Text) > 65535) box.Text = "65535"; } private void changeStat(object sender, EventArgs e) diff --git a/Subforms/Save Editors/SAV_EventFlags.cs b/Subforms/Save Editors/SAV_EventFlags.cs index d1fe152b4..acb7234e8 100644 --- a/Subforms/Save Editors/SAV_EventFlags.cs +++ b/Subforms/Save Editors/SAV_EventFlags.cs @@ -23,11 +23,17 @@ namespace PKHeX for (int i = 0; i < Constants.Length; i++) CB_Stats.Items.Add(i.ToString()); + TLP_Flags.SuspendLayout(); TLP_Flags.Controls.Clear(); + + TLP_Const.SuspendLayout(); TLP_Const.Controls.Clear(); addFlagList(getStringList("flags")); addConstList(getStringList("const")); + TLP_Flags.ResumeLayout(); + TLP_Const.ResumeLayout(); + Util.TranslateInterface(this, Main.curlanguage); CB_Stats.SelectedIndex = 0; @@ -52,14 +58,14 @@ namespace PKHeX private void B_Save_Click(object sender, EventArgs e) { // Gather Updated Flags - foreach (CheckBox flag in TLP_Flags.Controls) + foreach (CheckBox flag in TLP_Flags.Controls.OfType()) flags[getControlNum(flag)] = flag.Checked; SAV.EventFlags = flags; // Copy back Constants changeConstantIndex(null, null); // Trigger Saving SAV.EventConsts = Constants; - + Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length); Close(); } @@ -119,6 +125,7 @@ namespace PKHeX AutoSize = true }; chk.CheckStateChanged += toggleFlag; + lbl.Click += (sender, e) => { chk.Checked ^= true; }; TLP_Flags.Controls.Add(chk, 0, i); TLP_Flags.Controls.Add(lbl, 1, i); } @@ -293,8 +300,8 @@ namespace PKHeX SaveFile s1 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_OldSAV.Text)); SaveFile s2 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_NewSAV.Text)); - if (s1.GetType() != s2.GetType()) - { Util.Alert("Save types are different.", $"S1: {s1.GetType()}", $"S2: {s2.GetType()}"); return; } + if (s1.GetType() != s2.GetType()) { Util.Alert("Save types are different.", $"S1: {s1.GetType()}", $"S2: {s2.GetType()}"); return; } + if (s1.Version != s2.Version) { Util.Alert("Save versions are different.", $"S1: {s1.Version}", $"S2: {s2.Version}"); return; } string tbIsSet = ""; string tbUnSet = ""; diff --git a/Subforms/Save Editors/SAV_Inventory.cs b/Subforms/Save Editors/SAV_Inventory.cs index 63cf17f44..b9094f50a 100644 --- a/Subforms/Save Editors/SAV_Inventory.cs +++ b/Subforms/Save Editors/SAV_Inventory.cs @@ -10,7 +10,7 @@ namespace PKHeX { InitializeComponent(); Util.TranslateInterface(this, Main.curlanguage); - + itemlist = SAV.Generation == 3 ? Main.g3items : Main.itemlist; Pouches = SAV.Inventory; getBags(); } @@ -110,7 +110,7 @@ namespace PKHeX for (int i = 0; i < pouch.Items.Length; i++) { int itemvalue = pouch.Items[i].Index; - try { itemname = Main.itemlist[itemvalue]; } + try { itemname = itemlist[itemvalue]; } catch { Util.Error("Unknown item detected.", "Item ID: " + itemvalue, "Item is after: " + itemname); @@ -136,16 +136,16 @@ namespace PKHeX } private void packBags() { - for (int p = 0; p < Pouches.Length; p++) + foreach (InventoryPouch t in Pouches) { // Get DataGridView - DataGridView dgv = Controls.Find(DGVPrefix + Pouches[p].Type, true).FirstOrDefault() as DataGridView; + DataGridView dgv = Controls.Find(DGVPrefix + t.Type, true).FirstOrDefault() as DataGridView; int ctr = 0; for (int i = 0; i < dgv.Rows.Count; i++) { string item = dgv.Rows[i].Cells[0].Value.ToString(); - int itemindex = Array.IndexOf(Main.itemlist, item); + int itemindex = Array.IndexOf(itemlist, item); int itemcnt; try { itemcnt = Convert.ToUInt16(dgv.Rows[i].Cells[1].Value.ToString()); } @@ -159,20 +159,21 @@ namespace PKHeX if (itemindex == 0) // Compression of Empty Slots continue; - Pouches[p].Items[ctr++] = new InventoryItem {Index = itemindex, Count = itemcnt}; + t.Items[ctr++] = new InventoryItem {Index = itemindex, Count = itemcnt}; } - for (int i = ctr; i < Pouches[p].Items.Length; i++) - Pouches[p].Items[i] = new InventoryItem(); // Empty Slots at the end + for (int i = ctr; i < t.Items.Length; i++) + t.Items[i] = new InventoryItem(); // Empty Slots at the end } } // Initialize String Tables + private readonly string[] itemlist; private string[] getItems(ushort[] items, bool sort = true) { string[] res = new string[items.Length + 1]; for (int i = 0; i < res.Length - 1; i++) - res[i] = Main.itemlist[items[i]]; - res[items.Length] = Main.itemlist[0]; + res[i] = itemlist[items[i]]; + res[items.Length] = itemlist[0]; if (sort) Array.Sort(res); return res; @@ -194,7 +195,7 @@ namespace PKHeX { for (int i = 0; i < legalitems.Length; i++) { - dgv.Rows[i].Cells[0].Value = Main.itemlist[0]; + dgv.Rows[i].Cells[0].Value = itemlist[0]; dgv.Rows[i].Cells[1].Value = 0; } Util.Alert("Items cleared."); @@ -211,12 +212,12 @@ namespace PKHeX switch (SAV.Generation) { case 3: { - itemname = Main.itemlist[item]; + itemname = itemlist[item]; if (Legal.Pouch_HM_RS.Contains(legalitems[i])) c = 1; break; } default: { - itemname = Main.itemlist[item]; + itemname = itemlist[item]; if (new[] { 420, 421, 422, 423, 423, 424, 425, 426, 427, 737 }.Contains(legalitems[i])) c = 1; break; } diff --git a/Subforms/Save Editors/SAV_SimpleTrainer.Designer.cs b/Subforms/Save Editors/SAV_SimpleTrainer.Designer.cs index 5ccfc3300..111a04802 100644 --- a/Subforms/Save Editors/SAV_SimpleTrainer.Designer.cs +++ b/Subforms/Save Editors/SAV_SimpleTrainer.Designer.cs @@ -673,6 +673,7 @@ this.Controls.Add(this.GB_Adventure); this.MinimumSize = new System.Drawing.Size(400, 300); this.Name = "SAV_SimpleTrainer"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Trainer Data Editor"; this.GB_Adventure.ResumeLayout(false); this.GB_Adventure.PerformLayout(); diff --git a/Subforms/Save Editors/SAV_Wondercard.cs b/Subforms/Save Editors/SAV_Wondercard.cs index d5a17bcac..6dd953b6f 100644 --- a/Subforms/Save Editors/SAV_Wondercard.cs +++ b/Subforms/Save Editors/SAV_Wondercard.cs @@ -86,7 +86,8 @@ namespace PKHeX { try { - if (g.GiftUsed && DialogResult.Yes == + // only check if the form is visible (not opening) + if (Visible && g.GiftUsed && DialogResult.Yes == Util.Prompt(MessageBoxButtons.YesNo, "Wonder Card is marked as USED and will not be able to be picked up in-game.", "Do you want to remove the USED flag so that it is UNUSED?")) @@ -295,32 +296,35 @@ namespace PKHeX private void L_QR_Click(object sender, EventArgs e) { - if (SAV.Generation != 6) - { - Util.Alert("Feature not available for non Gen6 games."); - return; - } if (ModifierKeys == Keys.Alt) { byte[] data = QR.getQRData(); if (data == null) return; - if (data.Length != WC6.Size) { Util.Alert($"Decoded data not 0x{WC6.Size.ToString("X")} bytes.", - $"QR Data Size: 0x{data.Length.ToString("X")}"); } - else try { viewGiftData(new WC6(data)); } - catch { Util.Alert("Error loading wondercard data."); } + + string[] types = mga.Gifts.Select(g => g.GetType().Name).Distinct().ToArray(); + MysteryGift gift = MysteryGift.getMysteryGift(data); + string giftType = gift.GetType().Name; + + if (mga.Gifts.All(card => card.Data.Length != data.Length)) + Util.Alert("Decoded data not valid for loaded save file.", $"QR Data Size: 0x{data.Length.ToString("X")}"); + else if (types.All(type => type != giftType)) + Util.Alert("Gift type is not compatible with the save file.", $"QR Gift Type: {gift.GetType().Name}" + Environment.NewLine + $"Expected Types: {string.Join(", ", types)}"); + else + try { viewGiftData(gift); } + catch { Util.Alert("Error loading Mystery Gift data."); } } else { if (mg.Data.SequenceEqual(new byte[mg.Data.Length])) { Util.Alert("No wondercard data found in loaded slot!"); return; } - if (mg.Item == 726 && mg.IsItem) + if (SAV.Generation == 6 && mg.Item == 726 && mg.IsItem) { Util.Alert("Eon Ticket Wonder Cards will not function properly", "Inject to the save file instead."); return; } const string server = "http://lunarcookies.github.io/wc.html#"; Image qr = QR.getQRImage(mg.Data, server); if (qr == null) return; - string desc = getDescription(mg); + string desc = $"({mg.GetType().Name}) {getDescription(mg)}"; new QR(qr, PB_Preview.Image, desc, "", "", "PKHeX Wonder Card @ ProjectPokemon.org").ShowDialog(); } diff --git a/Subforms/frmReport.cs b/Subforms/frmReport.cs index 5ed00dc3f..7004595a4 100644 --- a/Subforms/frmReport.cs +++ b/Subforms/frmReport.cs @@ -30,15 +30,15 @@ namespace PKHeX public string Move3 => Main.movelist[pkm.Move3]; public string Move4 => Main.movelist[pkm.Move4]; public string HeldItem => Main.itemlist[pkm.HeldItem]; - public string MetLoc => PKX.getLocation(pkm, egg: false); - public string EggLoc => PKX.getLocation(pkm, egg: true); + public string MetLoc => PKX.getLocation(pkm, eggmet: false); + public string EggLoc => PKX.getLocation(pkm, eggmet: true); public string Ball => Main.balllist[pkm.Ball]; public string OT => pkm.OT_Name; public string Version => Main.gamelist[pkm.Version]; public string OTLang => Main.gamelanguages[pkm.Language] ?? $"UNK {pkm.Language}"; - public string CountryID => pkm.Format > 5 ? (pkm as PK6).Country.ToString() : "N/A"; - public string RegionID => pkm.Format > 5 ? (pkm as PK6).Region.ToString() : "N/A"; - public string DSRegionID => pkm.Format > 5 ? (pkm as PK6).ConsoleRegion.ToString() : "N/A"; + public string CountryID => pkm.Format > 5 ? ((PK6) pkm).Country.ToString() : "N/A"; + public string RegionID => pkm.Format > 5 ? ((PK6) pkm).Region.ToString() : "N/A"; + public string DSRegionID => pkm.Format > 5 ? ((PK6) pkm).ConsoleRegion.ToString() : "N/A"; #region Extraneous public string EC => pkm.EncryptionConstant.ToString("X8"); @@ -65,9 +65,9 @@ namespace PKHeX public int Sheen => pkm.CNT_Sheen; public int Markings => pkm.MarkByte; - public string NotOT => pkm.Format > 5 ? (pkm as PK6).HT_Name : "N/A"; + public string NotOT => pkm.Format > 5 ? ((PK6) pkm).HT_Name : "N/A"; - public int AbilityNum => pkm.Format > 5 ? (pkm as PK6).AbilityNumber : -1; + public int AbilityNum => pkm.Format > 5 ? ((PK6) pkm).AbilityNumber : -1; public int GenderFlag => pkm.Gender; public int AltForms => pkm.AltForm; public int PKRS_Strain => pkm.PKRS_Strain; @@ -115,12 +115,9 @@ namespace PKHeX dgData.DoubleBuffered(true); CenterToParent(); } - public void PopulateData(SaveFile SAV) - { - PopulateData(SAV.BoxData); - } public void PopulateData(PKM[] Data) { + SuspendLayout(); BoxBar.Step = 1; PokemonList PL = new PokemonList(); foreach (PKM pkm in Data.Where(pkm => pkm.ChecksumValid && pkm.Species != 0)) @@ -140,6 +137,7 @@ namespace PKHeX dgData.Columns[i].SortMode = DataGridViewColumnSortMode.Automatic; } BoxBar.Visible = false; + ResumeLayout(); } private void promptSaveCSV(object sender, FormClosingEventArgs e) { @@ -159,13 +157,11 @@ namespace PKHeX var sb = new StringBuilder(); var headers = dgData.Columns.Cast(); - sb.AppendLine(string.Join(",", headers.Select(column => "\"" + column.HeaderText + "\"").ToArray())); + sb.AppendLine(string.Join(",", headers.Select(column => $"\"{column.HeaderText}\""))); + + foreach (var cells in from DataGridViewRow row in dgData.Rows select row.Cells.Cast()) + sb.AppendLine(string.Join(",", cells.Select(cell => $"\"{cell.Value}\""))); - foreach (DataGridViewRow row in dgData.Rows) - { - var cells = row.Cells.Cast(); - sb.AppendLine(string.Join(",", cells.Select(cell => "\"" + cell.Value + "\"").ToArray())); - } File.WriteAllText(path, sb.ToString(), Encoding.UTF8); } diff --git a/Util/FormUtil.cs b/Util/FormUtil.cs index f09b2a867..e0c9da540 100644 --- a/Util/FormUtil.cs +++ b/Util/FormUtil.cs @@ -55,6 +55,7 @@ namespace PKHeX return; // Find control then change display Text. + form.SuspendLayout(); foreach (string str in stringdata) { string[] SplitString = str.Split(new[] { " = " }, StringSplitOptions.None); @@ -72,6 +73,7 @@ namespace PKHeX else if (c is ToolStripItem) (c as ToolStripItem).Text = text; } + form.ResumeLayout(); } private static object FindControl(string name, Control.ControlCollection c) { @@ -136,5 +138,19 @@ namespace PKHeX { return (int)(cb?.SelectedValue ?? 0); } + + public static void FlowLayoutPanelScroll(object sender, ScrollEventArgs e) + { + var p = sender as FlowLayoutPanel; + switch (e.ScrollOrientation) + { + case ScrollOrientation.HorizontalScroll: + p.HorizontalScroll.Value = e.NewValue; + break; + case ScrollOrientation.VerticalScroll: + p.VerticalScroll.Value = e.NewValue; + break; + } + } } } diff --git a/Util/ReflectUtil.cs b/Util/ReflectUtil.cs index 31c99e0b0..f90a32dd2 100644 --- a/Util/ReflectUtil.cs +++ b/Util/ReflectUtil.cs @@ -30,5 +30,13 @@ namespace PKHeX .Where(p => p.Name.StartsWith(prefix)) .Select(p => p.Name); } + internal static IEnumerable getPropertiesCanWritePublic(Type type) + { + return type.GetProperties().Where(p => p.CanWrite && p.GetSetMethod(nonPublic: true).IsPublic).Select(p => p.Name); + } + internal static bool HasProperty(this Type type, string name) + { + return type.GetProperties(BindingFlags.Public | BindingFlags.Instance).Any(p => p.Name == name); + } } } diff --git a/Util/StringUtil.cs b/Util/StringUtil.cs index 0fb9dc8b3..f421adb60 100644 --- a/Util/StringUtil.cs +++ b/Util/StringUtil.cs @@ -8,24 +8,24 @@ namespace PKHeX internal static int ToInt32(string value) { string val = value?.Replace(" ", "").Replace("_", "").Trim(); - return String.IsNullOrWhiteSpace(val) ? 0 : Int32.Parse(val); + return string.IsNullOrWhiteSpace(val) ? 0 : int.Parse(val); } internal static uint ToUInt32(string value) { string val = value?.Replace(" ", "").Replace("_", "").Trim(); - return String.IsNullOrWhiteSpace(val) ? 0 : UInt32.Parse(val); + return string.IsNullOrWhiteSpace(val) ? 0 : uint.Parse(val); } internal static uint getHEXval(string s) { string str = getOnlyHex(s); - return String.IsNullOrWhiteSpace(str) ? 0 : Convert.ToUInt32(str, 16); + return string.IsNullOrWhiteSpace(str) ? 0 : Convert.ToUInt32(str, 16); } internal static string getOnlyHex(string s) { - return String.IsNullOrWhiteSpace(s) ? "0" : s.Select(Char.ToUpper).Where("0123456789ABCDEF".Contains).Aggregate("", (str, c) => str + c); + return string.IsNullOrWhiteSpace(s) ? "0" : s.Select(char.ToUpper).Where("0123456789ABCDEF".Contains).Aggregate("", (str, c) => str + c); } } }