From c5cd6728fe3347cbbcf55d9c1b24879c77db5a8d Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 13 Nov 2017 22:07:41 -0800 Subject: [PATCH] Add usum fashion cheats Thanks Holla! --- PKHeX.WinForms/PKHeX.WinForms.csproj | 4 + .../Properties/Resources.Designer.cs | 40 ++++++++++ PKHeX.WinForms/Properties/Resources.resx | 12 +++ PKHeX.WinForms/Resources/byte/fashion_f_uu | Bin 0 -> 1427 bytes .../Resources/byte/fashion_f_uu_illegal | Bin 0 -> 1427 bytes PKHeX.WinForms/Resources/byte/fashion_m_uu | Bin 0 -> 1391 bytes .../Resources/byte/fashion_m_uu_illegal | Bin 0 -> 1391 bytes .../Save Editors/Gen7/SAV_Trainer7.cs | 70 ++++++++++-------- 8 files changed, 94 insertions(+), 32 deletions(-) create mode 100644 PKHeX.WinForms/Resources/byte/fashion_f_uu create mode 100644 PKHeX.WinForms/Resources/byte/fashion_f_uu_illegal create mode 100644 PKHeX.WinForms/Resources/byte/fashion_m_uu create mode 100644 PKHeX.WinForms/Resources/byte/fashion_m_uu_illegal diff --git a/PKHeX.WinForms/PKHeX.WinForms.csproj b/PKHeX.WinForms/PKHeX.WinForms.csproj index 177137c61..f63a48005 100644 --- a/PKHeX.WinForms/PKHeX.WinForms.csproj +++ b/PKHeX.WinForms/PKHeX.WinForms.csproj @@ -734,6 +734,10 @@ + + + + diff --git a/PKHeX.WinForms/Properties/Resources.Designer.cs b/PKHeX.WinForms/Properties/Resources.Designer.cs index 4fc6ba3e3..8decd4c0e 100644 --- a/PKHeX.WinForms/Properties/Resources.Designer.cs +++ b/PKHeX.WinForms/Properties/Resources.Designer.cs @@ -12548,6 +12548,26 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] fashion_f_uu { + get { + object obj = ResourceManager.GetObject("fashion_f_uu", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] fashion_f_uu_illegal { + get { + object obj = ResourceManager.GetObject("fashion_f_uu_illegal", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// @@ -12568,6 +12588,26 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] fashion_m_uu { + get { + object obj = ResourceManager.GetObject("fashion_m_uu", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] fashion_m_uu_illegal { + get { + object obj = ResourceManager.GetObject("fashion_m_uu_illegal", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/PKHeX.WinForms/Properties/Resources.resx b/PKHeX.WinForms/Properties/Resources.resx index f2c36c395..ac4e88600 100644 --- a/PKHeX.WinForms/Properties/Resources.resx +++ b/PKHeX.WinForms/Properties/Resources.resx @@ -6007,4 +6007,16 @@ ..\Resources\img\item\item_926.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\byte\fashion_f_uu;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\byte\fashion_f_uu_illegal;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\byte\fashion_m_uu;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\byte\fashion_m_uu_illegal;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/PKHeX.WinForms/Resources/byte/fashion_f_uu b/PKHeX.WinForms/Resources/byte/fashion_f_uu new file mode 100644 index 0000000000000000000000000000000000000000..f7f21f1100ed9a80229cccc50d6eff1f68722626 GIT binary patch literal 1427 zcmcJL(H4Lp2t)P%f4Z#B9E%lo%BKx3L+yQ@X3ivfH%Qx+!vKt=!UCv$$c|%Lg!~0%2Pspq0TKg9gkZH-NCqs2p(uhF r>A(&ICJ_|j!2n$)p1`A!EH0HK&&>#Sv-Caf_q)!hhkXuY=yzrTPVoXE literal 0 HcmV?d00001 diff --git a/PKHeX.WinForms/Resources/byte/fashion_f_uu_illegal b/PKHeX.WinForms/Resources/byte/fashion_f_uu_illegal new file mode 100644 index 0000000000000000000000000000000000000000..e93f6c8ac48e61531ecdfa81ef4f1b83c5397302 GIT binary patch literal 1427 zcmZQ%q#|Iz28c2rn?@uttY*OFvC57L4(bqqM;@3lsGUk<$DxJ5h8=dl?ZnL0K1|D@Bjb+ literal 0 HcmV?d00001 diff --git a/PKHeX.WinForms/Resources/byte/fashion_m_uu b/PKHeX.WinForms/Resources/byte/fashion_m_uu new file mode 100644 index 0000000000000000000000000000000000000000..e010f4484580166190792085bf61e62e998511ba GIT binary patch literal 1391 zcmd6lQ4WA03`5=hFKq~<*6Is>5F%e)`(T@~>N*FUPC&TDzGgI~&gQvP9>STSgHZW` zh9xwFVUegbq)KiGgCbFBNS8`NaF+nLmyZ>OL4y$A{MjAKf9d<8G$5}`Hx~Im+=mZ; W$7u$qh*{}-zv;izU~29UA#(!Y2mwm~ literal 0 HcmV?d00001 diff --git a/PKHeX.WinForms/Resources/byte/fashion_m_uu_illegal b/PKHeX.WinForms/Resources/byte/fashion_m_uu_illegal new file mode 100644 index 0000000000000000000000000000000000000000..2093449794ef32447281aeb3276155185a3aaa0e GIT binary patch literal 1391 zcmZQ%Bo;6XAi(NIxO=e5jtZiO00Sc metLocationList = GameInfo.GetLocationList(GameVersion.US, 7, false); - int[] FlyDestNameIndex = new[] { + LoadMapFlyToData(); + } + private void LoadMapFlyToData() + { + List metLocationList = GameInfo.GetLocationList(GameVersion.US, 7, false); + int[] FlyDestNameIndex = { -1,24,34,8,20,38,12,46,40,30,//Melemele 70,68,78,86,74,104,82,58,90,72,76,92,62,//Akala 132,136,138,114,118,144,130,154,140,//Ula'ula @@ -270,7 +274,7 @@ private void GetTextBoxes() , SAV.GetEventFlag(skipFlag + FlyDestFlagOfs[i]) ); } - int[] MapUnmaskNameIndex = new[] { + int[] MapUnmaskNameIndex = { 6,8,24,-1,18,-1,20,22,12,10,14, 70,50,68,52,74,54,56,58,60,72,62,64, 132,192,106,108,122,112,114,126,116,118,120,154, @@ -475,11 +479,6 @@ private void UpdateCountry(object sender, EventArgs e) } private void B_Fashion_Click(object sender, EventArgs e) { - if (SAV.USUM) - { - WinFormsUtil.Alert("Temporarily disabled, needs research for permissible values."); - return; - } var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Modifying Fashion Items will clear existing data", "Continue?"); if (DialogResult.Yes != prompt) return; @@ -493,34 +492,30 @@ private void B_Fashion_Click(object sender, EventArgs e) switch (CB_Fashion.SelectedIndex) { case 0: // Base Fashion - if (SAV.Gender == 0) // Male - { - SAV.Data[0x42000] = 3; - SAV.Data[0x420FB] = 3; - SAV.Data[0x42124] = 3; - SAV.Data[0x4228F] = 3; - SAV.Data[0x423B4] = 3; - SAV.Data[0x42452] = 3; - SAV.Data[0x42517] = 3; - } - else // Female - { - SAV.Data[0x42000] = 3; - SAV.Data[0x42100] = 3; - SAV.Data[0x42223] = 3; - SAV.Data[0x42288] = 3; - SAV.Data[0x423B4] = 3; - SAV.Data[0x42452] = 3; - SAV.Data[0x42517] = 3; - } + { + var list = SAV.USUM + ? (SAV.Gender == 0 // already biased by +0x16 + ? new[] {0x03A, 0x109, 0x1DA, 0x305, 0x3D9, 0x4B1, 0x584} // M + : new[] {0x05E, 0x208, 0x264, 0x395, 0x3B4, 0x4F9, 0x5A8}) // F + : (SAV.Gender == 0 + ? new[] {0x000, 0x0FB, 0x124, 0x28F, 0x3B4, 0x452, 0x517} // M + : new[] {0x000, 0x100, 0x223, 0x288, 0x3B4, 0x452, 0x517}); // F + + foreach (var ofs in list) + SAV.Data[SAV.Fashion + ofs] = 3; break; + } case 1: // Full Legal - byte[] data1 = SAV.Gender == 0 ? Properties.Resources.fashion_m_sm : Properties.Resources.fashion_f_sm; - data1.CopyTo(SAV.Data, SAV.Fashion); + byte[] data1 = SAV.USUM + ? SAV.Gender == 0 ? Properties.Resources.fashion_m_uu : Properties.Resources.fashion_f_uu + : SAV.Gender == 0 ? Properties.Resources.fashion_m_sm : Properties.Resources.fashion_f_sm; + data1.CopyTo(SAV.Data, SAV.Fashion + (SAV.USUM ? 0x16 : 0)); break; case 2: // Everything - byte[] data2 = SAV.Gender == 0 ? Properties.Resources.fashion_m_sm_illegal : Properties.Resources.fashion_f_sm_illegal; - data2.CopyTo(SAV.Data, SAV.Fashion); + byte[] data2 = SAV.USUM + ? SAV.Gender == 0 ? Properties.Resources.fashion_m_uu_illegal : Properties.Resources.fashion_f_uu_illegal + : SAV.Gender == 0 ? Properties.Resources.fashion_m_sm_illegal : Properties.Resources.fashion_f_sm_illegal; + data2.CopyTo(SAV.Data, SAV.Fashion + (SAV.USUM ? 0x16 : 0)); break; default: return; @@ -686,6 +681,9 @@ private void B_GenTID_Click(object sender, EventArgs e) {067, "Berry Piles (not full) Collected"}, {068, "Berry Piles (full) Collected"}, {069, "Items Reeled In"}, + // USUM + {070, "Roto Lotos"}, + {073, "Mantines Surfed"}, {100, "Champion Title Defense"}, {104, "Moves used with No Effect"}, @@ -737,6 +735,7 @@ private void B_GenTID_Click(object sender, EventArgs e) {157, "Sand Cloud Encounters"}, {158, "Outfit Changes"}, {159, "Battle Royal Dome Wins"}, + {160, "Pelago Treasure Hunts"}, {161, "Pelago Training Sessions"}, {162, "Pelago Hot Spring Sessions"}, {166, "Island Scans"}, @@ -761,6 +760,13 @@ private void B_GenTID_Click(object sender, EventArgs e) {185, "Try your luck!"}, {186, "186 - Global Mission"}, {187, "Catch a lot of Pokémon!"}, + + // USUM + {189, "Mantine Surf Plays"}, + {190, "Photo Club Photos saved"}, + {195, "Photo Club Sticker usage"}, + {196, "Photo Club Photo Shoots"}, + {198, "Highest Mantine Surf BP Earned"}, }; } }