diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69714d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.vs/ +Pokemon Shuffle Save Editor/bin/ +obj/ + +# Xamarin +*.userprefs diff --git a/Pokemon Shuffle Save Editor.sln b/Pokemon Shuffle Save Editor.sln index 9b15e02..265af14 100644 --- a/Pokemon Shuffle Save Editor.sln +++ b/Pokemon Shuffle Save Editor.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pokemon Shuffle Save Editor", "Pokemon Shuffle Save Editor\Pokemon Shuffle Save Editor.csproj", "{09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}" EndProject Global @@ -9,8 +11,8 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}.Debug|x86.ActiveCfg = Release|x86 - {09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}.Debug|x86.Build.0 = Release|x86 + {09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}.Debug|x86.ActiveCfg = Debug|x86 + {09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}.Debug|x86.Build.0 = Debug|x86 {09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}.Release|x86.ActiveCfg = Release|x86 {09C7AD6C-267B-4AFF-A56B-22474BD3D5D4}.Release|x86.Build.0 = Release|x86 EndGlobalSection diff --git a/Pokemon Shuffle Save Editor/Cheats.Designer.cs b/Pokemon Shuffle Save Editor/Cheats.Designer.cs index 4580c4b..e2029d4 100644 --- a/Pokemon Shuffle Save Editor/Cheats.Designer.cs +++ b/Pokemon Shuffle Save Editor/Cheats.Designer.cs @@ -28,98 +28,293 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.B_CaughtEverything = new System.Windows.Forms.Button(); - this.B_Level10 = new System.Windows.Forms.Button(); + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Cheats)); + this.B_LevelMax = new System.Windows.Forms.Button(); this.B_CaughtObtainables = new System.Windows.Forms.Button(); this.B_MaxResources = new System.Windows.Forms.Button(); - this.B_AllStones = new System.Windows.Forms.Button(); this.B_AllCaughtStones = new System.Windows.Forms.Button(); + this.B_MaxSpeedups = new System.Windows.Forms.Button(); + this.B_AllCompleted = new System.Windows.Forms.Button(); + this.B_SRankCompleted = new System.Windows.Forms.Button(); + this.B_StreetPassDelete = new System.Windows.Forms.Button(); + this.B_MaxExcalationBattle = new System.Windows.Forms.Button(); + this.Line = new System.Windows.Forms.Label(); + this.B_PokemonReset = new System.Windows.Forms.Button(); + this.B_StageReset = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.B_MaxTalent = new System.Windows.Forms.Button(); + this.B_Test = new System.Windows.Forms.Button(); + this.B_PokathlonStep = new System.Windows.Forms.Button(); + this.B_Crystal_Hearts = new System.Windows.Forms.Button(); + this.B_MissionCards = new System.Windows.Forms.Button(); this.SuspendLayout(); // - // B_CaughtEverything + // B_LevelMax // - this.B_CaughtEverything.Location = new System.Drawing.Point(12, 22); - this.B_CaughtEverything.Name = "B_CaughtEverything"; - this.B_CaughtEverything.Size = new System.Drawing.Size(138, 23); - this.B_CaughtEverything.TabIndex = 0; - this.B_CaughtEverything.Text = "Caught All Pokemon"; - this.B_CaughtEverything.UseVisualStyleBackColor = true; - this.B_CaughtEverything.Click += new System.EventHandler(this.B_CaughtEverything_Click); - // - // B_Level10 - // - this.B_Level10.Location = new System.Drawing.Point(12, 78); - this.B_Level10.Name = "B_Level10"; - this.B_Level10.Size = new System.Drawing.Size(138, 23); - this.B_Level10.TabIndex = 2; - this.B_Level10.Text = "All Owned Lv10"; - this.B_Level10.UseVisualStyleBackColor = true; - this.B_Level10.Click += new System.EventHandler(this.B_Level10_Click); + this.B_LevelMax.Location = new System.Drawing.Point(156, 12); + this.B_LevelMax.Name = "B_LevelMax"; + this.B_LevelMax.Size = new System.Drawing.Size(138, 23); + this.B_LevelMax.TabIndex = 1; + this.B_LevelMax.Text = "All Owned Lv (Max)"; + this.toolTip1.SetToolTip(this.B_LevelMax, resources.GetString("B_LevelMax.ToolTip")); + this.B_LevelMax.UseVisualStyleBackColor = true; + this.B_LevelMax.Click += new System.EventHandler(this.B_LevelMax_Click); // // B_CaughtObtainables // - this.B_CaughtObtainables.Location = new System.Drawing.Point(161, 22); + this.B_CaughtObtainables.Location = new System.Drawing.Point(12, 12); this.B_CaughtObtainables.Name = "B_CaughtObtainables"; this.B_CaughtObtainables.Size = new System.Drawing.Size(138, 23); - this.B_CaughtObtainables.TabIndex = 3; - this.B_CaughtObtainables.Text = "Caught All Obtainables"; + this.B_CaughtObtainables.TabIndex = 0; + this.B_CaughtObtainables.Text = "Catch All Obtainables"; + this.toolTip1.SetToolTip(this.B_CaughtObtainables, resources.GetString("B_CaughtObtainables.ToolTip")); this.B_CaughtObtainables.UseVisualStyleBackColor = true; this.B_CaughtObtainables.Click += new System.EventHandler(this.B_CaughtObtainables_Click); // // B_MaxResources // - this.B_MaxResources.Location = new System.Drawing.Point(161, 78); + this.B_MaxResources.Location = new System.Drawing.Point(156, 99); this.B_MaxResources.Name = "B_MaxResources"; this.B_MaxResources.Size = new System.Drawing.Size(138, 23); - this.B_MaxResources.TabIndex = 4; - this.B_MaxResources.Text = "Maximum Resources"; + this.B_MaxResources.TabIndex = 7; + this.B_MaxResources.Text = "(Maximum) Resources"; + this.toolTip1.SetToolTip(this.B_MaxResources, "Will give you 99 stock hearts, 99.999 coins, 150 jewels, 99 of all \"in-battle\" it" + + "ems\r\n& 99 of all \"enhancements\" items."); this.B_MaxResources.UseVisualStyleBackColor = true; this.B_MaxResources.Click += new System.EventHandler(this.B_MaxResources_Click); // - // B_AllStones - // - this.B_AllStones.Location = new System.Drawing.Point(12, 50); - this.B_AllStones.Name = "B_AllStones"; - this.B_AllStones.Size = new System.Drawing.Size(138, 23); - this.B_AllStones.TabIndex = 5; - this.B_AllStones.Text = "Have All Mega Stones"; - this.B_AllStones.UseVisualStyleBackColor = true; - this.B_AllStones.Click += new System.EventHandler(this.B_AllStones_Click); - // // B_AllCaughtStones // - this.B_AllCaughtStones.Location = new System.Drawing.Point(161, 51); + this.B_AllCaughtStones.Location = new System.Drawing.Point(156, 41); this.B_AllCaughtStones.Name = "B_AllCaughtStones"; this.B_AllCaughtStones.Size = new System.Drawing.Size(138, 23); - this.B_AllCaughtStones.TabIndex = 6; - this.B_AllCaughtStones.Text = "All Caught Mega Stones"; + this.B_AllCaughtStones.TabIndex = 3; + this.B_AllCaughtStones.Text = "(All Caught) Megastones"; + this.toolTip1.SetToolTip(this.B_AllCaughtStones, resources.GetString("B_AllCaughtStones.ToolTip")); this.B_AllCaughtStones.UseVisualStyleBackColor = true; this.B_AllCaughtStones.Click += new System.EventHandler(this.B_AllCaughtStones_Click); // + // B_MaxSpeedups + // + this.B_MaxSpeedups.Location = new System.Drawing.Point(12, 70); + this.B_MaxSpeedups.Name = "B_MaxSpeedups"; + this.B_MaxSpeedups.Size = new System.Drawing.Size(138, 23); + this.B_MaxSpeedups.TabIndex = 4; + this.B_MaxSpeedups.Text = "All Owned (Max) Speedup"; + this.toolTip1.SetToolTip(this.B_MaxSpeedups, resources.GetString("B_MaxSpeedups.ToolTip")); + this.B_MaxSpeedups.UseVisualStyleBackColor = true; + this.B_MaxSpeedups.Click += new System.EventHandler(this.B_MaxSpeedups_Click); + // + // B_AllCompleted + // + this.B_AllCompleted.Location = new System.Drawing.Point(156, 70); + this.B_AllCompleted.Name = "B_AllCompleted"; + this.B_AllCompleted.Size = new System.Drawing.Size(138, 23); + this.B_AllCompleted.TabIndex = 5; + this.B_AllCompleted.Text = "Complete All Stages"; + this.toolTip1.SetToolTip(this.B_AllCompleted, resources.GetString("B_AllCompleted.ToolTip")); + this.B_AllCompleted.UseVisualStyleBackColor = true; + this.B_AllCompleted.Click += new System.EventHandler(this.B_AllCompleted_Click); + // + // B_SRankCompleted + // + this.B_SRankCompleted.Location = new System.Drawing.Point(12, 99); + this.B_SRankCompleted.Name = "B_SRankCompleted"; + this.B_SRankCompleted.Size = new System.Drawing.Size(138, 23); + this.B_SRankCompleted.TabIndex = 6; + this.B_SRankCompleted.Text = "(S)-Rank All Completed"; + this.toolTip1.SetToolTip(this.B_SRankCompleted, resources.GetString("B_SRankCompleted.ToolTip")); + this.B_SRankCompleted.UseVisualStyleBackColor = true; + this.B_SRankCompleted.Click += new System.EventHandler(this.B_SRankCompleted_Click); + // + // B_StreetPassDelete + // + this.B_StreetPassDelete.Location = new System.Drawing.Point(12, 157); + this.B_StreetPassDelete.Name = "B_StreetPassDelete"; + this.B_StreetPassDelete.Size = new System.Drawing.Size(138, 23); + this.B_StreetPassDelete.TabIndex = 10; + this.B_StreetPassDelete.Text = "Edit StreetPass (reset)"; + this.toolTip1.SetToolTip(this.B_StreetPassDelete, resources.GetString("B_StreetPassDelete.ToolTip")); + this.B_StreetPassDelete.UseVisualStyleBackColor = true; + this.B_StreetPassDelete.Click += new System.EventHandler(this.B_StreetPassDelete_Click); + // + // B_MaxExcalationBattle + // + this.B_MaxExcalationBattle.Location = new System.Drawing.Point(12, 128); + this.B_MaxExcalationBattle.Name = "B_MaxExcalationBattle"; + this.B_MaxExcalationBattle.Size = new System.Drawing.Size(138, 23); + this.B_MaxExcalationBattle.TabIndex = 8; + this.B_MaxExcalationBattle.Text = "Escalation Battle (999)"; + this.toolTip1.SetToolTip(this.B_MaxExcalationBattle, resources.GetString("B_MaxExcalationBattle.ToolTip")); + this.B_MaxExcalationBattle.UseVisualStyleBackColor = true; + this.B_MaxExcalationBattle.Click += new System.EventHandler(this.B_MaxExcalationBattle_Click); + // + // Line + // + this.Line.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Line.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.Line.Location = new System.Drawing.Point(12, 189); + this.Line.MaximumSize = new System.Drawing.Size(288, 2); + this.Line.MinimumSize = new System.Drawing.Size(20, 2); + this.Line.Name = "Line"; + this.Line.Size = new System.Drawing.Size(288, 2); + this.Line.TabIndex = 99; + // + // B_PokemonReset + // + this.B_PokemonReset.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.B_PokemonReset.Location = new System.Drawing.Point(12, 199); + this.B_PokemonReset.Name = "B_PokemonReset"; + this.B_PokemonReset.Size = new System.Drawing.Size(138, 23); + this.B_PokemonReset.TabIndex = 100; + this.B_PokemonReset.Text = "Reset Pokemon"; + this.toolTip1.SetToolTip(this.B_PokemonReset, resources.GetString("B_PokemonReset.ToolTip")); + this.B_PokemonReset.UseVisualStyleBackColor = true; + this.B_PokemonReset.Click += new System.EventHandler(this.B_PokemonReset_Click); + // + // B_StageReset + // + this.B_StageReset.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.B_StageReset.Location = new System.Drawing.Point(156, 199); + this.B_StageReset.Name = "B_StageReset"; + this.B_StageReset.Size = new System.Drawing.Size(138, 23); + this.B_StageReset.TabIndex = 101; + this.B_StageReset.Text = "Reset Stages"; + this.toolTip1.SetToolTip(this.B_StageReset, "-Marks every Normal & Expert stages a uncompleted\r\n-Sets their rank to C & highsc" + + "ore to 0\r\n\r\n/!\\ Manually un-own any pokemon that should have been caught in one " + + "of these levels."); + this.B_StageReset.UseVisualStyleBackColor = true; + this.B_StageReset.Click += new System.EventHandler(this.B_StageReset_Click); + // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 10000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.IsBalloon = true; + this.toolTip1.ReshowDelay = 100; + this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; + this.toolTip1.ToolTipTitle = "Button description"; + // + // B_MaxTalent + // + this.B_MaxTalent.Location = new System.Drawing.Point(12, 41); + this.B_MaxTalent.Name = "B_MaxTalent"; + this.B_MaxTalent.Size = new System.Drawing.Size(138, 23); + this.B_MaxTalent.TabIndex = 2; + this.B_MaxTalent.Text = "All Owned Skill Lvl (5)"; + this.toolTip1.SetToolTip(this.B_MaxTalent, "For every pokemon that you\'ve caught, sets their talent to lvl 5 with the proper " + + "amount of \"experience\" needed.\r\n\r\nCtrl + click to select which level you want to" + + " set your pokemons\'s skills to."); + this.B_MaxTalent.UseVisualStyleBackColor = true; + this.B_MaxTalent.Click += new System.EventHandler(this.B_MaxTalent_Click); + // + // B_Test + // + this.B_Test.Location = new System.Drawing.Point(229, 170); + this.B_Test.Name = "B_Test"; + this.B_Test.Size = new System.Drawing.Size(65, 23); + this.B_Test.TabIndex = 51; + this.B_Test.Text = "Test stuff"; + this.toolTip1.SetToolTip(this.B_Test, "Used w/ B_Test_Click event to search for the \"skill+ drop\" flags in stagedata(s)." + + "bin"); + this.B_Test.UseVisualStyleBackColor = true; + this.B_Test.Visible = false; + this.B_Test.Click += new System.EventHandler(this.B_Test_Click); + // + // B_PokathlonStep + // + this.B_PokathlonStep.Location = new System.Drawing.Point(156, 128); + this.B_PokathlonStep.Name = "B_PokathlonStep"; + this.B_PokathlonStep.Size = new System.Drawing.Size(138, 23); + this.B_PokathlonStep.TabIndex = 9; + this.B_PokathlonStep.Text = "Edit Pokathlon (50th) "; + this.toolTip1.SetToolTip(this.B_PokathlonStep, "Sets your next Survival mode battle to be the 50th one, against\r\nMega Mewtwo Y an" + + "d with 99 moves left.\r\n\r\nCtrl + Click to select whichever step, opponent and mov" + + "es you wish."); + this.B_PokathlonStep.UseVisualStyleBackColor = true; + this.B_PokathlonStep.Click += new System.EventHandler(this.B_PokathlonStep_Click); + // + // B_Crystal_Hearts + // + this.B_Crystal_Hearts.Location = new System.Drawing.Point(156, 169); + this.B_Crystal_Hearts.Name = "B_Crystal_Hearts"; + this.B_Crystal_Hearts.Size = new System.Drawing.Size(138, 23); + this.B_Crystal_Hearts.TabIndex = 50; + this.B_Crystal_Hearts.Text = "WIP crystal hearts"; + this.toolTip1.SetToolTip(this.B_Crystal_Hearts, resources.GetString("B_Crystal_Hearts.ToolTip")); + this.B_Crystal_Hearts.UseVisualStyleBackColor = true; + this.B_Crystal_Hearts.Visible = false; + this.B_Crystal_Hearts.Click += new System.EventHandler(this.B_Crystal_Hearts_Click); + // + // B_MissionCards + // + this.B_MissionCards.Location = new System.Drawing.Point(156, 157); + this.B_MissionCards.Name = "B_MissionCards"; + this.B_MissionCards.Size = new System.Drawing.Size(138, 23); + this.B_MissionCards.TabIndex = 11; + this.B_MissionCards.Text = "Complete Mission cards"; + this.toolTip1.SetToolTip(this.B_MissionCards, "Completes all cards missions. \r\nCtrl+clic to select which missions to complete an" + + "d\r\nsee/choose active card."); + this.B_MissionCards.UseVisualStyleBackColor = true; + this.B_MissionCards.Click += new System.EventHandler(this.B_MissionCards_Click); + // // Cheats // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(312, 111); + this.ClientSize = new System.Drawing.Size(312, 234); + this.Controls.Add(this.B_MissionCards); + this.Controls.Add(this.B_PokathlonStep); + this.Controls.Add(this.B_Test); + this.Controls.Add(this.B_MaxTalent); + this.Controls.Add(this.Line); + this.Controls.Add(this.B_StageReset); + this.Controls.Add(this.B_PokemonReset); + this.Controls.Add(this.B_MaxExcalationBattle); + this.Controls.Add(this.B_StreetPassDelete); + this.Controls.Add(this.B_SRankCompleted); + this.Controls.Add(this.B_AllCompleted); + this.Controls.Add(this.B_MaxSpeedups); this.Controls.Add(this.B_AllCaughtStones); - this.Controls.Add(this.B_AllStones); this.Controls.Add(this.B_MaxResources); this.Controls.Add(this.B_CaughtObtainables); - this.Controls.Add(this.B_Level10); - this.Controls.Add(this.B_CaughtEverything); + this.Controls.Add(this.B_LevelMax); + this.Controls.Add(this.B_Crystal_Hearts); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(328, 273); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(328, 273); this.Name = "Cheats"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Bulk Edits"; this.ResumeLayout(false); } #endregion - - private System.Windows.Forms.Button B_CaughtEverything; - private System.Windows.Forms.Button B_Level10; + private System.Windows.Forms.Button B_LevelMax; private System.Windows.Forms.Button B_CaughtObtainables; private System.Windows.Forms.Button B_MaxResources; - private System.Windows.Forms.Button B_AllStones; private System.Windows.Forms.Button B_AllCaughtStones; + private System.Windows.Forms.Button B_MaxSpeedups; + private System.Windows.Forms.Button B_AllCompleted; + private System.Windows.Forms.Button B_SRankCompleted; + private System.Windows.Forms.Button B_StreetPassDelete; + private System.Windows.Forms.Button B_MaxExcalationBattle; + private System.Windows.Forms.Label Line; + private System.Windows.Forms.Button B_PokemonReset; + private System.Windows.Forms.Button B_StageReset; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Button B_MaxTalent; + private System.Windows.Forms.Button B_Test; + private System.Windows.Forms.Button B_PokathlonStep; + private System.Windows.Forms.Button B_Crystal_Hearts; + private System.Windows.Forms.Button B_MissionCards; } } \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Cheats.cs b/Pokemon Shuffle Save Editor/Cheats.cs index e642cc8..eb1135d 100644 --- a/Pokemon Shuffle Save Editor/Cheats.cs +++ b/Pokemon Shuffle Save Editor/Cheats.cs @@ -1,148 +1,466 @@ using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Windows.Forms; +using static Pokemon_Shuffle_Save_Editor.Main; +using static Pokemon_Shuffle_Save_Editor.ToolFunctions; namespace Pokemon_Shuffle_Save_Editor { public partial class Cheats : Form { - private byte[] mondata; - private byte[] stagesMain; - private byte[] stagesEvent; - private byte[] stagesExpert; - private byte[] megaStone; - public Cheats(byte[] md, byte[] sm, byte[] sev, byte[] sex, byte[] ms, bool[][] hm, Tuple[] m, ref byte[] sd) + public Cheats() { InitializeComponent(); - mondata = md; - stagesMain = sm; - stagesEvent = sev; - stagesExpert = sex; - megaStone = ms; - HasMega = hm; - savedata = sd; - mons = m; } - bool[][] HasMega; // [X][0] = X, [X][1] = Y - byte[] savedata; + protected override bool ProcessDialogKey(Keys keyData) //Allows quit when Esc is pressed + { + if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape) + { + this.Close(); + return true; + } + return base.ProcessDialogKey(keyData); + } - Tuple[] mons; + private void B_AllCaughtStones_Click(object sender, EventArgs e) + { + if (ModifierKeys == Keys.Control) + { + for (int i = 0; i < db.MegaStartIndex; i++) + SetStone(i); + MessageBox.Show("You don't own any stone anymore."); + } + else + { + for (int i = 0; i < db.MegaStartIndex; i++) + { //if (caught && (hasMegaX || hasMegaY) && (at least 1 of these not equals to "default" : talent, type, max speedups). Doesn't check if Y form has been released, but both Charizard's & Mewtwo's already have. + if (GetMon(i).Caught && (db.HasMega[i][0] || db.HasMega[i][1]) && ((db.Mons[db.MegaStartIndex + db.MegaList.IndexOf(i)].Item6[0] != 7) || (db.Mons[db.MegaStartIndex + db.MegaList.IndexOf(i)].Item7 != 0) || (db.Megas[db.MegaList.IndexOf(i)].Item2 != 1))) + SetStone(i, db.HasMega[i][0], db.HasMega[i][1]); + } + MessageBox.Show("You now own every released stone for each of your caught pokemons."); + } + } - private void B_CaughtEverything_Click(object sender, EventArgs e) + private void B_AllCompleted_Click(object sender, EventArgs e) { - for (int i = 1; i < 780; i++) + int j = 0; + foreach (byte[] stage in new byte[][] { db.StagesMain, db.StagesExpert }) { - SetPokemon(i, true); + int entrylen = BitConverter.ToInt32(stage, 4); + for (int i = 0; i < (BitConverter.ToInt32(stage, 0) - 1); i++) + { + byte[] data = stage.Skip(0x50 + i * entrylen).Take(entrylen).ToArray(); + if ((BitConverter.ToInt16(data, 0x4C) & 0x3FF) != 999) //checks number of S ranks needed to unlock in order to skip "unreleased" expert stages. Not-expert stages should always return 0. + { + SetStage(i, j, true); + PatchScore(i, j); + } + } + j++; } - MessageBox.Show("All Pokemon are now caught."); + MessageBox.Show("All Normal & Expert stages have been marked as completed.\n\nRewards like megastones or jewels can still be redeemed by beating the stage."); } private void B_CaughtObtainables_Click(object sender, EventArgs e) { - int stagelen = BitConverter.ToInt32(stagesMain, 0x4); - int Num_MainStages = BitConverter.ToInt32(stagesMain, 0); - int Num_ExpertStages = BitConverter.ToInt32(stagesExpert, 0); - for (int i = 1; i < Num_MainStages; i++) + for (int i = 1; i < db.MegaStartIndex; i++) + SetCaught(i, (db.Mons[i].Rest.Item1 != 999) && ((db.Mons[i].Item5 != 1) || (db.Mons[i].Item6[0] != 1) || (db.Mons[i].Item7 != 0))); //((displayed number isn't 999) && (at least 1 of these isn't "default" : base power, talent, type)) + int stagelen = BitConverter.ToInt32(db.StagesMain, 0x4); + foreach (byte[] stage in new byte[][] { db.StagesMain, db.StagesExpert }) { - int ind = BitConverter.ToUInt16(stagesMain, 0x50 + stagelen * (i)) & 0x3FF; - SetPokemon(ind, true); + for (int i = 1; i < BitConverter.ToInt32(stage, 0); i++) + { + int ind = BitConverter.ToUInt16(stage, 0x50 + stagelen * (i)) & 0x3FF; + SetCaught(ind, true); + } + } + MessageBox.Show("You now own all obtainable pokemons."); + } + + private void B_LevelMax_Click(object sender, EventArgs e) + { + int value = 15; //default value + bool boool = false; + if (ModifierKeys == Keys.Control) + { + using (var form = new NUP_Popup(0, 15, value, "max level")) + { + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + { + value = form.retVal; + boool = true; + } + else return; + } } - for (int i = 1; i < Num_ExpertStages; i++) + for (int i = 0; i < db.MegaStartIndex; i++) { - int ind = BitConverter.ToUInt16(stagesExpert, 0x50 + stagelen * (i)) & 0x3FF; - SetPokemon(ind, true); + if (GetMon(i).Caught) + SetLevel(i, Math.Min(10 + db.Mons[i].Item4, value)); } - MessageBox.Show("All obtainable non-event Pokemon are now caught."); + if (boool) + MessageBox.Show("Everything you've caught is now level " + value + ((value > 10) ? " or below." : ".")); + else + MessageBox.Show("Everything you've caught is now level max."); } - private void B_AllStones_Click(object sender, EventArgs e) + private void B_MaxExcalationBattle_Click(object sender, EventArgs e) { - for (int i = 0; i < 780; i++) + int value = 999; //default value + if (ModifierKeys == Keys.Control) { - if (HasMega[mons[i].Item1][0] || HasMega[mons[i].Item1][1]) + using (var form = new NUP_Popup(0, 999, value, "step")) { - SetMegaStone(i, HasMega[mons[i].Item1][0], HasMega[mons[i].Item1][1]); + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + value = form.retVal; + else return; } } - MessageBox.Show("All Mega Stones are now owned."); + SetExcalationStep(value); + MessageBox.Show("Curent escalation battle has been taken to step " + value + ".\nIf you skipped rewards you'll get all of them at once after beating it."); } - private void B_AllCaughtStones_Click(object sender, EventArgs e) + private void B_MaxResources_Click(object sender, EventArgs e) { - for (int i = 0; i < 780; i++) + if (ModifierKeys == Keys.Control) + { + SetResources(); + MessageBox.Show("Deleted all stock hearts, coins, jewels and Items."); + } + else { - if (GetPokemon(i)) + int[] items = new int[ShuffleItems.ILength]; + for (int i = 0; i < items.Length; i++) + items[i] = 99; + int[] enhancements = new int[ShuffleItems.ELength]; + for (int i = 0; i < enhancements.Length; i++) + enhancements[i] = 99; + SetResources(99, 99999, 150, items, enhancements); + MessageBox.Show("Gave 99 hearts, 99999 coins, 150 jewels, and 99 of every item."); + } + } + + private void B_MaxSpeedups_Click(object sender, EventArgs e) + { + int value = 127; //default value + bool boool = false; + if (ModifierKeys == Keys.Control) + { + using (var form = new NUP_Popup(0, 127, value, "max speedUps")) { - if (HasMega[mons[i].Item1][0] || HasMega[mons[i].Item1][1]) + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) { - SetMegaStone(i, HasMega[mons[i].Item1][0], HasMega[mons[i].Item1][1]); + value = form.retVal; + boool = true; } + else return; + } + } + for (int i = 0; i < db.MegaStartIndex; i++) + { //if (caught && (hasMegaX || hasMegaY) && (at least one stone owned)) + if (GetMon(i).Caught && (db.HasMega[i][0] || db.HasMega[i][1]) && (GetMon(i).Stone > 0 || GetMon(i).Stone < 4)) + { + int suX = Math.Min(db.HasMega[i][0] ? db.Megas[db.MegaList.IndexOf(i)].Item2 : 0, value); + int suY = Math.Min(db.HasMega[i][1] ? db.Megas[db.MegaList.IndexOf(i, db.MegaList.IndexOf(i) + 1)].Item2 : 0, value); + SetSpeedup(i, (db.HasMega[i][0] && ((GetMon(i).Stone & 1) == 1)), suX, (db.HasMega[i][1] && ((GetMon(i).Stone & 2) == 2)), suY); //(i, (hasMegaX && owned stoneX), max X value from db, (hasMegaY && owned stoneY), max Y value from db) } } - MessageBox.Show("All Mega Stones are now owned for everything you've caught."); + if (boool) + MessageBox.Show("All Owned Megas (for which you own the stone too) have been fed with " + value + " speedups" + ((value > 1) ? " or below." : ".")); + else + MessageBox.Show("All Owned Megas (for which you own the stone too) have been fed with as much Mega Speedups as possible."); } - private void B_Level10_Click(object sender, EventArgs e) + private void B_MaxTalent_Click(object sender, EventArgs e) { - for (int i = 0; i < 780; i++) + int value = 5; //default value + if (ModifierKeys == Keys.Control) { - if (GetPokemon(i)) + using (var form = new NUP_Popup(0, 5, value, "skill lvl")) { - SetLevel(i, 10); + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + value = form.retVal; + else return; } } - MessageBox.Show("Everything you've caught is now level 10."); + for (int i = 0; i < db.MegaStartIndex; i++) + { + if (GetMon(i).Caught) + { + for (int j = 0; j < db.Rest[i].Item2; j++) + SetSkill(i, value, j); + } + } + MessageBox.Show("Every pokemon that you have caught now has all its skills powered to level " + value + " !"); } - private void B_MaxResources_Click(object sender, EventArgs e) + private void B_PokemonReset_Click(object sender, EventArgs e) { - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt32(savedata, 0x68) & 0xF0000007) | ((uint)99999 << 3) | ((uint)150 << 20)), 0, savedata, 0x68, 4); - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt16(savedata, 0x2D4A) & 0xC07F) | (99 << 7)), 0, savedata, 0x2D4A, 2); - for (int i = 0; i < 7; i++) + for (int i = 1; i < db.MegaStartIndex; i++) { - ushort val = BitConverter.ToUInt16(savedata, 0xd0 + i); - val &= 0x7F; - val |= (99 << 7); - Array.Copy(BitConverter.GetBytes(val), 0, savedata, 0xd0 + i, 2); + SetCaught(i); //Uncatch + SetLevel(i); //Un-level, Un-experience & Un-lollipop + SetSkill(i); + if (db.HasMega[i][0] || db.HasMega[i][1]) + { + SetStone(i); //Un-stone + SetSpeedup(i); //Unfeed speedups + } } - savedata[0x2D4C] = (byte)((((99) << 1) & 0xFE) | (savedata[0x2D4C] & 1)); // Mega Speedups - MessageBox.Show("Gave 99 hearts, 99999 coins, 150 jewels, and 99 of every item."); + MessageBox.Show("All pokemons have been uncaught, reset to level 1 & lost their Mega Stones, speedups or lollipops.\n\nEither reset stages too or make sure to catch at least Espurr, Bulbasaur, Squirtle & Charmander manually."); } - private void SetLevel(int ind, int lev) + private void B_ResourcesReset_Click(object sender, EventArgs e) { - int level_ofs = (((ind - 1) * 4) / 8); - int level_shift = ((((ind - 1) * 4) + 1) % 8); - ushort level = BitConverter.ToUInt16(savedata, 0x187 + level_ofs); - level = (ushort)((level & (ushort)(~(0xF << level_shift))) | (lev << level_shift)); - Array.Copy(BitConverter.GetBytes(level), 0, savedata, 0x187 + level_ofs, 2); + SetResources(); + MessageBox.Show("Deleted all stock hearts, coins, jewels and Items."); } - private void SetPokemon(int ind, bool caught) + private void B_SRankCompleted_Click(object sender, EventArgs e) { - int caught_ofs = (((ind - 1) + 6) / 8); - int caught_shift = (((ind - 1) + 6) % 8); - foreach (int caught_array_start in new[] { 0xE6, 0x546, 0x5E6 }) + int value = 3; //default value + int j = 0; + string str; + if (ModifierKeys == Keys.Control) { - savedata[caught_array_start + caught_ofs] = (byte)(savedata[caught_array_start + caught_ofs] & (byte)(~(1 << caught_shift)) | ((caught ? 1 : 0) << caught_shift)); + using (var form = new NUP_Popup(0, 3, value, "rank")) + { + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + value = form.retVal; + else return; + } + } + foreach (byte[] stage in new byte[][] { db.StagesMain, db.StagesExpert }) + { + int entrylen = BitConverter.ToInt32(stage, 0x4); + for (int i = 0; i < (BitConverter.ToInt32(stage, 0) - ((stage == db.StagesMain) ? 1 : 0)); i++) + { + if (GetStage(i, j).Completed) + { + SetRank(i, j, value); + PatchScore(i, j); + } + } + j++; } + switch (value) + { + case 0: + str = "C"; + break; + + case 1: + str = "B"; + break; + + case 2: + str = "A"; + break; + + case 3: + str = "S"; + break; + + default: + MessageBox.Show("An error occured. Attempted to set rank to : " + value); + return; + } + MessageBox.Show("All Completed Normal & Expert stages have been " + str + "-ranked."); + } + + private void B_StageReset_Click(object sender, EventArgs e) + { + int j = 0; + foreach (int length in new int[] { (BitConverter.ToInt32(db.StagesMain, 0) - 1), BitConverter.ToInt32(db.StagesExpert, 0), 100 })//{number of Main stages, number of Expert stages, 100}. Max number of event levels could be up to 549 but it's unlikely there ever are more than 100 at any given time (and that space could be used for something else later). + { + for (int i = 0; i < length; i++) + { + SetStage(i, j); + SetRank(i, j); + SetScore(i, j); + } + j++; + } + MessageBox.Show("All stages have been reset to C Rank, 0 score & uncompleted state."); + } + + private void B_StreetPassDelete_Click(object sender, EventArgs e) + { + int value = 0; //default value + bool boool = true; //default value + if (ModifierKeys == Keys.Control) + { + using (var form = new NUP_Popup(0, 9999, value, boool, "streetpass encounters", "Wipe tags")) + { + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + { + value = form.retVal; + boool = form.retChk; + } + else return; + } + } + Array.Copy(BitConverter.GetBytes(value), 0, savedata, StreetCount.Ofset(), 2); //Sets streetpass count to value + if (boool) + { + for (int i = 0; i < 10; i++) + Array.Copy(new byte[StreetTag.Length()], 0, savedata, StreetTag.Ofset(i), StreetTag.Length()); //Erase StreetPass tags + } + MessageBox.Show("Streetpass count set to " + value + ".\nStreetpass tags " + (boool ? "" : "not ") + "wiped."); + } + + private void B_PokathlonStep_Click(object sender, EventArgs e) + { + int step = 50, moves = 99, opponent = 150; //default values + bool enabled = true; //default values + if (ModifierKeys == Keys.Control) + { + using (var form = new Pokathlon_Popup(BitConverter.ToInt16(savedata, 0xB762) >> 6, (savedata[0xB768] & 0x7F), savedata[0xB760])) + { + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + { + step = form.retStep; + moves = form.retMoves; + opponent = form.retOpponent; + enabled = form.retEnabled; + } + else return; + } + } + Array.Copy(BitConverter.GetBytes((BitConverter.ToInt16(savedata, 0xB768) & ~(0x3 << 7)) | ((enabled ? 3 : 0) << 7)), 0, savedata, 0xB768, 2); + savedata[0xB760] = (byte)step; + Array.Copy(BitConverter.GetBytes((BitConverter.ToInt16(savedata, 0xB768) & ~(0x7F)) | moves), 0, savedata, 0xB768, 2); + Array.Copy(BitConverter.GetBytes((BitConverter.ToInt16(savedata, 0xB762) & ~(0x3FF << 6)) | (opponent << 6)), 0, savedata, 0xB762, 2); + string name = db.MonsList[BitConverter.ToInt16(db.StagesMain, 0x50 + BitConverter.ToInt32(db.StagesMain, 0x4) * opponent) & 0x3FF]; + string str = new string[] { "th", "st", "nd", "rd" }[(!(step > 10 && step < 14) && step % 10 < 4) ? step % 4 : 0]; + MessageBox.Show((enabled ? "Survival mode enabled.\nYou'll face" : "Survival Mode is disabled.\nYou should have faced") + " survival mode's " + step + str + " step against " + name + " with " + (savedata[0xB768] & 0x7F) + " moves left."); } - private bool GetPokemon(int ind) + private void B_Crystal_Hearts_Click(object sender, EventArgs e) { - int caught_ofs = 0x546 + (((ind - 1) + 6) / 8); - return ((savedata[caught_ofs] >> ((((ind - 1) + 6) % 8))) & 1) == 1; + bool boool = (ModifierKeys == Keys.Control); + Array.Copy(boool ? new byte[6] : new byte[] {0, 0, 0, 0, 0x3F, 0x48 }, 0, savedata, 0xB7FB, 6); + string str = boool ? "Crystal hearts disabled." : "Crystal hearts unlocked : You have 7 stock hearts and win 700 coins each time you connect this month."; + MessageBox.Show(str + "\n\nWork In Progress, report if something bad happens."); } - private void SetMegaStone(int ind, bool Y, bool X) + private void B_MissionCards_Click(object sender, EventArgs e) { - int mega_ofs = 0x406 + ((ind + 2) / 4); - ushort mega_val = BitConverter.ToUInt16(savedata, mega_ofs); - mega_val &= (ushort)(~(3 << ((5 + (ind << 1)) % 8))); - ushort new_mega_insert = (ushort)(0 | (Y ? 1 : 0) | (X ? 2 : 0)); - mega_val |= (ushort)(new_mega_insert << ((5 + (ind << 1)) % 8)); - Array.Copy(BitConverter.GetBytes(mega_val), 0, savedata, mega_ofs, 2); + bool[][] missions = db.Missions; //default values + int max = missions.Length, active = Math.Min(savedata[0xB6FB], max); //default values + bool boool = false; //default values + if (ModifierKeys == Keys.Control) + { + using (var form = new Mission_Popup(active)) + { + form.ShowDialog(); + if (form.DialogResult == DialogResult.OK) + { + active = Math.Min(form.retActive, max); + missions = form.retStates; + boool = true; + } + else return; + } + } + savedata[MissionCards.Ofset(0) - 1] = (byte)active; + for (int i = 0 ; i < missions.Length ; i++) + { + int data = BitConverter.ToInt32(savedata, MissionCards.Ofset(i)) & ~(0x3FF << MissionCards.Shift(i)); + for (int j = 0 ; j < missions[i].Length ; j++) + data |= ((missions[i][j] ? 1 : 0) << (MissionCards.Shift(i) + j)); + Array.Copy(BitConverter.GetBytes(data), 0, savedata, MissionCards.Ofset(i), 4); + } + string str = null; + if (!boool || missions == db.Missions) + str = "All Mission cards have been fully completed."; + else + { + Cases cases = 0; + for (int i = 0; i < missions.Length ; i++) + { + for (int j = 0; db.Missions[i][j] == true; j++) + { + if (cases == Cases.Full && missions[i][j] == false) { cases = Cases.Select; } + if (cases == Cases.Select && missions[i][j] == true) { cases = Cases.None; } + } + } + if (cases == Cases.Select) { str = "Mission cards fully reseted."; } + if (cases == Cases.None) { str = "Selected missions marked as completed."; } + } + str += "\n"; + str += (active == 0) + ? "No Mission Card currently selected." + : "Selected Mission Card is number " + active + "."; + MessageBox.Show(str); + } + + private void B_Test_Click(object sender, EventArgs e) + { //don't bother, testing stuff + #region catch'em all + //for (int i = 1; i < db.MegaStartIndex; i++) //includes 15 reserved slots + // SetCaught(i, true); + //MessageBox.Show("All Pokemon are now caught."); + #endregion + + #region get stoned + //for (int i = 0; i < db.MegaStartIndex; i++) + //{ + // if (db.HasMega[i][0] || db.HasMega[i][1]) + // SetStone(i, db.HasMega[i][0], db.HasMega[i][1]); + //} + //MessageBox.Show("All Mega Stones are now owned."); + #endregion + + #region Skill+-dropping stages research + //int j = 0; + //foreach (byte[] stage in new byte[][] { db.StagesMain, db.StagesExpert, db.StagesEvent }) + //{ + // Console.WriteLine(j + "\n=============="); + // int entrylen = BitConverter.ToInt32(stage, 4); + // for (int i = 0; i < BitConverter.ToInt32(stage, 0); i++) + // { + // byte[] data = stage.Skip(0x50 + i * 0x5C).Take(0x5C).ToArray(); + // if (BitConverter.ToInt16(data, 0x43) != 0) + // { //returns 9319 (most skill+-droping stages), 9219 (uxie stage), 9119 (Tornadus stage), 6106 (Eevee stage) or 0 (all other stages) + // Console.WriteLine("{0:X}", BitConverter.ToInt16(data, 0x43)); + // Console.WriteLine(db.MonsList[BitConverter.ToInt16(data, 0) & 0x3FF]); + // } + // } + // j++; + //} + #endregion + + #region string implementation + //byte[] HexValue = Properties.Resources.messagePokedex_US; + //string StrValue = ""; + //List List = new List(); + //for (int i = 0; i < HexValue.Length; i += 2) + //{ + // if (BitConverter.ToChar(HexValue, i) == '\0' && StrValue != "" && !(StrValue.EndsWith("\u0001ă\u0001\u0003\u0003慮敭") || StrValue.EndsWith("\u0001ă\u0001\u0003\u0005敭慧慎敭"))) + // { + // List.Add(StrValue.Replace("\u0001ă\u0001\u0003\u0003慮敭\0", "[name]").Replace("\u0001ă\u0001\u0003\u0005敭慧慎敭\0", "[name]")); + // StrValue = ""; + // } + // else StrValue += BitConverter.ToChar(HexValue, i); + //} + ////foreach (string str in Talents) + //// Console.WriteLine(str); + //String[] Skills = List.Skip(List.IndexOf("Coup Critique")).Take(List.IndexOf("Augmente parfois les dégâts.") - List.IndexOf("Coup Critique")).ToArray(); + //String[] SkillsTexts = List.Skip(List.IndexOf("Augmente parfois les dégâts.")).Take(List.IndexOf("Augmente parfois les dégâts.") - List.IndexOf("Coup Critique")).ToArray(); + #endregion } + enum Cases { Full, Select, None }; //for B_MissionCards_Click } -} +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Cheats.resx b/Pokemon Shuffle Save Editor/Cheats.resx index 1af7de1..54f0a50 100644 --- a/Pokemon Shuffle Save Editor/Cheats.resx +++ b/Pokemon Shuffle Save Editor/Cheats.resx @@ -117,4 +117,349 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + Sets everyone of your caught pokemon to their maximum level, and +gives them the corresponding amount of experience & lollipops. + +Ctrl + Click to select which level you want to set your pokemons to. +A pokemon will be set to its maximum instead if selected level is higher. + + + Marks as caught every pokemon that has been released. + +/!\ Any pokemon that has only been released as an event stage, is normal type +and has 30BP & "Opportunist" talent will be skiped. Add it manually if needed. + +/!\ Event pokemons that are included in the resource files but planned to be +released at a further date will be included too. Uncatch them manually if needed. + + + Gives you megastones for everything that you've caught and for which a megastone has been released. + +/!\ May include stones that are about to be released or for which the competition is ongoing, as it will +add any megastone for which the mega differs from the "default" type & talent. + +Ctrl + click to un-own every stone. + + + If you own both a pokemon and its megastone, it'll be fed with the maximum number +of Mega speedups. + +Ctrl + click to select a number of speedups, if a pokemon cannot be fed this amount of speedups +it'll be fed its maximum instead. + + + All stages will be marked as completed, with the default C-rank and 0 highscore. Any +unredeemed reward for a stage (a.k.a megastones) will be redeemable by beating it. + +/!\ Having all stages C-ranked with a 0 highscore isn't legit. Use the "S-Rank All Completed" +code after using this one. + + + + Will mark every completed Main or Expert stage as S-rank. +Highscores will be set as the smallest "legitimately" possible too, unless your current highscore +is already enough. + +Ctrl + Click to select a rank manually (0 = C, 1 = B, 2 = A, 3 = S). + + + Sets number of streetpass encounters to 0 and deletes the 10 last ones that you can see +in "Streetpass encounters" menu. This is usefull if entering this menu crashes your game. + +Ctrl+clic to set your desired number of streetpass encounters and decide if you want to +wipe your streetpass tags or not. + +For information, you get 1 jewel for your 1st and every 100 streetpasses, as well as 1 heart +for your 5th and every 10 streetpasses. + + + + Opens a popup to select your desired step (Ctrl + click sets step 999 by default). + +Will set an active escalation battle to selected step (it'll not have been beaten yet). +Beat it to get all rewards at once. + +/!\ Should do nothing if there aren't any active escalation battle. If there ever is more +than one active at the same time, only one should be affected. + + + -Marks every pokemon as uncaught +-Sets their level to 1 +-Sets experience & Raise Max Level items to 0 +-Remove megastones if any +-Sets mega speedups to 0 + +/!\ Manually add at least Espurr, Bulbasaur, Squirtle and charmander, +or reset stages too. + + + Enables crystal hearts (7 renewable hearts & 700 coins at each connexion). + +WARNING : This is still a WIP & will not look legit on your savefile. +Use at your own risk and report if this breaks something or doesn't work. + + + 143 + + + + + AAABAAMAEBAAAAAAIABoBAAANgAAACAgAAAAACAAqBAAAJ4EAAAwMAAAAAAgAKglAABGFQAAKAAAABAA + AAAgAAAAAQAgAAAAAABABAAAAAAAAAAAAAAAAAAAAAAAAACu7/8puPT/p9j//6fY//8ptvH/AJvW/xyD + rP9ugpj/bYCU/xt9pf8Akcb/J6rg/6bX/v+n2P//Kbj0/wCu7/8Aru//Kbj0/6fZ//+Nsc//FUdZ/wA+ + R/8AVGD/AGRx/wBkcf8AU1//AD1G/xRDVP+Al7H/oMvt/ym49P8Aru//AK7v/ym59P9siJ//Bjo//wCO + of8Am7H/AKK1/xd4jP8Xdoz/AJ+0/wCXq/8AiZn/Bjg9/19ugP8kquL/AK7v/wCu7/8N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4f/p7fb/2OTu/07e5/8H+Pv/APX//wDw+/8A8vv/APX//wD2//8A8/v/APP7/wD2 + //8A9f//APL7/wDw+/8A9f//APb6/w7Ezv9Lb5z/HCx+/ww7av8BeIb/AB8h/wB+rf8ArvT/AK7v/wCu + 7/8Aru//Bavs/1mGm/+I4+f/mP///6j+//+o8vL/N6Wo/wKCh/8Axsv/APL5/wDz//8A8///AO3z/wBn + bf8AZ2//AO30/wDz//8A8///APL5/wDEy/8AgYf/AI2X/yjR2f8MxdD/ALPD/wCDjv8AJjX/AJzX/wCu + 7/8Aru//AK7v/wCu7/8ArfH/QY6v/4LIyv+A/f//bO7y/3qjp/8wMS3/AgIB/wAlJ/8Atb//APb//wDz + //8A8fr/AM7U/wDO1P8A8fr/APP//wD2//8Atb//ACQn/wAAAP8ABAX/EFRX/we5x/8ArsH/AF1k/wA7 + Uv8ApeP/AK7v/wCu7/8Aru//AK7v/wCv8f82krb/dbKy/2v///9LyMv/WF5g/zEwMf9DQ0P/NTQ0/wJR + V/8A+///APP//wDz//8A8///APP//wDz//8A8///APv//wJRV/81NDT/Pj8+/wgICP8AERH/AJGe/wCs + wf8AR0z/BUpi/wCo5v8Aru//AK7v/wCu7/8Aru//AK/x/zqXwf9wq67/af3//03Kzf9IUVP/SklK/9LR + 0v+9trb/HFtg/wD7//8A8///APP//wDz//8A8///APP//wDz//8A+///HFtg/722tv/Pzs//Kioq/wAT + Ff8AlJ7/AKm9/wA/Qf8IVnH/AKzt/wCu7/8Aru//AK7v/wCu7/8Ar/H/QqnX/4Cnpf+A+vv/Yu/y/zmB + hP8wNDX/iISG/3KKi/8Jsrr/APb//wDz//8A8///APP//wDz//8A8///APP//wD2//8Jsrr/comL/4KA + gv8OFxb/AFZb/wCwwP8AobL/AC80/x9zlf8ArvL/AK7v/wCu7/8Aru//AK7v/wCv8f9Fs+b/kaen/5H0 + 9f93/P//Nevs/x6krP8LhIv/A77H/wDw9v8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDw + 9v8Du8P/BX+F/wCOlf8Cusn/BrDD/wCap/8DJin/LYy2/wCu8v8Aru//AK7v/wCu7/8Aru//AK7w/07A + 9/9xf4X/adrd/2P7//8w+P//Dvf//wz7//8K9P//BvP//wHz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wD0//8A9v7/AN3t/wC90P8Arb//AICM/xIdIP9KtOj/AK/x/wCu7/8Aru//AK7v/wCu + 7/8Aru//Vsj5/1tqdv8vm6L/Pfv//yv3//8X9f//LPb//031//9C9f//G/T//wPz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDv/P8A3Ov/ALzQ/wCww/8AX2j/MjlB/06x5P8Aq/H/AK7v/wCu + 7/8Aru//AK7v/wCu8f9HseT/Q0lW/wcvMP8P7/T/Fff//yT3//9i9///x/3//8r///92+v//H/X//wLz + //8C8///AvP//wLz//8C8///AvP//wLz//8C8///APL//wDj9v8AxNT/AK+9/wEfH/8+Q0r/Poyv/wCS + x/8ArvH/AK7v/wCu7/8Aru//AKLk/xBGX/8FMjn/AHmI/wSdo/8J8/v/LPX//5L5///1////+P///7r9 + //9U9///FvT//xPz//8T8///E/P//xHz//8N8///DfP//w3z//8D8///AO79/wDP3/8AeID/AFhk/wUm + Kv8OO0z/AHym/wCb1/8Are//AK7v/wCw9f8AQFn/ABUb/wC90v8A3/H/BNfh/wvw+/8/+P//o/3//9z/ + ///p////3P///7T9//9x+v//S/j//zn3//819///Ovj//z/4//9C+P//Qvj//z/5//8n9///AeHu/wC0 + wP8ArL//AI6i/wAQEv8AL0D/AIe3/wCj4v8AsfP/AIe6/wAFB/8AIyz/ANXs/wDp+P8J9f//J/f//33l + 6/907fL/cP7//4D8//95+f//cvn//2L4//9S+P//S/f//0v3//9L+P//Sfj//0b5//9G/P//XOvw/3vh + 5f8o9f3/Ad7w/wC8zv8Ap7z/ABog/wADBf8AY4X/AJfL/wCm5v8AMUf/AAAA/wEtMf8E8f//CfP//zP3 + //+F/f//burs/zCcof80kpT/PcvM/0Dr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D+f8Aru//AK7v/wCu7/8Aru//UsP5/6rZ + //+l2v//o9n9/5fF5/9KkrH/FmmM/xJKYP8oaoL/AKzt/wCq7f8Ar/P/UsT6/6zb//+l1///pdf//6rZ + //9Sw/n/AK7v/wCu7/8Aru//AK7v/1LD+f+q2f//pdf//6XX//+q2f//UsP5/wCu7/8Aru//AK7v/wCu + 7/9Sw/n/qtn//6XX//+l1///rNv//1LF+v8Ar/P/AKrr/wCr7P8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAwAAAAYAAAAAEA + IAAAAAAAgCUAAAAAAAAAAAAAAAAAAAAAAAAAru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX + //+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//ALL3/wCu9/8Aru//AKbm/3O+7/+lwub/lLre/5S2 + 1v+Uttb/lLbW/5y61v9rstb/AJrW/wCi3v8Apub/AKrv/wCu7/8Asvf/AK7v/3vO//+t2///pdf//6XX + //+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu9/8Aqu//AKLe/wCazv8AksX/AIq9/2ue + vf+UpsX/jKa9/4ymvf+Mor3/jKK9/5Smvf9rnr3/AIa1/wCGtf8AhrX/AIq9/wCSxf8Antb/AKbm/3vO + //+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AKbm/wCe1v8AksX/AIKt/wBx + nP8AWXP/AEVa/yE1Qv8pKDH/ISQ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QSl/yEE + nP8AAAD/AAgI/wCCrf8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aqu//MU1S/0JhWv9aUaX/jGn//6WS + ///Fuv//1sr//72u//+EYeb/KVlz/wDz9/8A9///APv//wDO1v8ATVL/AMrO/wDz//8A7/f/AMK9/wg5 + Sv8IOUr/AMK9/wDv9/8A8///AMrO/wBNUv8Aztb/APv//wD3//8A6+//IU1j/2tNzv9jTeb/KQzF/yEE + tf8hBK3/IQC1/xAEUv8AGBD/AAwQ/wCOvf8Asvf/AK7v/wCu7/8Aru//AK7v/wCu7/8Arvf/QmFz/1qW + lP9jvr3/lIa9/86y9//v5/////f//9bG7/97jqX/Id/e/wD7//8A8///APf//wDf7/8A4+//AP///wD3 + //8A9///AP///wDj7/8A4+//AP///wD3//8A9///AP///wDj7/8A3+//APf//wDz//8A+///AM7W/zFR + a/9zUbX/Ohy9/yEAtf8hAJT/EABK/wBZWv8ANTH/ABAZ/wCe1v8Asvf/AK7v/wCu7/8Aru//AK7v/wCu + 7/8Asvf/Ooal/3uChP97////lOvm/73X3v/e6+//7/P3/8Xn5v9j9///EP///wD7//8A9///APP//wD3 + //8A9///APP//wDz//8A8///APf//wD3//8A9///APf//wDz//8A8///APP//wD3//8A9///APP//wD3 + //8A+///AP///wjf5v9Knpz/MVlz/wgxWv8IRVL/AIKE/wCirf8ADAj/ADlK/wCu7/8Arvf/AK7v/wCu + 7/8Aru//AK7v/wCu7/8Asvf/GZ7O/4R5e/+E3+b/lP///6X///+1////xf///63///9S6+//CL7F/wDG + zv8A8///AP///wDz//8A8///APP//wDz//8A+///ANfe/wAoKf8AKCn/ANfm/wD7//8A8///APP//wDz + //8A8///AP///wDz//8Axs7/ALrF/wDX5v8x8///Kdfe/wC+xf8AtsX/ALbF/wB5hP8AAAD/AGWM/wCy + 9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Arvf/AKrm/3N5hP+EwsX/jP///4z///+E+///hP///5TG + xf9KUVL/CAQA/wAAAP8ANTH/AMLO/wD///8A8///APP//wDz//8A+///AMrW/wBFUv8ARVL/AMrW/wD7 + //8A8///APP//wDz//8A////AL7O/wAxMf8AAAD/AAAA/wAUGf8ZgoT/Idvm/wC6zv8Arr3/ALLF/wBN + Uv8ABAj/AIa1/wCy9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK73/1qClP+EoqX/e////3v7 + //9j////WrrF/3txc/9CQTr/CAgI/wAAAP8AAAD/ABQZ/wDf7/8A+///APP//wDz//8A8///APf//wD/ + //8A////APf//wDz//8A8///APP//wD7//8A3+//ABQZ/wAAAP8AAAD/AAAA/wAAAP8IAAD/EI6U/wDG + 1v8ArsX/AK69/wAoKf8AGCH/AJbO/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/1KC + lP97joz/c////2v///9S+///Qmlr/2thY/9CQUL/AAAA/xAQEP8ICAj/AAAA/wCGlP8A////APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD///8AhpT/AAAA/wgICP8IDAj/AAAA/wAA + AP8AAAD/ADk6/wDC1v8ArsX/AKq9/wAYGf8IICn/AJrO/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//ALL3/1KCnP9zioz/a////2P///9S+///OlVa/1pVUv8xMTH/UlFS/+bn5v/W0tb/GRQQ/wBZ + Wv8A////APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD///8AWVr/GRQQ/9bS + 1v/m4+b/SklK/wAAAP8AAAD/ACgp/wC+zv8ArsX/AKa1/wAUEP8IKDH/AJ7W/wCy9/8Aru//AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//ALL3/1qOrf9zgoT/a/f//2v///9a////Om1z/0pBQv8pKCn/paKl//// + ////////c11a/wBte/8A////APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD/ + //8AbXv/c11a////////////nJqc/wAAAP8AAAD/AEVK/wDCzv8ArsX/AJ6t/wAMCP8QNUL/AKLe/wCy + 9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/2Oixf97gnv/e/P3/3v///9r////OrrF/zox + Mf8pKCn/UlFS//fz9//m29b/KS0x/wDS3v8A+///APP//wDz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wD7//8A0t7/KS0x/+bb1v/38/f/QkVC/wAAAP8AAAD/AJac/wC6zv8Aqr3/AJKl/wAA + AP8pUWP/AKrm/wCy9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/2Oqzv+MhoT/jOvv/4z/ + //+E////Sv///zGqrf8xSUr/CAQI/yEcGf8QNTr/AKq1/wD///8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A////AKq1/xAxOv8ZGBn/AAAA/wAkIf8AipT/CMbW/wCu + vf8Arr3/AIaM/wAAAP86ZXv/AK7v/wCu9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/2u6 + 5v+Ujoz/lNve/5T///+M+///Wvv//yH///8h6/f/EMLO/wC6xf8A5/f/AP///wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///AP///wDj7/8Atr3/ALrF/wDS + 3v8A0t7/CLbO/wiqvf8Arr3/AGlz/wgAAP9KhqX/ALL3/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK73/3PG9/97dXv/e7K1/3v///97+///Uvv//yH3//8Q9///CP///wj///8A9///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD3 + //8A////AO///wDX5v8Awtb/ALbF/wCqvf8Arr3/AD1C/xAICP9rrtb/ALL3/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/3vS//9rcXv/Ql1j/0r3//9S+///Svv//yH3//8Q8///EPP//xn3 + //8h8///GfP//xDz//8I8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///AOf3/wDS5v8Awtb/ALLF/wCqvf8AorX/ABAQ/zExOv97xvf/ALL3/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/4TX//97lq3/GRQQ/ynCzv8x////Ovf//yH3 + //8Z9///Iff//0L3//9j9///a/f//1L3//8x9///EPP//wDz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///AOv3/wDX5v8Awtb/ALLF/wCyxf8Agoz/AAAA/1pl + c/9zrtb/AKLm/wCu9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+EmrX/EAAA/whZ + Wv8Q////Gff//xn3//8Z9///Mff//2v3//+t+///xf///7X///97+///Mff//wjz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///AO///wDb7/8Axtb/ALbF/wC2 + xf8AOTr/CAQA/3uKnP9rnr3/AIa1/wCi3v8Asvf/AK7v/wCu7/8Aru//AK7v/wCu7/8Arvf/ALL3/0p9 + nP8ZFBn/AAQI/wAgIf8Iws7/CP///xDz//8h9///Qvf//5T7///m////9////+b///+9////Y/f//xn3 + //8I8///CPP//wjz//8I8///CPP//wjz//8I8///CPP//wjz//8I8///CPP//wjz//8A8///APP//wDj + 9/8Azt7/AMbW/wCSnP8AFBn/AAQA/xkUGf9CcYz/AIa1/wCGtf8Apub/AK73/wCu7/8Aru//AK7v/wCu + 7/8Atv//AGmU/wAAAP8AGBn/AJ61/wCyxf8ATVL/COfv/wj3//8Z8///Uvf//8X7///3//////////// + ///e////nPv//0r3//8h9///GfP//xnz//8Z8///GfP//xnz//8Z8///EPP//xDz//8Q8///EPP//xDz + //8I8///APf//wDv//8A2+//AL7F/wA1Ov8AgpT/AHWE/wAQEP8AAAD/AFlz/wCGtf8Air3/AKrv/wCu + 7/8Aru//AK7v/wC2//8AgrX/AAQI/wAUGf8Arr3/AMrm/wDn9/8AusX/CN/v/wj3//8Z9///Y/f//8X/ + ///v////9//////////3////1v///6X7//9z+///Svf//zr3//8x9///Kff//yn3//8p9///Kff//zH3 + //8x9///Ovf//zH3//8p9///Gff//wjz//8A6/f/AL7O/wCWnP8AssX/AJat/wCClP8AEBD/AAQA/wBh + hP8AhrX/AJbO/wCu9/8Aru//ALL3/wCm5v8AGCH/AAAA/wA1Qv8Awt7/ANfm/wDr9/8I+///CPf//xnz + //9C+///jP///63///+t////vf///8X///+9////vf///63///+U+///c/v//1r7//9S9///Svf//1L7 + //9a+///Y/v//2P7//9j+///Wvv//2P7//9z////e////0r7//8I8///AOPv/wDS5v8Aus7/AKa1/wCW + rf8AKDH/AAAA/wAQGf8AeaX/AIq1/wCq5v8Aru//ALr//wBVc/8AAAD/AAAA/wA1Qv8A1+//AOf3/wDv + //8I8///EPP//0L7//+U5+//hMLF/0r3//9K////Wvv//2P7//9a9///Uvf//1L3//9S9///Svf//0r3 + //9K9///Svf//0r3//9C9///Qvf//zr3//869///Ovv//zr///9C9///a7a9/5zj5v9S////CO///wDb + 7/8Axtb/ALbO/wCqvf8AKDH/AAAA/wAAAP8APVL/AIa1/wCazv8Asvf/AJ7e/wAIEP8AAAD/AAAA/wBF + Sv8A7///CO///wjz//8Q9///Ovf//5T///+U+///Qq6t/yl1e/8xsrX/Ou/3/0L///9C////Ovv//zr7 + //869///Ovf//zr3//869///Ovf//zr3//86+///Ovv//0L///9C////Qu/3/0K2vf86fYT/Oqat/2v3 + //+c////Svv//wDv//8A1+b/AMLW/wC+zv8ANTr/AAAA/wAAAP8ABAj/AHGc/wCOvf8Auv//AGGE/wAA + AP8ABAD/AAAA/whBSv8I9///CPf//xD3//9C9///lP///63///9r+///Ov///ymqtf8xHBn/OkVC/zqG + hP9CusX/QuPm/0Lz//9C////Qv///0L///9C////Qv///0L///9C8///QuPm/0q+xf9KjpT/SllS/0o5 + Ov9Ktr3/Qv///0L3//97+///nP///1L7//8I6/f/ANfm/wDK1v8ALTH/AAAA/wAAAP8AAAD/AEFa/wCK + vf8Arvf/CC06/xAIAP8QEBD/EAwI/xAxMf8Z7/f/Kfv//1r7//+c////nP///3v7//9S////QvP3/zFJ + Sv8hOUL/IVlz/zE5Qv9CNTH/SkE6/0JZWv9CbWv/Qnl7/0p9hP9KfYT/Qnl7/0Jtc/9KXVr/UklC/0pB + Qv9CSUr/KWmE/0JVWv9SZWP/SvP3/0r7//9S9///a/v//5T///9j+///EO///wDS3v8AGBn/AAAA/wAA + AP8AAAD/ABgh/wCCrf8Aks7/GRgZ/xkcGf8ZHBn/IRwZ/ykxMf9K5+//e////4z///9r+///Uvv//1L/ + //9S////Sn17/zoxMf8Als7/ALr//wCm5v8Ijr3/GXml/1Jpe/9jZWv/WmFr/1JdY/9SXWP/WmFr/2Nl + a/9SaXv/GX2l/xCOvf8Apub/ALb//wiazv9SSUr/UoKE/1L7//9K+///Qvf//1L3//9z+///a////ynb + 5v8ACAj/AAAA/wAAAP8AAAD/AAAA/wBpjP8IdZz/IRwZ/yEkIf8pLSn/QkFC/1pRUv9rztb/Wv///zr3 + //8x9///Ov///0r7//9Kioz/Sj06/xmCrf8Atv//AK7v/wCy9/8Atvf/ALL3/3vS//+t3///pdv//5zX + //+c1///pdv//63f//970v//ALL3/wCy9/8Asvf/AK7v/wCy9/8Zhq3/WkVC/1qKjP9S+///Sv///0L3 + //869///Qv///0q+xf8pICH/AAQA/wAAAP8AAAD/AAAA/wBNY/8ZXXv/OjUx/1pZWv9zcXP/Wl1a/0I9 + Ov86dXv/Mf///yn7//8p////Md/m/zppa/9COTH/GYKt/wC2//8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdv//6Xb//+l2///pdv//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Atv//IYKt/1JF + Qv9SeXv/UuPm/1L///9C+///Ov///ylpc/8pHBn/MTEx/yEgIf8AAAD/AAAA/wAxQv9SeYz/nJaU/5ye + nP9jZWP/QkFC/0I9Ov86PTr/OtLe/zHr7/8pjpT/ISgp/0I9Qv9ansX/ALb3/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//ALL3/1qexf9jWVr/UlVS/1Kmpf9K7/f/Qtfe/zo5Ov8pJCH/ISQh/1JRUv9SUVL/EAwI/wAY + If+cqrX/paKc/1pZWv9CRUL/QkVC/0JFQv9CPTr/Ok1K/yk5Ov8pHBn/UmVz/5zK7/971///AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/3vX//+cyu//a32M/1JJSv9KXVr/Sl1a/0I9Ov8xOTr/ISQh/yEg + If9jZWP/c3Fz/ykxMf+EhoT/WllS/0pFQv9KSUL/SkVC/0I9Ov86PTr/QkFK/1pthP+Mtt7/reP//63f + //97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b + //97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t3///pd///5S+3v9rgpT/UlVa/0JB + Qv86NTH/MS0p/yEgGf8hIBn/a2lj/4SChP9CWWP/QkFC/0JJSv86WWP/KV1z/1qGnP+ErsX/nM73/63j + //+l3///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX + //+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6Xf + //+l3///nM73/4Suzv9ahpz/IVVr/yFBUv8ZJCn/ISAh/0ppc/8Apt7/AJrW/wCe3v8Aqu//ALL3/3vS + //+14///pdv//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdf//6XX//+l1///pdv//7Xj//971///ALL3/wCq7/8Antb/AJbO/wCi3v8Asvf/ALL3/wCy + 9/8Asvf/AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCy9/8Asvf/ALL3/wCy + 9/8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8= + + \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Database.cs b/Pokemon Shuffle Save Editor/Database.cs new file mode 100644 index 0000000..b24437e --- /dev/null +++ b/Pokemon Shuffle Save Editor/Database.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace Pokemon_Shuffle_Save_Editor +{ + public class Database + { + #region Properties + + public byte[] MegaStone { get; private set; } + public byte[] MonAbility { get; private set; } + public byte[] MonData { get; private set; } + public byte[] MonLevel { get; private set; } + public byte[] StagesEvent { get; private set; } + public byte[] StagesExpert { get; private set; } + public byte[] StagesMain { get; private set; } + public byte[] MissionCard { get; private set; } + + public bool[][] HasMega { get; private set; } // [X][0] = X, [X][1] = Y + public int[] Forms { get; private set; } + public int[][] PokathlonRand { get; private set; } // [step][0] = min, [step][1] = max + public bool[][] Missions { get; private set; } + public string[] MonsList { get; private set; } + public string[] PokathlonList { get; private set; } + public string[] SpeciesList { get; private set; } + public string[] SkillsList { get; private set; } + public string[] SkillsTextList { get; private set; } + public Tuple[] Megas { get; private set; } //monsIndex, speedups + public Tuple>[] Mons { get; private set; } //specieIndex, formIndex, isMega, raiseMaxLevel, basePower, skills, type, Rest + public Tuple[] Rest { get; private set; } //stageNum, skillsCount + public List MegaList { get; private set; } //derivate a List from Megas.Item1 to use with IndexOf() functions (in UpdateForms() & UpdateOwnedBox()) + + public int MegaStartIndex { get; private set; } // Indexes of first mega & second "---", respectively,... + public int MonStopIndex { get; private set; } //...should allow PSSE to work longer without needing an update. + + #endregion Properties + + public Database() + { + MonData = Properties.Resources.pokemonData; + StagesMain = Properties.Resources.stageData; + StagesEvent = Properties.Resources.stageDataEvent; + StagesExpert = Properties.Resources.stageDataExtra; + MegaStone = Properties.Resources.megaStone; + MonLevel = Properties.Resources.pokemonLevel; + MonAbility = Properties.Resources.pokemonAbility; + MissionCard = Properties.Resources.missionCard; + string resourcedir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar + "resources" + Path.DirectorySeparatorChar; + if (!Directory.Exists(resourcedir)) + Directory.CreateDirectory(resourcedir); + byte[][] files = { MegaStone, MonData, StagesMain, StagesEvent, StagesExpert, MonLevel, MonAbility, MissionCard }; + string[] filenames = { "MegaStone.bin", "pokemonData.bin", "stageData.bin", "stageDataEvent.bin", "stageDataExtra.bin", "pokemonLevel.bin", "pokemonAbility.bin", "MissionCard.bin" }; + for (int i = 0; i < files.Length; i++) + { + if (!File.Exists(resourcedir + filenames[i])) + File.WriteAllBytes(resourcedir + filenames[i], files[i]); + else + { + files[i] = File.ReadAllBytes(resourcedir + filenames[i]); + switch (i) + { + case 0: + MegaStone = File.ReadAllBytes(resourcedir + filenames[i]); + break; + + case 1: + MonData = File.ReadAllBytes(resourcedir + filenames[i]); + break; + + case 2: + StagesMain = File.ReadAllBytes(resourcedir + filenames[i]); + break; + + case 3: + StagesEvent = File.ReadAllBytes(resourcedir + filenames[i]); + break; + + case 4: + StagesExpert = File.ReadAllBytes(resourcedir + filenames[i]); + break; + + case 5: + MonLevel = File.ReadAllBytes(resourcedir + filenames[i]); + break; + + case 6: + MonAbility = File.ReadAllBytes(resourcedir + filenames[i]); + break; + case 7: + MissionCard = File.ReadAllBytes(resourcedir + filenames[i]); + break; + } + } + } + SpeciesList = Properties.Resources.species.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.RemoveEmptyEntries); + MonsList = Properties.Resources.mons.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.RemoveEmptyEntries); + PokathlonList = Properties.Resources.pokathlon.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.RemoveEmptyEntries); + + MegaStartIndex = MonsList.ToList().IndexOf("Mega Venusaur"); + MonStopIndex = MonsList.ToList().IndexOf("---", 1); + int entrylen = BitConverter.ToInt32(MonData, 0x4); + Megas = new Tuple[BitConverter.ToUInt32(MegaStone, 0) - 1]; + for (int i = 0; i < Megas.Length; i++) + { + int monIndex = BitConverter.ToUInt16(MegaStone, 0x54 + i * 4) & 0x3FF; + string str = "Mega " + MonsList[monIndex]; + if (monIndex == 6 || monIndex == 150) + str += (monIndex != (BitConverter.ToUInt16(MegaStone, 0x54 + (i - 1) * 4) & 0x3FF)) + ? " X" + : " Y"; + byte[] data = MonData.Skip(0x50 + entrylen * MonsList.ToList().IndexOf(str)).Take(entrylen).ToArray(); + int maxSpeedup = (BitConverter.ToInt32(data, 0xA) >> 7) & 0x7F; + Megas[i] = new Tuple(monIndex, maxSpeedup); + } + MegaList = new List(); + for (int i = 0; i < Megas.Length; i++) + MegaList.Add(Megas[i].Item1); + Forms = new int[SpeciesList.Length]; + HasMega = new bool[MonsList.Length][]; + for (int i = 0; i < MonsList.Length; i++) + HasMega[i] = new bool[2]; + Mons = new Tuple>[BitConverter.ToUInt32(MonData, 0)]; + Rest = new Tuple[Mons.Length]; + for (int i = 0; i < Mons.Length; i++) + { + byte[] data = MonData.Skip(0x50 + entrylen * i).Take(entrylen).ToArray(); + bool isMega = i >= MegaStartIndex && i <= MonsList.Count() - 1; + int spec = (isMega && i <= MegaStartIndex + Megas.Length - 1) + ? SpeciesList.ToList().IndexOf(MonsList[Megas[i - MegaStartIndex].Item1].Replace("Shiny", "").Replace("Winking", "").Replace("Smiling", "").Replace(" ", "")) //crappy but needed for IndexOf() to find the pokemon's name in specieslist (only adjectives on Megas names matter) + : (BitConverter.ToInt32(data, 0xE) >> 6) & 0x7FF; + int raiseMaxLevel = (BitConverter.ToInt16(data, 0x4)) & 0x3F; + int basePower = (BitConverter.ToInt16(data, 0x3)) & 0x7; //ranges 1-7 for now (30-90 BP), may need an update later on + int[] skill = new int[5]; + int j = 0; + int skillCount = 0; + foreach (int adr in new int[] { 0x02, 0x20, 0x21, 0x22, 0x23}) + { + skill[j] = data[adr] & 0x7F; //ranges 1-~100 for now ("Opportunist" to "Transform"), ordered list in MESSAGE_XX/message_PokedexXX.bin + skillCount += (skill[j] != 0 ? 1 : 0); + j++; + } + skillCount = Math.Max(skillCount, 1); + int type = (BitConverter.ToInt16(data, 0x01) >> 3) & 0x1F; //ranges 0-17 (normal - fairy) (https://gbatemp.net/threads/psse-pokemon-shuffle-save-editor.396499/page-33#post-6278446) + int index = (BitConverter.ToInt16(data, 0)) & 0x3FF; //ranges 1-999, it's the number you can see on the team selection menu + Rest[i] = new Tuple(index, skillCount); //Mons has more than 7 arguments so 8th one and beyond must be included in another Tuple + Mons[i] = new Tuple>(spec, Forms[spec], isMega, raiseMaxLevel, basePower, skill, type, Rest[i]); + Forms[spec]++; + } + for (int i = 0; i < Megas.Length; i++) + HasMega[BitConverter.ToUInt16(MegaStone, 0x54 + i * 4) & 0x3FF][(MegaStone[0x54 + (i * 4) + 1] >> 3) & 1] = true; + PokathlonRand = new int[PokathlonList.Length / 2][]; + for (int i = 0; i < PokathlonRand.Length; i++) + { + PokathlonRand[i] = new int[2]; + Int32.TryParse(PokathlonList[2 * i], out PokathlonRand[i][0]); + Int32.TryParse(PokathlonList[1 + 2 * i], out PokathlonRand[i][1]); + } + Missions = new bool[BitConverter.ToInt32(MissionCard, 0)][]; + for(int i = 0 ; i < Missions.Length; i++) + { + Missions[i] = new bool[10]; + int ientrylen = BitConverter.ToInt32(MissionCard, 0x4); + byte[] data = MissionCard.Skip(BitConverter.ToInt32(MissionCard, 0x10) + i * ientrylen).Take(ientrylen).ToArray(); + for (int j = 0; j < Missions[i].Length; j++) + Missions[i][j] = BitConverter.ToInt16(data, 0x8 + 2 * j) != 0; + } + byte[] HexValue = Properties.Resources.messagePokedex_US; + string StrValue = ""; + List List = new List(); + for (int i = 0; i < HexValue.Length; i += 2) + { + if (BitConverter.ToChar(HexValue, i) == '\0' && StrValue != "" && !(StrValue.EndsWith("\u0001ă\u0001\u0003\u0003慮敭") || StrValue.EndsWith("\u0001ă\u0001\u0003\u0005敭慧慎敭"))) + { + List.Add(StrValue.Replace("\u0001ă\u0001\u0003\u0003慮敭\0", "[name]").Replace("\u0001ă\u0001\u0003\u0005敭慧慎敭\0", "[name]")); + StrValue = ""; + } + else StrValue += BitConverter.ToChar(HexValue, i); + } + SkillsList = List.Skip(List.IndexOf("Opportunist")).Take(List.IndexOf("Attacks can occasionally deal\ngreater damage than usual.") - List.IndexOf("Opportunist")).ToArray(); + SkillsTextList = List.Skip(List.IndexOf("Attacks can occasionally deal\ngreater damage than usual.")).Take(List.IndexOf("Attacks can occasionally deal\ngreater damage than usual.") - List.IndexOf("Opportunist")).ToArray(); + } + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Form1.Designer.cs b/Pokemon Shuffle Save Editor/Form1.Designer.cs deleted file mode 100644 index 5209a5d..0000000 --- a/Pokemon Shuffle Save Editor/Form1.Designer.cs +++ /dev/null @@ -1,833 +0,0 @@ -namespace Pokemon_Shuffle_Save_Editor -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.B_Open = new System.Windows.Forms.Button(); - this.TB_FilePath = new System.Windows.Forms.TextBox(); - this.B_Save = new System.Windows.Forms.Button(); - this.GB_HighScore = new System.Windows.Forms.GroupBox(); - this.label10 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.NUP_EventScore = new System.Windows.Forms.NumericUpDown(); - this.NUP_EventIndex = new System.Windows.Forms.NumericUpDown(); - this.NUP_ExpertScore = new System.Windows.Forms.NumericUpDown(); - this.NUP_ExpertIndex = new System.Windows.Forms.NumericUpDown(); - this.NUP_MainScore = new System.Windows.Forms.NumericUpDown(); - this.NUP_MainIndex = new System.Windows.Forms.NumericUpDown(); - this.label1 = new System.Windows.Forms.Label(); - this.PB_Event = new System.Windows.Forms.PictureBox(); - this.PB_Expert = new System.Windows.Forms.PictureBox(); - this.PB_Main = new System.Windows.Forms.PictureBox(); - this.GB_Caught = new System.Windows.Forms.GroupBox(); - this.PB_MegaX = new System.Windows.Forms.PictureBox(); - this.PB_MegaY = new System.Windows.Forms.PictureBox(); - this.CHK_MegaX = new System.Windows.Forms.CheckBox(); - this.CHK_MegaY = new System.Windows.Forms.CheckBox(); - this.NUP_Level = new System.Windows.Forms.NumericUpDown(); - this.label7 = new System.Windows.Forms.Label(); - this.CHK_CaughtMon = new System.Windows.Forms.CheckBox(); - this.CB_MonIndex = new System.Windows.Forms.ComboBox(); - this.PB_Mon = new System.Windows.Forms.PictureBox(); - this.GB_Resources = new System.Windows.Forms.GroupBox(); - this.NUP_MegaSpeedup = new System.Windows.Forms.NumericUpDown(); - this.label21 = new System.Windows.Forms.Label(); - this.NUP_AttackUp = new System.Windows.Forms.NumericUpDown(); - this.NUP_DisruptionDelay = new System.Windows.Forms.NumericUpDown(); - this.NUP_Complexity = new System.Windows.Forms.NumericUpDown(); - this.NUP_MegaStart = new System.Windows.Forms.NumericUpDown(); - this.NUP_PlusEXP = new System.Windows.Forms.NumericUpDown(); - this.NUP_PlusTime = new System.Windows.Forms.NumericUpDown(); - this.NUP_PlusMoves = new System.Windows.Forms.NumericUpDown(); - this.label20 = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.label17 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.NUP_Jewels = new System.Windows.Forms.NumericUpDown(); - this.NUP_Coins = new System.Windows.Forms.NumericUpDown(); - this.NUP_Hearts = new System.Windows.Forms.NumericUpDown(); - this.label13 = new System.Windows.Forms.Label(); - this.label12 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.B_CheatsForm = new System.Windows.Forms.Button(); - this.GB_HighScore.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_EventScore)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_EventIndex)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertScore)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertIndex)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MainScore)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MainIndex)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Event)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Expert)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Main)).BeginInit(); - this.GB_Caught.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PB_MegaX)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_MegaY)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Level)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Mon)).BeginInit(); - this.GB_Resources.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MegaSpeedup)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_AttackUp)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_DisruptionDelay)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Complexity)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MegaStart)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_PlusEXP)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_PlusTime)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_PlusMoves)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Jewels)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Coins)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Hearts)).BeginInit(); - this.SuspendLayout(); - // - // B_Open - // - this.B_Open.Location = new System.Drawing.Point(12, 38); - this.B_Open.Name = "B_Open"; - this.B_Open.Size = new System.Drawing.Size(228, 32); - this.B_Open.TabIndex = 19; - this.B_Open.Text = "Open savedata.bin"; - this.B_Open.UseVisualStyleBackColor = true; - this.B_Open.Click += new System.EventHandler(this.B_Open_Click); - // - // TB_FilePath - // - this.TB_FilePath.Location = new System.Drawing.Point(12, 12); - this.TB_FilePath.Name = "TB_FilePath"; - this.TB_FilePath.ReadOnly = true; - this.TB_FilePath.Size = new System.Drawing.Size(228, 20); - this.TB_FilePath.TabIndex = 20; - // - // B_Save - // - this.B_Save.Enabled = false; - this.B_Save.Location = new System.Drawing.Point(12, 76); - this.B_Save.Name = "B_Save"; - this.B_Save.Size = new System.Drawing.Size(228, 32); - this.B_Save.TabIndex = 22; - this.B_Save.Text = "Save savedata.bin"; - this.B_Save.UseVisualStyleBackColor = true; - this.B_Save.Click += new System.EventHandler(this.B_Save_Click); - // - // GB_HighScore - // - this.GB_HighScore.Controls.Add(this.label10); - this.GB_HighScore.Controls.Add(this.label9); - this.GB_HighScore.Controls.Add(this.label8); - this.GB_HighScore.Controls.Add(this.label6); - this.GB_HighScore.Controls.Add(this.label5); - this.GB_HighScore.Controls.Add(this.label4); - this.GB_HighScore.Controls.Add(this.label3); - this.GB_HighScore.Controls.Add(this.label2); - this.GB_HighScore.Controls.Add(this.NUP_EventScore); - this.GB_HighScore.Controls.Add(this.NUP_EventIndex); - this.GB_HighScore.Controls.Add(this.NUP_ExpertScore); - this.GB_HighScore.Controls.Add(this.NUP_ExpertIndex); - this.GB_HighScore.Controls.Add(this.NUP_MainScore); - this.GB_HighScore.Controls.Add(this.NUP_MainIndex); - this.GB_HighScore.Controls.Add(this.label1); - this.GB_HighScore.Controls.Add(this.PB_Event); - this.GB_HighScore.Controls.Add(this.PB_Expert); - this.GB_HighScore.Controls.Add(this.PB_Main); - this.GB_HighScore.Enabled = false; - this.GB_HighScore.Location = new System.Drawing.Point(12, 245); - this.GB_HighScore.Name = "GB_HighScore"; - this.GB_HighScore.Size = new System.Drawing.Size(493, 118); - this.GB_HighScore.TabIndex = 23; - this.GB_HighScore.TabStop = false; - this.GB_HighScore.Text = "High-Scores"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(394, 76); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(38, 13); - this.label10.TabIndex = 17; - this.label10.Text = "Score:"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(234, 76); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(38, 13); - this.label9.TabIndex = 16; - this.label9.Text = "Score:"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(76, 76); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(38, 13); - this.label8.TabIndex = 15; - this.label8.Text = "Score:"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(401, 19); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(71, 13); - this.label6.TabIndex = 14; - this.label6.Text = "Event Stages"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(237, 19); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(73, 13); - this.label5.TabIndex = 13; - this.label5.Text = "Expert Stages"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(85, 19); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(66, 13); - this.label4.TabIndex = 12; - this.label4.Text = "Main Stages"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(393, 45); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(36, 13); - this.label3.TabIndex = 11; - this.label3.Text = "Index:"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(234, 45); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(36, 13); - this.label2.TabIndex = 10; - this.label2.Text = "Index:"; - // - // NUP_EventScore - // - this.NUP_EventScore.Location = new System.Drawing.Point(397, 92); - this.NUP_EventScore.Name = "NUP_EventScore"; - this.NUP_EventScore.Size = new System.Drawing.Size(77, 20); - this.NUP_EventScore.TabIndex = 9; - this.NUP_EventScore.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_EventIndex - // - this.NUP_EventIndex.Location = new System.Drawing.Point(435, 43); - this.NUP_EventIndex.Name = "NUP_EventIndex"; - this.NUP_EventIndex.Size = new System.Drawing.Size(39, 20); - this.NUP_EventIndex.TabIndex = 8; - this.NUP_EventIndex.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_ExpertScore - // - this.NUP_ExpertScore.Location = new System.Drawing.Point(240, 92); - this.NUP_ExpertScore.Name = "NUP_ExpertScore"; - this.NUP_ExpertScore.Size = new System.Drawing.Size(77, 20); - this.NUP_ExpertScore.TabIndex = 7; - this.NUP_ExpertScore.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_ExpertIndex - // - this.NUP_ExpertIndex.Location = new System.Drawing.Point(278, 43); - this.NUP_ExpertIndex.Name = "NUP_ExpertIndex"; - this.NUP_ExpertIndex.Size = new System.Drawing.Size(39, 20); - this.NUP_ExpertIndex.TabIndex = 6; - this.NUP_ExpertIndex.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_MainScore - // - this.NUP_MainScore.Location = new System.Drawing.Point(81, 92); - this.NUP_MainScore.Name = "NUP_MainScore"; - this.NUP_MainScore.Size = new System.Drawing.Size(77, 20); - this.NUP_MainScore.TabIndex = 5; - this.NUP_MainScore.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_MainIndex - // - this.NUP_MainIndex.Location = new System.Drawing.Point(117, 43); - this.NUP_MainIndex.Name = "NUP_MainIndex"; - this.NUP_MainIndex.Size = new System.Drawing.Size(39, 20); - this.NUP_MainIndex.TabIndex = 4; - this.NUP_MainIndex.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(76, 45); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(36, 13); - this.label1.TabIndex = 3; - this.label1.Text = "Index:"; - // - // PB_Event - // - this.PB_Event.Location = new System.Drawing.Point(323, 32); - this.PB_Event.Name = "PB_Event"; - this.PB_Event.Size = new System.Drawing.Size(64, 80); - this.PB_Event.TabIndex = 2; - this.PB_Event.TabStop = false; - // - // PB_Expert - // - this.PB_Expert.Location = new System.Drawing.Point(164, 32); - this.PB_Expert.Name = "PB_Expert"; - this.PB_Expert.Size = new System.Drawing.Size(64, 80); - this.PB_Expert.TabIndex = 1; - this.PB_Expert.TabStop = false; - // - // PB_Main - // - this.PB_Main.Location = new System.Drawing.Point(6, 32); - this.PB_Main.Name = "PB_Main"; - this.PB_Main.Size = new System.Drawing.Size(64, 80); - this.PB_Main.TabIndex = 0; - this.PB_Main.TabStop = false; - // - // GB_Caught - // - this.GB_Caught.Controls.Add(this.PB_MegaX); - this.GB_Caught.Controls.Add(this.PB_MegaY); - this.GB_Caught.Controls.Add(this.CHK_MegaX); - this.GB_Caught.Controls.Add(this.CHK_MegaY); - this.GB_Caught.Controls.Add(this.NUP_Level); - this.GB_Caught.Controls.Add(this.label7); - this.GB_Caught.Controls.Add(this.CHK_CaughtMon); - this.GB_Caught.Controls.Add(this.CB_MonIndex); - this.GB_Caught.Controls.Add(this.PB_Mon); - this.GB_Caught.Enabled = false; - this.GB_Caught.Location = new System.Drawing.Point(12, 114); - this.GB_Caught.Name = "GB_Caught"; - this.GB_Caught.Size = new System.Drawing.Size(228, 125); - this.GB_Caught.TabIndex = 24; - this.GB_Caught.TabStop = false; - this.GB_Caught.Text = "Owned Pokemon"; - // - // PB_MegaX - // - this.PB_MegaX.Location = new System.Drawing.Point(148, 77); - this.PB_MegaX.Name = "PB_MegaX"; - this.PB_MegaX.Size = new System.Drawing.Size(16, 16); - this.PB_MegaX.TabIndex = 23; - this.PB_MegaX.TabStop = false; - // - // PB_MegaY - // - this.PB_MegaY.Location = new System.Drawing.Point(86, 77); - this.PB_MegaY.Name = "PB_MegaY"; - this.PB_MegaY.Size = new System.Drawing.Size(16, 16); - this.PB_MegaY.TabIndex = 22; - this.PB_MegaY.TabStop = false; - // - // CHK_MegaX - // - this.CHK_MegaX.AutoSize = true; - this.CHK_MegaX.Location = new System.Drawing.Point(166, 79); - this.CHK_MegaX.Name = "CHK_MegaX"; - this.CHK_MegaX.Size = new System.Drawing.Size(15, 14); - this.CHK_MegaX.TabIndex = 21; - this.CHK_MegaX.UseVisualStyleBackColor = true; - this.CHK_MegaX.CheckedChanged += new System.EventHandler(this.UpdateForm); - // - // CHK_MegaY - // - this.CHK_MegaY.AutoSize = true; - this.CHK_MegaY.Location = new System.Drawing.Point(104, 79); - this.CHK_MegaY.Name = "CHK_MegaY"; - this.CHK_MegaY.Size = new System.Drawing.Size(15, 14); - this.CHK_MegaY.TabIndex = 20; - this.CHK_MegaY.UseVisualStyleBackColor = true; - this.CHK_MegaY.CheckedChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_Level - // - this.NUP_Level.Location = new System.Drawing.Point(130, 98); - this.NUP_Level.Maximum = new decimal(new int[] { - 10, - 0, - 0, - 0}); - this.NUP_Level.Name = "NUP_Level"; - this.NUP_Level.Size = new System.Drawing.Size(49, 20); - this.NUP_Level.TabIndex = 19; - this.NUP_Level.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.NUP_Level.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(85, 100); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(39, 13); - this.label7.TabIndex = 18; - this.label7.Text = "Level: "; - // - // CHK_CaughtMon - // - this.CHK_CaughtMon.AutoSize = true; - this.CHK_CaughtMon.Location = new System.Drawing.Point(88, 56); - this.CHK_CaughtMon.Name = "CHK_CaughtMon"; - this.CHK_CaughtMon.Size = new System.Drawing.Size(60, 17); - this.CHK_CaughtMon.TabIndex = 17; - this.CHK_CaughtMon.Text = "Caught"; - this.CHK_CaughtMon.UseVisualStyleBackColor = true; - this.CHK_CaughtMon.CheckedChanged += new System.EventHandler(this.UpdateForm); - // - // CB_MonIndex - // - this.CB_MonIndex.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CB_MonIndex.FormattingEnabled = true; - this.CB_MonIndex.Location = new System.Drawing.Point(88, 29); - this.CB_MonIndex.Name = "CB_MonIndex"; - this.CB_MonIndex.Size = new System.Drawing.Size(121, 21); - this.CB_MonIndex.TabIndex = 16; - this.CB_MonIndex.SelectedValueChanged += new System.EventHandler(this.UpdateForm); - // - // PB_Mon - // - this.PB_Mon.Location = new System.Drawing.Point(6, 29); - this.PB_Mon.Name = "PB_Mon"; - this.PB_Mon.Size = new System.Drawing.Size(64, 64); - this.PB_Mon.TabIndex = 15; - this.PB_Mon.TabStop = false; - // - // GB_Resources - // - this.GB_Resources.Controls.Add(this.NUP_MegaSpeedup); - this.GB_Resources.Controls.Add(this.label21); - this.GB_Resources.Controls.Add(this.NUP_AttackUp); - this.GB_Resources.Controls.Add(this.NUP_DisruptionDelay); - this.GB_Resources.Controls.Add(this.NUP_Complexity); - this.GB_Resources.Controls.Add(this.NUP_MegaStart); - this.GB_Resources.Controls.Add(this.NUP_PlusEXP); - this.GB_Resources.Controls.Add(this.NUP_PlusTime); - this.GB_Resources.Controls.Add(this.NUP_PlusMoves); - this.GB_Resources.Controls.Add(this.label20); - this.GB_Resources.Controls.Add(this.label19); - this.GB_Resources.Controls.Add(this.label18); - this.GB_Resources.Controls.Add(this.label17); - this.GB_Resources.Controls.Add(this.label16); - this.GB_Resources.Controls.Add(this.label15); - this.GB_Resources.Controls.Add(this.label14); - this.GB_Resources.Controls.Add(this.NUP_Jewels); - this.GB_Resources.Controls.Add(this.NUP_Coins); - this.GB_Resources.Controls.Add(this.NUP_Hearts); - this.GB_Resources.Controls.Add(this.label13); - this.GB_Resources.Controls.Add(this.label12); - this.GB_Resources.Controls.Add(this.label11); - this.GB_Resources.Enabled = false; - this.GB_Resources.Location = new System.Drawing.Point(252, 6); - this.GB_Resources.Name = "GB_Resources"; - this.GB_Resources.Size = new System.Drawing.Size(253, 173); - this.GB_Resources.TabIndex = 25; - this.GB_Resources.TabStop = false; - this.GB_Resources.Text = "Resources"; - // - // NUP_MegaSpeedup - // - this.NUP_MegaSpeedup.Location = new System.Drawing.Point(199, 146); - this.NUP_MegaSpeedup.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_MegaSpeedup.Name = "NUP_MegaSpeedup"; - this.NUP_MegaSpeedup.Size = new System.Drawing.Size(43, 20); - this.NUP_MegaSpeedup.TabIndex = 22; - this.NUP_MegaSpeedup.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(117, 149); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(83, 13); - this.label21.TabIndex = 21; - this.label21.Text = "Mega Speedup:"; - // - // NUP_AttackUp - // - this.NUP_AttackUp.Location = new System.Drawing.Point(199, 124); - this.NUP_AttackUp.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_AttackUp.Name = "NUP_AttackUp"; - this.NUP_AttackUp.Size = new System.Drawing.Size(43, 20); - this.NUP_AttackUp.TabIndex = 20; - this.NUP_AttackUp.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_DisruptionDelay - // - this.NUP_DisruptionDelay.Location = new System.Drawing.Point(199, 103); - this.NUP_DisruptionDelay.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_DisruptionDelay.Name = "NUP_DisruptionDelay"; - this.NUP_DisruptionDelay.Size = new System.Drawing.Size(43, 20); - this.NUP_DisruptionDelay.TabIndex = 19; - this.NUP_DisruptionDelay.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_Complexity - // - this.NUP_Complexity.Location = new System.Drawing.Point(199, 81); - this.NUP_Complexity.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_Complexity.Name = "NUP_Complexity"; - this.NUP_Complexity.Size = new System.Drawing.Size(43, 20); - this.NUP_Complexity.TabIndex = 18; - this.NUP_Complexity.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_MegaStart - // - this.NUP_MegaStart.Location = new System.Drawing.Point(66, 147); - this.NUP_MegaStart.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_MegaStart.Name = "NUP_MegaStart"; - this.NUP_MegaStart.Size = new System.Drawing.Size(43, 20); - this.NUP_MegaStart.TabIndex = 17; - this.NUP_MegaStart.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_PlusEXP - // - this.NUP_PlusEXP.Location = new System.Drawing.Point(66, 125); - this.NUP_PlusEXP.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_PlusEXP.Name = "NUP_PlusEXP"; - this.NUP_PlusEXP.Size = new System.Drawing.Size(43, 20); - this.NUP_PlusEXP.TabIndex = 16; - this.NUP_PlusEXP.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_PlusTime - // - this.NUP_PlusTime.Location = new System.Drawing.Point(66, 103); - this.NUP_PlusTime.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_PlusTime.Name = "NUP_PlusTime"; - this.NUP_PlusTime.Size = new System.Drawing.Size(43, 20); - this.NUP_PlusTime.TabIndex = 15; - this.NUP_PlusTime.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_PlusMoves - // - this.NUP_PlusMoves.Location = new System.Drawing.Point(66, 81); - this.NUP_PlusMoves.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_PlusMoves.Name = "NUP_PlusMoves"; - this.NUP_PlusMoves.Size = new System.Drawing.Size(43, 20); - this.NUP_PlusMoves.TabIndex = 14; - this.NUP_PlusMoves.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(143, 127); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(58, 13); - this.label20.TabIndex = 13; - this.label20.Text = "Attack Up:"; - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(114, 105); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(87, 13); - this.label19.TabIndex = 12; - this.label19.Text = "Disruption Delay:"; - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(129, 83); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(72, 13); - this.label18.TabIndex = 11; - this.label18.Text = "Complexity -1:"; - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(4, 149); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(62, 13); - this.label17.TabIndex = 10; - this.label17.Text = "Mega Start:"; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(16, 127); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(50, 13); - this.label16.TabIndex = 9; - this.label16.Text = "Exp *1.5:"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(12, 105); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(54, 13); - this.label15.TabIndex = 8; - this.label15.Text = "Time +10:"; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(9, 83); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(57, 13); - this.label14.TabIndex = 7; - this.label14.Text = "Moves +5:"; - // - // NUP_Jewels - // - this.NUP_Jewels.Location = new System.Drawing.Point(190, 51); - this.NUP_Jewels.Maximum = new decimal(new int[] { - 150, - 0, - 0, - 0}); - this.NUP_Jewels.Name = "NUP_Jewels"; - this.NUP_Jewels.Size = new System.Drawing.Size(52, 20); - this.NUP_Jewels.TabIndex = 6; - this.NUP_Jewels.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_Coins - // - this.NUP_Coins.Location = new System.Drawing.Point(89, 51); - this.NUP_Coins.Maximum = new decimal(new int[] { - 99999, - 0, - 0, - 0}); - this.NUP_Coins.Name = "NUP_Coins"; - this.NUP_Coins.Size = new System.Drawing.Size(67, 20); - this.NUP_Coins.TabIndex = 5; - this.NUP_Coins.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // NUP_Hearts - // - this.NUP_Hearts.Location = new System.Drawing.Point(20, 51); - this.NUP_Hearts.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.NUP_Hearts.Name = "NUP_Hearts"; - this.NUP_Hearts.Size = new System.Drawing.Size(43, 20); - this.NUP_Hearts.TabIndex = 3; - this.NUP_Hearts.ValueChanged += new System.EventHandler(this.UpdateForm); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(196, 33); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(39, 13); - this.label13.TabIndex = 2; - this.label13.Text = "Jewels"; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(106, 32); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(33, 13); - this.label12.TabIndex = 1; - this.label12.Text = "Coins"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(23, 31); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(38, 13); - this.label11.TabIndex = 0; - this.label11.Text = "Hearts"; - // - // B_CheatsForm - // - this.B_CheatsForm.Enabled = false; - this.B_CheatsForm.Location = new System.Drawing.Point(252, 191); - this.B_CheatsForm.Name = "B_CheatsForm"; - this.B_CheatsForm.Size = new System.Drawing.Size(109, 47); - this.B_CheatsForm.TabIndex = 26; - this.B_CheatsForm.Text = "Bulk Edits"; - this.B_CheatsForm.UseVisualStyleBackColor = true; - this.B_CheatsForm.Click += new System.EventHandler(this.B_CheatsForm_Click); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(519, 376); - this.Controls.Add(this.B_CheatsForm); - this.Controls.Add(this.GB_Resources); - this.Controls.Add(this.GB_Caught); - this.Controls.Add(this.GB_HighScore); - this.Controls.Add(this.B_Save); - this.Controls.Add(this.TB_FilePath); - this.Controls.Add(this.B_Open); - this.MaximumSize = new System.Drawing.Size(535, 415); - this.MinimumSize = new System.Drawing.Size(535, 415); - this.Name = "Form1"; - this.Text = "Pokemon Shuffle Save Editor"; - this.GB_HighScore.ResumeLayout(false); - this.GB_HighScore.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_EventScore)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_EventIndex)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertScore)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertIndex)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MainScore)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MainIndex)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Event)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Expert)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Main)).EndInit(); - this.GB_Caught.ResumeLayout(false); - this.GB_Caught.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PB_MegaX)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_MegaY)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Level)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Mon)).EndInit(); - this.GB_Resources.ResumeLayout(false); - this.GB_Resources.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MegaSpeedup)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_AttackUp)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_DisruptionDelay)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Complexity)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_MegaStart)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_PlusEXP)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_PlusTime)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_PlusMoves)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Jewels)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Coins)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUP_Hearts)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button B_Open; - private System.Windows.Forms.TextBox TB_FilePath; - private System.Windows.Forms.Button B_Save; - private System.Windows.Forms.GroupBox GB_HighScore; - private System.Windows.Forms.PictureBox PB_Main; - private System.Windows.Forms.PictureBox PB_Event; - private System.Windows.Forms.PictureBox PB_Expert; - private System.Windows.Forms.GroupBox GB_Caught; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.NumericUpDown NUP_MainIndex; - private System.Windows.Forms.NumericUpDown NUP_MainScore; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.NumericUpDown NUP_EventScore; - private System.Windows.Forms.NumericUpDown NUP_EventIndex; - private System.Windows.Forms.NumericUpDown NUP_ExpertScore; - private System.Windows.Forms.NumericUpDown NUP_ExpertIndex; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.PictureBox PB_Mon; - private System.Windows.Forms.ComboBox CB_MonIndex; - private System.Windows.Forms.CheckBox CHK_CaughtMon; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.NumericUpDown NUP_Level; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.GroupBox GB_Resources; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.NumericUpDown NUP_Hearts; - private System.Windows.Forms.NumericUpDown NUP_Jewels; - private System.Windows.Forms.NumericUpDown NUP_Coins; - private System.Windows.Forms.NumericUpDown NUP_MegaSpeedup; - private System.Windows.Forms.Label label21; - private System.Windows.Forms.NumericUpDown NUP_AttackUp; - private System.Windows.Forms.NumericUpDown NUP_DisruptionDelay; - private System.Windows.Forms.NumericUpDown NUP_Complexity; - private System.Windows.Forms.NumericUpDown NUP_MegaStart; - private System.Windows.Forms.NumericUpDown NUP_PlusEXP; - private System.Windows.Forms.NumericUpDown NUP_PlusTime; - private System.Windows.Forms.NumericUpDown NUP_PlusMoves; - private System.Windows.Forms.Label label20; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.PictureBox PB_MegaX; - private System.Windows.Forms.PictureBox PB_MegaY; - private System.Windows.Forms.CheckBox CHK_MegaX; - private System.Windows.Forms.CheckBox CHK_MegaY; - private System.Windows.Forms.Button B_CheatsForm; - } -} - diff --git a/Pokemon Shuffle Save Editor/Form1.cs b/Pokemon Shuffle Save Editor/Form1.cs deleted file mode 100644 index 7d07472..0000000 --- a/Pokemon Shuffle Save Editor/Form1.cs +++ /dev/null @@ -1,322 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Imaging; -using System.Drawing.Drawing2D; -using System.IO; -using System.Linq; -using System.Windows.Forms; - -namespace Pokemon_Shuffle_Save_Editor -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - string resourcedir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)+Path.DirectorySeparatorChar+"resources"+Path.DirectorySeparatorChar; - if (!Directory.Exists(resourcedir)) - Directory.CreateDirectory(resourcedir); - byte[][] files = { megaStone, mondata, stagesMain, stagesEvent, stagesExpert }; - string[] filenames = { "megaStone.bin","pokemonData.bin","stageData.bin","stageDataEvent.bin","stageDataExtra.bin"}; - for (int i=0;i[BitConverter.ToUInt32(mondata, 0)]; - int[] forms = new int[specieslist.Length]; - HasMega = new bool[specieslist.Length][]; - for (int i = 0; i < specieslist.Length; i++) - HasMega[i] = new bool[2]; - int[] megas = new int[BitConverter.ToUInt32(megaStone, 0)-1]; - for (int i = 0; i < megas.Length; i++) - { - megas[i] = BitConverter.ToUInt16(megaStone, 0x54 + i * 4) & 0x3FF; - } - for (int i = 0; i < mons.Length; i++) - { - int entrylen = BitConverter.ToInt32(mondata,0x4); - byte[] data = mondata.Skip(0x50 + entrylen * i).Take(entrylen).ToArray(); - bool isMega = i > 782 && i < 831; - int spec = isMega - ? specieslist.ToList().IndexOf(monslist[megas[i - 783]]) - : (BitConverter.ToInt32(data, 0xD) >> 3) & 0x7FFF; - mons[i] = new Tuple(spec, forms[spec], isMega); - forms[spec]++; - } - for (int i = 0; i < megas.Length; i++) - { - HasMega[mons[BitConverter.ToUInt16(megaStone, 0x54 + i * 4) & 0x3FF].Item1][(megaStone[0x54 + (i * 4) + 1] >> 3) & 1] = true; - } - List monsel = new List(); - for (int i = 1; i < 780; i++) - { - monsel.Add(new cbItem { Text = monslist[i], Value = i }); - } - monsel = monsel.OrderBy(ncbi => ncbi.Text).ToList(); - CB_MonIndex.DataSource = monsel; - CB_MonIndex.DisplayMember = "Text"; - CB_MonIndex.ValueMember = "Value"; - NUP_ExpertIndex.Minimum = NUP_EventIndex.Minimum = 0; - NUP_MainIndex.Minimum = 1; - NUP_MainIndex.Maximum = BitConverter.ToInt32(stagesMain, 0) - 1; - NUP_ExpertIndex.Maximum = BitConverter.ToInt32(stagesExpert, 0) - 1; - NUP_EventIndex.Maximum = BitConverter.ToInt32(stagesEvent, 0) - 1; - NUP_MainScore.Minimum = NUP_ExpertScore.Minimum = NUP_EventScore.Minimum = 0; - NUP_MainScore.Maximum = NUP_ExpertScore.Maximum = NUP_EventScore.Maximum = 0xFFFFFF; - CHK_MegaY.Visible = CHK_MegaX.Visible = false; - PB_Mon.Image = GetCaughtImage((int)CB_MonIndex.SelectedValue, CHK_CaughtMon.Checked); - NUP_Items = new[] { NUP_PlusMoves, NUP_PlusTime, NUP_PlusEXP, NUP_MegaStart, NUP_Complexity, NUP_DisruptionDelay, NUP_AttackUp }; - } - - Tuple[] mons; - - byte[] mondata = Properties.Resources.pokemonData; - byte[] stagesMain = Properties.Resources.stageData; - byte[] stagesEvent = Properties.Resources.stageDataEvent; - byte[] stagesExpert = Properties.Resources.stageDataExtra; - byte[] megaStone = Properties.Resources.megaStone; - - bool[][] HasMega; // [X][0] = X, [X][1] = Y - - NumericUpDown[] NUP_Items; - - byte[] savedata; - bool loaded; - - private void B_Open_Click(object sender, EventArgs e) - { - TB_FilePath.Text = string.Empty; - B_Save.Enabled = GB_Caught.Enabled = GB_HighScore.Enabled = GB_Resources.Enabled = B_CheatsForm.Enabled = loaded = false; - - OpenFileDialog ofd = new OpenFileDialog {FileName = "savedata.bin"}; - if (ofd.ShowDialog() != DialogResult.OK) return; - if (Path.GetFileName(ofd.FileName) != "savedata.bin") return; - - TB_FilePath.Text = ofd.FileName; - savedata = File.ReadAllBytes(ofd.FileName); - Parse(); - B_Save.Enabled = GB_Caught.Enabled = GB_HighScore.Enabled = GB_Resources.Enabled = B_CheatsForm.Enabled = loaded = true; - UpdateForm(null, null); - } - - - private void B_Save_Click(object sender, EventArgs e) - { - SaveFileDialog sfd = new SaveFileDialog {FileName = TB_FilePath.Text}; - if (sfd.ShowDialog() != DialogResult.OK) return; - - File.WriteAllBytes(sfd.FileName, savedata); - MessageBox.Show("Saved save file to " + sfd.FileName + "."+Environment.NewLine+"Remember to delete secure value before importing."); - } - - private void Parse() - { - UpdateResourceBox(); - UpdateStageBox(); - UpdateOwnedBox(); - } - private bool updating; - - private void UpdateForm(object sender, EventArgs e) - { - if (!loaded || updating) - return; - updating = true; - if (sender != null && !((sender as Control).Name.ToLower().Contains("index"))) - { - int ind = (int)CB_MonIndex.SelectedValue; - int level_ofs = (((ind - 1) * 4) / 8); - int level_shift = ((((ind - 1) * 4) + 1) % 8); - ushort level = BitConverter.ToUInt16(savedata, 0x187+level_ofs); - level = (ushort)((level & (ushort)(~(0xF << level_shift))) | ((int)NUP_Level.Value << level_shift)); - Array.Copy(BitConverter.GetBytes(level), 0, savedata, 0x187 + level_ofs, 2); - int caught_ofs = (((ind - 1) + 6) / 8); - int caught_shift = (((ind - 1) + 6) % 8); - foreach (int caught_array_start in new[] { 0xE6, 0x546, 0x5E6 }) - { - savedata[caught_array_start + caught_ofs] = (byte)(savedata[caught_array_start + caught_ofs] & (byte)(~(1 << caught_shift)) | ((CHK_CaughtMon.Checked ? 1 : 0) << caught_shift)); - } - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt64(savedata, 0x4141 + 3 * ((int)NUP_MainIndex.Value - 1)) & 0xFFFFFFFFF000000FL) | (((ulong)NUP_MainScore.Value << 4))), 0, savedata, 0x4141 + 3 * ((int)NUP_MainIndex.Value - 1), 8); - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt64(savedata, 0x4F51 + 3 * ((int)NUP_ExpertIndex.Value)) & 0xFFFFFFFFF000000FL) | (((ulong)NUP_ExpertScore.Value << 4))), 0, savedata, 0x4F51 + 3 * ((int)NUP_ExpertIndex.Value), 8); - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt64(savedata, 0x52D5 + 3 * ((int)NUP_EventIndex.Value)) & 0xFFFFFFFFF000000FL) | (((ulong)NUP_EventScore.Value << 4))), 0, savedata, 0x52D5 + 3 * ((int)NUP_EventIndex.Value), 8); - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt32(savedata, 0x68) & 0xF0000007) | ((uint)NUP_Coins.Value << 3) | ((uint)NUP_Jewels.Value << 20)), 0, savedata, 0x68, 4); - Array.Copy(BitConverter.GetBytes((BitConverter.ToUInt16(savedata, 0x2D4A) & 0xC07F) | ((ushort)NUP_Hearts.Value << 7)), 0, savedata, 0x2D4A, 2); - for (int i = 0; i < NUP_Items.Length; i++) - { - ushort val = BitConverter.ToUInt16(savedata, 0xd0 + i); - val &= 0x7F; - val |= (ushort)((int)NUP_Items[i].Value << 7); - Array.Copy(BitConverter.GetBytes(val), 0, savedata, 0xd0 + i, 2); - } - savedata[0x2D4C] = (byte)(((((int)NUP_MegaSpeedup.Value) << 1) & 0xFE) | (savedata[0x2D4C] & 1)); // Mega Speedups - int mega_ofs = 0x406 + ((ind + 2) / 4); - ushort mega_val = BitConverter.ToUInt16(savedata, mega_ofs); - mega_val &= (ushort)(~(3 << ((5 + (ind << 1)) % 8))); - ushort new_mega_insert = (ushort)(0 | (CHK_MegaY.Checked ? 1 : 0) | (CHK_MegaX.Checked ? 2 : 0)); - mega_val |= (ushort)(new_mega_insert << ((5 + (ind << 1)) % 8)); - Array.Copy(BitConverter.GetBytes(mega_val), 0, savedata, mega_ofs, 2); - } - UpdateResourceBox(); - UpdateStageBox(); - UpdateOwnedBox(); - updating = false; - } - - private void UpdateResourceBox() - { - NUP_Coins.Value = (BitConverter.ToUInt32(savedata, 0x68) >> 3) & 0x1FFFF; - NUP_Jewels.Value = (BitConverter.ToUInt16(savedata, 0x6A) >> 4) & 0xFF; - NUP_Hearts.Value = (BitConverter.ToUInt16(savedata, 0x2D4A) >> 7) & 0x7F; - for (int i = 0; i < NUP_Items.Length; i++) - { - NUP_Items[i].Value = (BitConverter.ToUInt16(savedata, 0xD0 + i) >> 7) & 0x7F; - } - NUP_MegaSpeedup.Value = (savedata[0x2D4C] >> 1) & 0x7F; - } - - private void UpdateOwnedBox() - { - int ind = (int)CB_MonIndex.SelectedValue; - int level_ofs = 0x187 + (((ind - 1) * 4) / 8); - int level = BitConverter.ToUInt16(savedata, level_ofs); - level >>= ((((ind-1)*4)+1) % 8); - level &= 0xF; - NUP_Level.Value = level; - int caught_ofs = 0x546+(((ind-1)+6)/8); - CHK_CaughtMon.Checked = ((savedata[caught_ofs] >> ((((ind-1)+6) % 8))) & 1) == 1; - PB_Mon.Image = GetCaughtImage(ind, CHK_CaughtMon.Checked); - #region Mega Visibility - CHK_MegaY.Visible = HasMega[mons[ind].Item1][0]; - CHK_MegaX.Visible = HasMega[mons[ind].Item1][1]; - PB_MegaX.Image = HasMega[mons[ind].Item1][1] ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("MegaStone" + mons[ind].Item1.ToString("000") + "_X")) : new Bitmap(16, 16); - PB_MegaY.Image = HasMega[mons[ind].Item1][0] ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("MegaStone" + mons[ind].Item1.ToString("000") + ((HasMega[mons[ind].Item1][0] && HasMega[mons[ind].Item1][1]) ? "_Y" : string.Empty))) : new Bitmap(16, 16); - #endregion - int mega_ofs = 0x406 + ((ind + 2) / 4); - CHK_MegaY.Checked = ((BitConverter.ToUInt16(savedata, mega_ofs) >> ((5 + (ind << 1)) % 8)) & 1) == 1; - CHK_MegaX.Checked = (((BitConverter.ToUInt16(savedata, mega_ofs) >> ((5 + (ind << 1)) % 8)) >> 1) & 1) == 1; - } - - private void UpdateStageBox() - { - int stagelen = BitConverter.ToInt32(stagesMain, 0x4); - int mainspec = BitConverter.ToUInt16(stagesMain, 0x50 + stagelen * ((int)NUP_MainIndex.Value)) & 0x3FF; - int expertspec = BitConverter.ToUInt16(stagesExpert, 0x50 + stagelen * ((int)NUP_ExpertIndex.Value)) & 0x3FF; - int eventspec = BitConverter.ToUInt16(stagesEvent, 0x50 + stagelen * ((int)NUP_EventIndex.Value)) & 0x3FF; - PB_Main.Image = GetStageImage(mons[mainspec].Item1, mons[mainspec].Item2, mons[mainspec].Item3); - PB_Expert.Image = GetStageImage(mons[expertspec].Item1, mons[expertspec].Item2, mons[expertspec].Item3); - PB_Event.Image = GetStageImage((mons[eventspec].Item1 == 25) ? 0 : mons[eventspec].Item1, mons[eventspec].Item2, mons[eventspec].Item3); - NUP_MainScore.Value = (BitConverter.ToUInt64(savedata, 0x4141 + 3 * ((int)NUP_MainIndex.Value - 1)) >> 4) & 0x00FFFFFF; - NUP_ExpertScore.Value = (BitConverter.ToUInt64(savedata, 0x4F51 + 3 * ((int)NUP_ExpertIndex.Value)) >> 4) & 0x00FFFFFF; - NUP_EventScore.Value = (BitConverter.ToUInt64(savedata, 0x52D5 + 3 * ((int)NUP_EventIndex.Value)) >> 4) & 0x00FFFFFF; - } - - private Bitmap GetCaughtImage(int ind, bool caught) - { - Bitmap bmp = GetMonImage(mons[ind].Item1, mons[ind].Item2, mons[ind].Item3); - if (!caught) - { - for (int x = 0; x < bmp.Width; x++) - { - for (int y = 0; y < bmp.Height; y++) - { - Color c = bmp.GetPixel(x, y); - bmp.SetPixel(x, y, Color.FromArgb(c.A, 0, 0, 0)); - } - } - } - return bmp; - } - - private Bitmap GetMonImage(int mon_num, int form = 0, bool mega = false) - { - string imgname = string.Empty; - if (mega) - form--; - if (mega) - imgname += "mega_"; - imgname += "pokemon_" + mon_num.ToString("000"); - if (form > 0 && mon_num > 0) - imgname += "_" + form.ToString("00"); - if (mega) - imgname += "_lo"; - return new Bitmap((Image)Properties.Resources.ResourceManager.GetObject(imgname)); - } - - private Bitmap GetStageImage(int mon_num, int form = 0, bool mega = false) - { - Bitmap bmp = new Bitmap(64, 80); - using (Graphics g = Graphics.FromImage(bmp)) - { - g.DrawImage(Properties.Resources.Plate, new Point(0, 16)); - g.DrawImage(ResizeImage(GetMonImage(mon_num, form, mega), 48, 48), new Point(8, 8)); - } - - return bmp; - } - - public static Bitmap ResizeImage(Image image, int width, int height) - { - var destRect = new Rectangle(0, 0, width, height); - var destImage = new Bitmap(width, height); - - destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); - - using (var graphics = Graphics.FromImage(destImage)) - { - graphics.CompositingMode = CompositingMode.SourceCopy; - graphics.CompositingQuality = CompositingQuality.HighQuality; - graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - - using (var wrapMode = new ImageAttributes()) - { - wrapMode.SetWrapMode(WrapMode.TileFlipXY); - graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode); - } - } - - return destImage; - } - - private void B_CheatsForm_Click(object sender, EventArgs e) - { - (new Cheats(mondata, stagesMain, stagesEvent, stagesExpert, megaStone, HasMega, mons, ref savedata)).ShowDialog(); - updating = true; - Parse(); - updating = false; - } - - } - - public class cbItem - { - public string Text { get; set; } - public object Value { get; set; } - } -} diff --git a/Pokemon Shuffle Save Editor/Main.Designer.cs b/Pokemon Shuffle Save Editor/Main.Designer.cs new file mode 100644 index 0000000..855c972 --- /dev/null +++ b/Pokemon Shuffle Save Editor/Main.Designer.cs @@ -0,0 +1,1025 @@ +namespace Pokemon_Shuffle_Save_Editor +{ + partial class Main + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + Pokemon_Shuffle_Save_Editor.ShuffleItems shuffleItems1 = new Pokemon_Shuffle_Save_Editor.ShuffleItems(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main)); + this.B_Open = new System.Windows.Forms.Button(); + this.TB_FilePath = new System.Windows.Forms.TextBox(); + this.B_Save = new System.Windows.Forms.Button(); + this.GB_HighScore = new System.Windows.Forms.GroupBox(); + this.PB_override = new System.Windows.Forms.PictureBox(); + this.L_RankEv = new System.Windows.Forms.Label(); + this.L_RankEx = new System.Windows.Forms.Label(); + this.L_RankM = new System.Windows.Forms.Label(); + this.L_ScoreEv = new System.Windows.Forms.Label(); + this.L_ScoreEx = new System.Windows.Forms.Label(); + this.L_ScoreM = new System.Windows.Forms.Label(); + this.L_Event = new System.Windows.Forms.Label(); + this.L_Expert = new System.Windows.Forms.Label(); + this.L_Main = new System.Windows.Forms.Label(); + this.L_IndexEv = new System.Windows.Forms.Label(); + this.L_IndexEx = new System.Windows.Forms.Label(); + this.NUP_EventScore = new System.Windows.Forms.NumericUpDown(); + this.NUP_EventIndex = new System.Windows.Forms.NumericUpDown(); + this.NUP_ExpertScore = new System.Windows.Forms.NumericUpDown(); + this.NUP_ExpertIndex = new System.Windows.Forms.NumericUpDown(); + this.NUP_MainScore = new System.Windows.Forms.NumericUpDown(); + this.NUP_MainIndex = new System.Windows.Forms.NumericUpDown(); + this.L_IndexM = new System.Windows.Forms.Label(); + this.PB_Event = new System.Windows.Forms.PictureBox(); + this.PB_Expert = new System.Windows.Forms.PictureBox(); + this.PB_Main = new System.Windows.Forms.PictureBox(); + this.GB_Caught = new System.Windows.Forms.GroupBox(); + this.CHK_CurrentSkill = new System.Windows.Forms.CheckBox(); + this.CB_Skill = new System.Windows.Forms.ComboBox(); + this.L_Skill = new System.Windows.Forms.Label(); + this.PB_Skill = new System.Windows.Forms.PictureBox(); + this.NUP_SkillLvl = new System.Windows.Forms.NumericUpDown(); + this.PB_Lollipop = new System.Windows.Forms.PictureBox(); + this.NUP_Lollipop = new System.Windows.Forms.NumericUpDown(); + this.L_Level = new System.Windows.Forms.Label(); + this.PB_SpeedUpY = new System.Windows.Forms.PictureBox(); + this.PB_SpeedUpX = new System.Windows.Forms.PictureBox(); + this.NUP_SpeedUpY = new System.Windows.Forms.NumericUpDown(); + this.NUP_SpeedUpX = new System.Windows.Forms.NumericUpDown(); + this.PB_MegaX = new System.Windows.Forms.PictureBox(); + this.PB_MegaY = new System.Windows.Forms.PictureBox(); + this.CHK_MegaX = new System.Windows.Forms.CheckBox(); + this.CHK_MegaY = new System.Windows.Forms.CheckBox(); + this.NUP_Level = new System.Windows.Forms.NumericUpDown(); + this.CHK_CaughtMon = new System.Windows.Forms.CheckBox(); + this.CB_MonIndex = new System.Windows.Forms.ComboBox(); + this.PB_Mon = new System.Windows.Forms.PictureBox(); + this.GB_Resources = new System.Windows.Forms.GroupBox(); + this.NUP_Jewels = new System.Windows.Forms.NumericUpDown(); + this.NUP_Coins = new System.Windows.Forms.NumericUpDown(); + this.NUP_Hearts = new System.Windows.Forms.NumericUpDown(); + this.L_Jewels = new System.Windows.Forms.Label(); + this.L_Coins = new System.Windows.Forms.Label(); + this.L_Hearts = new System.Windows.Forms.Label(); + this.B_CheatsForm = new System.Windows.Forms.Button(); + this.PB_Team1 = new System.Windows.Forms.PictureBox(); + this.PB_Team2 = new System.Windows.Forms.PictureBox(); + this.PB_Team3 = new System.Windows.Forms.PictureBox(); + this.PB_Team4 = new System.Windows.Forms.PictureBox(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.ItemsGrid = new Pokemon_Shuffle_Save_Editor.TabbedPropertyGrid(); + this.GB_HighScore.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_override)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_EventScore)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_EventIndex)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertScore)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertIndex)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_MainScore)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_MainIndex)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Event)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Expert)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Main)).BeginInit(); + this.GB_Caught.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Skill)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_SkillLvl)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Lollipop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Lollipop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_SpeedUpY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_SpeedUpX)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_SpeedUpY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_SpeedUpX)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_MegaX)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_MegaY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Level)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Mon)).BeginInit(); + this.GB_Resources.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Jewels)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Coins)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Hearts)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team4)).BeginInit(); + this.SuspendLayout(); + // + // B_Open + // + this.B_Open.Location = new System.Drawing.Point(12, 38); + this.B_Open.Name = "B_Open"; + this.B_Open.Size = new System.Drawing.Size(228, 32); + this.B_Open.TabIndex = 1; + this.B_Open.Text = "Open savedata.bin"; + this.B_Open.UseVisualStyleBackColor = true; + this.B_Open.Click += new System.EventHandler(this.B_Open_Click); + // + // TB_FilePath + // + this.TB_FilePath.Location = new System.Drawing.Point(12, 12); + this.TB_FilePath.Name = "TB_FilePath"; + this.TB_FilePath.ReadOnly = true; + this.TB_FilePath.Size = new System.Drawing.Size(228, 20); + this.TB_FilePath.TabIndex = 0; + this.TB_FilePath.TabStop = false; + this.TB_FilePath.DoubleClick += new System.EventHandler(this.TB_Filepath_DoubleClick); + // + // B_Save + // + this.B_Save.Enabled = false; + this.B_Save.Location = new System.Drawing.Point(12, 76); + this.B_Save.Name = "B_Save"; + this.B_Save.Size = new System.Drawing.Size(228, 32); + this.B_Save.TabIndex = 2; + this.B_Save.Text = "Save savedata.bin"; + this.B_Save.UseVisualStyleBackColor = true; + this.B_Save.Click += new System.EventHandler(this.B_Save_Click); + // + // GB_HighScore + // + this.GB_HighScore.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.GB_HighScore.Controls.Add(this.PB_override); + this.GB_HighScore.Controls.Add(this.L_RankEv); + this.GB_HighScore.Controls.Add(this.L_RankEx); + this.GB_HighScore.Controls.Add(this.L_RankM); + this.GB_HighScore.Controls.Add(this.L_ScoreEv); + this.GB_HighScore.Controls.Add(this.L_ScoreEx); + this.GB_HighScore.Controls.Add(this.L_ScoreM); + this.GB_HighScore.Controls.Add(this.L_Event); + this.GB_HighScore.Controls.Add(this.L_Expert); + this.GB_HighScore.Controls.Add(this.L_Main); + this.GB_HighScore.Controls.Add(this.L_IndexEv); + this.GB_HighScore.Controls.Add(this.L_IndexEx); + this.GB_HighScore.Controls.Add(this.NUP_EventScore); + this.GB_HighScore.Controls.Add(this.NUP_EventIndex); + this.GB_HighScore.Controls.Add(this.NUP_ExpertScore); + this.GB_HighScore.Controls.Add(this.NUP_ExpertIndex); + this.GB_HighScore.Controls.Add(this.NUP_MainScore); + this.GB_HighScore.Controls.Add(this.NUP_MainIndex); + this.GB_HighScore.Controls.Add(this.L_IndexM); + this.GB_HighScore.Controls.Add(this.PB_Event); + this.GB_HighScore.Controls.Add(this.PB_Expert); + this.GB_HighScore.Controls.Add(this.PB_Main); + this.GB_HighScore.Enabled = false; + this.GB_HighScore.Location = new System.Drawing.Point(12, 447); + this.GB_HighScore.Name = "GB_HighScore"; + this.GB_HighScore.Size = new System.Drawing.Size(493, 118); + this.GB_HighScore.TabIndex = 6; + this.GB_HighScore.TabStop = false; + this.GB_HighScore.Text = "High-Scores"; + // + // PB_override + // + this.PB_override.Location = new System.Drawing.Point(6, 17); + this.PB_override.Name = "PB_override"; + this.PB_override.Size = new System.Drawing.Size(16, 16); + this.PB_override.TabIndex = 69; + this.PB_override.TabStop = false; + this.PB_override.Click += new System.EventHandler(this.PB_Override_Click); + // + // L_RankEv + // + this.L_RankEv.AutoSize = true; + this.L_RankEv.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.L_RankEv.ForeColor = System.Drawing.SystemColors.ControlText; + this.L_RankEv.Location = new System.Drawing.Point(464, 76); + this.L_RankEv.Name = "L_RankEv"; + this.L_RankEv.Size = new System.Drawing.Size(10, 13); + this.L_RankEv.TabIndex = 20; + this.L_RankEv.Text = "-"; + this.L_RankEv.TextAlign = System.Drawing.ContentAlignment.BottomRight; + // + // L_RankEx + // + this.L_RankEx.AutoSize = true; + this.L_RankEx.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.L_RankEx.Location = new System.Drawing.Point(307, 76); + this.L_RankEx.Name = "L_RankEx"; + this.L_RankEx.Size = new System.Drawing.Size(10, 13); + this.L_RankEx.TabIndex = 19; + this.L_RankEx.Text = "-"; + this.L_RankEx.TextAlign = System.Drawing.ContentAlignment.BottomRight; + // + // L_RankM + // + this.L_RankM.AutoSize = true; + this.L_RankM.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.L_RankM.Location = new System.Drawing.Point(148, 76); + this.L_RankM.Name = "L_RankM"; + this.L_RankM.Size = new System.Drawing.Size(10, 13); + this.L_RankM.TabIndex = 18; + this.L_RankM.Text = "-"; + this.L_RankM.TextAlign = System.Drawing.ContentAlignment.BottomRight; + // + // L_ScoreEv + // + this.L_ScoreEv.AutoSize = true; + this.L_ScoreEv.Location = new System.Drawing.Point(394, 76); + this.L_ScoreEv.Name = "L_ScoreEv"; + this.L_ScoreEv.Size = new System.Drawing.Size(38, 13); + this.L_ScoreEv.TabIndex = 17; + this.L_ScoreEv.Text = "Score:"; + // + // L_ScoreEx + // + this.L_ScoreEx.AutoSize = true; + this.L_ScoreEx.Location = new System.Drawing.Point(234, 76); + this.L_ScoreEx.Name = "L_ScoreEx"; + this.L_ScoreEx.Size = new System.Drawing.Size(38, 13); + this.L_ScoreEx.TabIndex = 16; + this.L_ScoreEx.Text = "Score:"; + // + // L_ScoreM + // + this.L_ScoreM.AutoSize = true; + this.L_ScoreM.Location = new System.Drawing.Point(76, 76); + this.L_ScoreM.Name = "L_ScoreM"; + this.L_ScoreM.Size = new System.Drawing.Size(38, 13); + this.L_ScoreM.TabIndex = 15; + this.L_ScoreM.Text = "Score:"; + // + // L_Event + // + this.L_Event.AutoSize = true; + this.L_Event.Location = new System.Drawing.Point(401, 19); + this.L_Event.Name = "L_Event"; + this.L_Event.Size = new System.Drawing.Size(71, 13); + this.L_Event.TabIndex = 14; + this.L_Event.Text = "Event Stages"; + // + // L_Expert + // + this.L_Expert.AutoSize = true; + this.L_Expert.Location = new System.Drawing.Point(237, 19); + this.L_Expert.Name = "L_Expert"; + this.L_Expert.Size = new System.Drawing.Size(73, 13); + this.L_Expert.TabIndex = 13; + this.L_Expert.Text = "Expert Stages"; + // + // L_Main + // + this.L_Main.AutoSize = true; + this.L_Main.Location = new System.Drawing.Point(85, 19); + this.L_Main.Name = "L_Main"; + this.L_Main.Size = new System.Drawing.Size(66, 13); + this.L_Main.TabIndex = 12; + this.L_Main.Text = "Main Stages"; + // + // L_IndexEv + // + this.L_IndexEv.AutoSize = true; + this.L_IndexEv.Location = new System.Drawing.Point(393, 45); + this.L_IndexEv.Name = "L_IndexEv"; + this.L_IndexEv.Size = new System.Drawing.Size(36, 13); + this.L_IndexEv.TabIndex = 11; + this.L_IndexEv.Text = "Index:"; + // + // L_IndexEx + // + this.L_IndexEx.AutoSize = true; + this.L_IndexEx.Location = new System.Drawing.Point(234, 45); + this.L_IndexEx.Name = "L_IndexEx"; + this.L_IndexEx.Size = new System.Drawing.Size(36, 13); + this.L_IndexEx.TabIndex = 10; + this.L_IndexEx.Text = "Index:"; + // + // NUP_EventScore + // + this.NUP_EventScore.Location = new System.Drawing.Point(397, 92); + this.NUP_EventScore.Maximum = new decimal(new int[] { + 16777215, + 0, + 0, + 0}); + this.NUP_EventScore.Name = "NUP_EventScore"; + this.NUP_EventScore.Size = new System.Drawing.Size(77, 20); + this.NUP_EventScore.TabIndex = 65; + this.NUP_EventScore.ThousandsSeparator = true; + this.NUP_EventScore.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_EventIndex + // + this.NUP_EventIndex.Location = new System.Drawing.Point(435, 43); + this.NUP_EventIndex.Name = "NUP_EventIndex"; + this.NUP_EventIndex.Size = new System.Drawing.Size(39, 20); + this.NUP_EventIndex.TabIndex = 64; + this.NUP_EventIndex.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_ExpertScore + // + this.NUP_ExpertScore.Location = new System.Drawing.Point(240, 92); + this.NUP_ExpertScore.Maximum = new decimal(new int[] { + 16777215, + 0, + 0, + 0}); + this.NUP_ExpertScore.Name = "NUP_ExpertScore"; + this.NUP_ExpertScore.Size = new System.Drawing.Size(77, 20); + this.NUP_ExpertScore.TabIndex = 63; + this.NUP_ExpertScore.ThousandsSeparator = true; + this.NUP_ExpertScore.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_ExpertIndex + // + this.NUP_ExpertIndex.Location = new System.Drawing.Point(278, 43); + this.NUP_ExpertIndex.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_ExpertIndex.Name = "NUP_ExpertIndex"; + this.NUP_ExpertIndex.Size = new System.Drawing.Size(39, 20); + this.NUP_ExpertIndex.TabIndex = 62; + this.NUP_ExpertIndex.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_ExpertIndex.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_MainScore + // + this.NUP_MainScore.Location = new System.Drawing.Point(81, 92); + this.NUP_MainScore.Maximum = new decimal(new int[] { + 16777215, + 0, + 0, + 0}); + this.NUP_MainScore.Name = "NUP_MainScore"; + this.NUP_MainScore.Size = new System.Drawing.Size(77, 20); + this.NUP_MainScore.TabIndex = 61; + this.NUP_MainScore.ThousandsSeparator = true; + this.NUP_MainScore.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_MainIndex + // + this.NUP_MainIndex.Location = new System.Drawing.Point(119, 43); + this.NUP_MainIndex.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_MainIndex.Name = "NUP_MainIndex"; + this.NUP_MainIndex.Size = new System.Drawing.Size(39, 20); + this.NUP_MainIndex.TabIndex = 60; + this.NUP_MainIndex.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_MainIndex.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // L_IndexM + // + this.L_IndexM.AutoSize = true; + this.L_IndexM.Location = new System.Drawing.Point(76, 45); + this.L_IndexM.Name = "L_IndexM"; + this.L_IndexM.Size = new System.Drawing.Size(36, 13); + this.L_IndexM.TabIndex = 3; + this.L_IndexM.Text = "Index:"; + // + // PB_Event + // + this.PB_Event.Location = new System.Drawing.Point(323, 32); + this.PB_Event.Name = "PB_Event"; + this.PB_Event.Size = new System.Drawing.Size(64, 80); + this.PB_Event.TabIndex = 2; + this.PB_Event.TabStop = false; + this.PB_Event.Click += new System.EventHandler(this.PB_Stage_Click); + // + // PB_Expert + // + this.PB_Expert.Location = new System.Drawing.Point(164, 32); + this.PB_Expert.Name = "PB_Expert"; + this.PB_Expert.Size = new System.Drawing.Size(64, 80); + this.PB_Expert.TabIndex = 1; + this.PB_Expert.TabStop = false; + this.PB_Expert.Click += new System.EventHandler(this.PB_Stage_Click); + // + // PB_Main + // + this.PB_Main.Location = new System.Drawing.Point(6, 32); + this.PB_Main.Name = "PB_Main"; + this.PB_Main.Size = new System.Drawing.Size(64, 80); + this.PB_Main.TabIndex = 0; + this.PB_Main.TabStop = false; + this.PB_Main.Click += new System.EventHandler(this.PB_Stage_Click); + // + // GB_Caught + // + this.GB_Caught.Controls.Add(this.CB_Skill); + this.GB_Caught.Controls.Add(this.L_Skill); + this.GB_Caught.Controls.Add(this.PB_Skill); + this.GB_Caught.Controls.Add(this.NUP_SkillLvl); + this.GB_Caught.Controls.Add(this.PB_Lollipop); + this.GB_Caught.Controls.Add(this.NUP_Lollipop); + this.GB_Caught.Controls.Add(this.L_Level); + this.GB_Caught.Controls.Add(this.PB_SpeedUpY); + this.GB_Caught.Controls.Add(this.PB_SpeedUpX); + this.GB_Caught.Controls.Add(this.NUP_SpeedUpY); + this.GB_Caught.Controls.Add(this.NUP_SpeedUpX); + this.GB_Caught.Controls.Add(this.PB_MegaX); + this.GB_Caught.Controls.Add(this.PB_MegaY); + this.GB_Caught.Controls.Add(this.CHK_MegaX); + this.GB_Caught.Controls.Add(this.CHK_MegaY); + this.GB_Caught.Controls.Add(this.NUP_Level); + this.GB_Caught.Controls.Add(this.CHK_CaughtMon); + this.GB_Caught.Controls.Add(this.CB_MonIndex); + this.GB_Caught.Controls.Add(this.PB_Mon); + this.GB_Caught.Controls.Add(this.CHK_CurrentSkill); + this.GB_Caught.Enabled = false; + this.GB_Caught.Location = new System.Drawing.Point(12, 168); + this.GB_Caught.Name = "GB_Caught"; + this.GB_Caught.Size = new System.Drawing.Size(228, 220); + this.GB_Caught.TabIndex = 3; + this.GB_Caught.TabStop = false; + this.GB_Caught.Text = "Owned Pokemon"; + // + // CHK_CurrentSkill + // + this.CHK_CurrentSkill.AutoSize = true; + this.CHK_CurrentSkill.Cursor = System.Windows.Forms.Cursors.Default; + this.CHK_CurrentSkill.Location = new System.Drawing.Point(6, 182); + this.CHK_CurrentSkill.Name = "CHK_CurrentSkill"; + this.CHK_CurrentSkill.Size = new System.Drawing.Size(60, 17); + this.CHK_CurrentSkill.TabIndex = 35; + this.CHK_CurrentSkill.Text = "Current"; + this.CHK_CurrentSkill.UseVisualStyleBackColor = true; + this.CHK_CurrentSkill.Visible = false; + this.CHK_CurrentSkill.CheckedChanged += new System.EventHandler(this.UpdateForm); + // + // CB_Skill + // + this.CB_Skill.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_Skill.FormattingEnabled = true; + this.CB_Skill.Location = new System.Drawing.Point(6, 151); + this.CB_Skill.Name = "CB_Skill"; + this.CB_Skill.Size = new System.Drawing.Size(121, 21); + this.CB_Skill.TabIndex = 34; + this.toolTip1.SetToolTip(this.CB_Skill, "Default text"); + this.CB_Skill.Visible = false; + this.CB_Skill.SelectedValueChanged += new System.EventHandler(this.UpdateForm); + // + // L_Skill + // + this.L_Skill.AutoSize = true; + this.L_Skill.Location = new System.Drawing.Point(6, 135); + this.L_Skill.Name = "L_Skill"; + this.L_Skill.Size = new System.Drawing.Size(32, 13); + this.L_Skill.TabIndex = 71; + this.L_Skill.Text = "Skill :"; + this.L_Skill.Visible = false; + // + // PB_Skill + // + this.PB_Skill.Location = new System.Drawing.Point(64, 179); + this.PB_Skill.Name = "PB_Skill"; + this.PB_Skill.Size = new System.Drawing.Size(24, 24); + this.PB_Skill.TabIndex = 70; + this.PB_Skill.TabStop = false; + this.PB_Skill.Visible = false; + this.PB_Skill.Click += new System.EventHandler(this.PB_Owned_Click); + // + // NUP_SkillLvl + // + this.NUP_SkillLvl.Location = new System.Drawing.Point(94, 181); + this.NUP_SkillLvl.Maximum = new decimal(new int[] { + 5, + 0, + 0, + 0}); + this.NUP_SkillLvl.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_SkillLvl.Name = "NUP_SkillLvl"; + this.NUP_SkillLvl.Size = new System.Drawing.Size(30, 20); + this.NUP_SkillLvl.TabIndex = 36; + this.NUP_SkillLvl.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_SkillLvl.Visible = false; + this.NUP_SkillLvl.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // PB_Lollipop + // + this.PB_Lollipop.Location = new System.Drawing.Point(64, 110); + this.PB_Lollipop.Name = "PB_Lollipop"; + this.PB_Lollipop.Size = new System.Drawing.Size(24, 24); + this.PB_Lollipop.TabIndex = 68; + this.PB_Lollipop.TabStop = false; + this.PB_Lollipop.Visible = false; + this.PB_Lollipop.Click += new System.EventHandler(this.PB_Owned_Click); + // + // NUP_Lollipop + // + this.NUP_Lollipop.Location = new System.Drawing.Point(94, 112); + this.NUP_Lollipop.Maximum = new decimal(new int[] { + 5, + 0, + 0, + 0}); + this.NUP_Lollipop.Name = "NUP_Lollipop"; + this.NUP_Lollipop.Size = new System.Drawing.Size(30, 20); + this.NUP_Lollipop.TabIndex = 33; + this.NUP_Lollipop.Visible = false; + this.NUP_Lollipop.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // L_Level + // + this.L_Level.AutoSize = true; + this.L_Level.Location = new System.Drawing.Point(6, 96); + this.L_Level.Name = "L_Level"; + this.L_Level.Size = new System.Drawing.Size(36, 13); + this.L_Level.TabIndex = 32; + this.L_Level.Text = "Level:"; + this.L_Level.Visible = false; + // + // PB_SpeedUpY + // + this.PB_SpeedUpY.Location = new System.Drawing.Point(198, 133); + this.PB_SpeedUpY.Name = "PB_SpeedUpY"; + this.PB_SpeedUpY.Size = new System.Drawing.Size(24, 24); + this.PB_SpeedUpY.TabIndex = 27; + this.PB_SpeedUpY.TabStop = false; + this.PB_SpeedUpY.Visible = false; + this.PB_SpeedUpY.Click += new System.EventHandler(this.PB_Owned_Click); + // + // PB_SpeedUpX + // + this.PB_SpeedUpX.Location = new System.Drawing.Point(198, 85); + this.PB_SpeedUpX.Name = "PB_SpeedUpX"; + this.PB_SpeedUpX.Size = new System.Drawing.Size(24, 24); + this.PB_SpeedUpX.TabIndex = 26; + this.PB_SpeedUpX.TabStop = false; + this.PB_SpeedUpX.Visible = false; + this.PB_SpeedUpX.Click += new System.EventHandler(this.PB_Owned_Click); + // + // NUP_SpeedUpY + // + this.NUP_SpeedUpY.Location = new System.Drawing.Point(160, 135); + this.NUP_SpeedUpY.Maximum = new decimal(new int[] { + 127, + 0, + 0, + 0}); + this.NUP_SpeedUpY.Name = "NUP_SpeedUpY"; + this.NUP_SpeedUpY.Size = new System.Drawing.Size(37, 20); + this.NUP_SpeedUpY.TabIndex = 40; + this.NUP_SpeedUpY.Visible = false; + this.NUP_SpeedUpY.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_SpeedUpX + // + this.NUP_SpeedUpX.Location = new System.Drawing.Point(160, 87); + this.NUP_SpeedUpX.Maximum = new decimal(new int[] { + 127, + 0, + 0, + 0}); + this.NUP_SpeedUpX.Name = "NUP_SpeedUpX"; + this.NUP_SpeedUpX.Size = new System.Drawing.Size(37, 20); + this.NUP_SpeedUpX.TabIndex = 38; + this.NUP_SpeedUpX.Visible = false; + this.NUP_SpeedUpX.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // PB_MegaX + // + this.PB_MegaX.Location = new System.Drawing.Point(160, 65); + this.PB_MegaX.Name = "PB_MegaX"; + this.PB_MegaX.Size = new System.Drawing.Size(16, 16); + this.PB_MegaX.TabIndex = 23; + this.PB_MegaX.TabStop = false; + this.PB_MegaX.Visible = false; + // + // PB_MegaY + // + this.PB_MegaY.Location = new System.Drawing.Point(160, 113); + this.PB_MegaY.Name = "PB_MegaY"; + this.PB_MegaY.Size = new System.Drawing.Size(16, 16); + this.PB_MegaY.TabIndex = 22; + this.PB_MegaY.TabStop = false; + this.PB_MegaY.Visible = false; + // + // CHK_MegaX + // + this.CHK_MegaX.AutoSize = true; + this.CHK_MegaX.Location = new System.Drawing.Point(182, 67); + this.CHK_MegaX.Name = "CHK_MegaX"; + this.CHK_MegaX.Size = new System.Drawing.Size(15, 14); + this.CHK_MegaX.TabIndex = 37; + this.CHK_MegaX.UseVisualStyleBackColor = true; + this.CHK_MegaX.Visible = false; + this.CHK_MegaX.CheckedChanged += new System.EventHandler(this.UpdateForm); + // + // CHK_MegaY + // + this.CHK_MegaY.AutoSize = true; + this.CHK_MegaY.Cursor = System.Windows.Forms.Cursors.Default; + this.CHK_MegaY.Location = new System.Drawing.Point(182, 115); + this.CHK_MegaY.Name = "CHK_MegaY"; + this.CHK_MegaY.Size = new System.Drawing.Size(15, 14); + this.CHK_MegaY.TabIndex = 39; + this.CHK_MegaY.UseVisualStyleBackColor = true; + this.CHK_MegaY.Visible = false; + this.CHK_MegaY.CheckedChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_Level + // + this.NUP_Level.Location = new System.Drawing.Point(6, 112); + this.NUP_Level.Maximum = new decimal(new int[] { + 15, + 0, + 0, + 0}); + this.NUP_Level.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Level.Name = "NUP_Level"; + this.NUP_Level.Size = new System.Drawing.Size(52, 20); + this.NUP_Level.TabIndex = 32; + this.NUP_Level.Value = new decimal(new int[] { + 15, + 0, + 0, + 0}); + this.NUP_Level.Visible = false; + this.NUP_Level.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // CHK_CaughtMon + // + this.CHK_CaughtMon.AutoSize = true; + this.CHK_CaughtMon.Location = new System.Drawing.Point(88, 56); + this.CHK_CaughtMon.Name = "CHK_CaughtMon"; + this.CHK_CaughtMon.Size = new System.Drawing.Size(60, 17); + this.CHK_CaughtMon.TabIndex = 31; + this.CHK_CaughtMon.Text = "Caught"; + this.CHK_CaughtMon.UseVisualStyleBackColor = true; + this.CHK_CaughtMon.CheckedChanged += new System.EventHandler(this.UpdateForm); + // + // CB_MonIndex + // + this.CB_MonIndex.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CB_MonIndex.FormattingEnabled = true; + this.CB_MonIndex.Location = new System.Drawing.Point(88, 29); + this.CB_MonIndex.Name = "CB_MonIndex"; + this.CB_MonIndex.Size = new System.Drawing.Size(121, 21); + this.CB_MonIndex.TabIndex = 30; + this.CB_MonIndex.SelectedValueChanged += new System.EventHandler(this.UpdateForm); + // + // PB_Mon + // + this.PB_Mon.Location = new System.Drawing.Point(6, 29); + this.PB_Mon.Name = "PB_Mon"; + this.PB_Mon.Size = new System.Drawing.Size(64, 64); + this.PB_Mon.TabIndex = 15; + this.PB_Mon.TabStop = false; + this.PB_Mon.Click += new System.EventHandler(this.PB_Owned_Click); + // + // GB_Resources + // + this.GB_Resources.Controls.Add(this.ItemsGrid); + this.GB_Resources.Controls.Add(this.NUP_Jewels); + this.GB_Resources.Controls.Add(this.NUP_Coins); + this.GB_Resources.Controls.Add(this.NUP_Hearts); + this.GB_Resources.Controls.Add(this.L_Jewels); + this.GB_Resources.Controls.Add(this.L_Coins); + this.GB_Resources.Controls.Add(this.L_Hearts); + this.GB_Resources.Enabled = false; + this.GB_Resources.Location = new System.Drawing.Point(252, 6); + this.GB_Resources.Name = "GB_Resources"; + this.GB_Resources.Size = new System.Drawing.Size(253, 439); + this.GB_Resources.TabIndex = 5; + this.GB_Resources.TabStop = false; + this.GB_Resources.Text = "Resources"; + // + // NUP_Jewels + // + this.NUP_Jewels.Location = new System.Drawing.Point(187, 39); + this.NUP_Jewels.Maximum = new decimal(new int[] { + 150, + 0, + 0, + 0}); + this.NUP_Jewels.Name = "NUP_Jewels"; + this.NUP_Jewels.Size = new System.Drawing.Size(52, 20); + this.NUP_Jewels.TabIndex = 53; + this.NUP_Jewels.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_Coins + // + this.NUP_Coins.Location = new System.Drawing.Point(86, 39); + this.NUP_Coins.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.NUP_Coins.Name = "NUP_Coins"; + this.NUP_Coins.Size = new System.Drawing.Size(67, 20); + this.NUP_Coins.TabIndex = 52; + this.NUP_Coins.ThousandsSeparator = true; + this.NUP_Coins.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // NUP_Hearts + // + this.NUP_Hearts.Location = new System.Drawing.Point(17, 39); + this.NUP_Hearts.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.NUP_Hearts.Name = "NUP_Hearts"; + this.NUP_Hearts.Size = new System.Drawing.Size(43, 20); + this.NUP_Hearts.TabIndex = 51; + this.NUP_Hearts.ValueChanged += new System.EventHandler(this.UpdateForm); + // + // L_Jewels + // + this.L_Jewels.AutoSize = true; + this.L_Jewels.Location = new System.Drawing.Point(193, 21); + this.L_Jewels.Name = "L_Jewels"; + this.L_Jewels.Size = new System.Drawing.Size(39, 13); + this.L_Jewels.TabIndex = 2; + this.L_Jewels.Text = "Jewels"; + // + // L_Coins + // + this.L_Coins.AutoSize = true; + this.L_Coins.Location = new System.Drawing.Point(103, 20); + this.L_Coins.Name = "L_Coins"; + this.L_Coins.Size = new System.Drawing.Size(33, 13); + this.L_Coins.TabIndex = 1; + this.L_Coins.Text = "Coins"; + // + // L_Hearts + // + this.L_Hearts.AutoSize = true; + this.L_Hearts.Location = new System.Drawing.Point(20, 19); + this.L_Hearts.Name = "L_Hearts"; + this.L_Hearts.Size = new System.Drawing.Size(38, 13); + this.L_Hearts.TabIndex = 0; + this.L_Hearts.Text = "Hearts"; + // + // B_CheatsForm + // + this.B_CheatsForm.Enabled = false; + this.B_CheatsForm.Location = new System.Drawing.Point(12, 394); + this.B_CheatsForm.Name = "B_CheatsForm"; + this.B_CheatsForm.Size = new System.Drawing.Size(121, 47); + this.B_CheatsForm.TabIndex = 4; + this.B_CheatsForm.Text = "Bulk Edits"; + this.B_CheatsForm.UseVisualStyleBackColor = true; + this.B_CheatsForm.Click += new System.EventHandler(this.B_CheatsForm_Click); + // + // PB_Team1 + // + this.PB_Team1.Location = new System.Drawing.Point(12, 114); + this.PB_Team1.Name = "PB_Team1"; + this.PB_Team1.Size = new System.Drawing.Size(48, 48); + this.PB_Team1.TabIndex = 28; + this.PB_Team1.TabStop = false; + this.PB_Team1.Click += new System.EventHandler(this.PB_Team_Click); + // + // PB_Team2 + // + this.PB_Team2.Location = new System.Drawing.Point(72, 114); + this.PB_Team2.Name = "PB_Team2"; + this.PB_Team2.Size = new System.Drawing.Size(48, 48); + this.PB_Team2.TabIndex = 29; + this.PB_Team2.TabStop = false; + this.PB_Team2.Click += new System.EventHandler(this.PB_Team_Click); + // + // PB_Team3 + // + this.PB_Team3.Location = new System.Drawing.Point(132, 114); + this.PB_Team3.Name = "PB_Team3"; + this.PB_Team3.Size = new System.Drawing.Size(48, 48); + this.PB_Team3.TabIndex = 30; + this.PB_Team3.TabStop = false; + this.PB_Team3.Click += new System.EventHandler(this.PB_Team_Click); + // + // PB_Team4 + // + this.PB_Team4.Location = new System.Drawing.Point(192, 114); + this.PB_Team4.Name = "PB_Team4"; + this.PB_Team4.Size = new System.Drawing.Size(48, 48); + this.PB_Team4.TabIndex = 31; + this.PB_Team4.TabStop = false; + this.PB_Team4.Click += new System.EventHandler(this.PB_Team_Click); + // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 10000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.IsBalloon = true; + this.toolTip1.ReshowDelay = 100; + this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; + this.toolTip1.ToolTipTitle = "Skill description"; + // + // ItemsGrid + // + this.ItemsGrid.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.ItemsGrid.Location = new System.Drawing.Point(6, 65); + this.ItemsGrid.Name = "ItemsGrid"; + shuffleItems1.AttackUp = 0; + shuffleItems1.Complexity = 0; + shuffleItems1.Disruption = 0; + shuffleItems1.Enchantments = new int[] { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0}; + shuffleItems1.Experience = 0; + shuffleItems1.ExperienceBoostL = 0; + shuffleItems1.ExperienceBoostM = 0; + shuffleItems1.ExperienceBoostS = 0; + shuffleItems1.Items = new int[] { + 0, + 0, + 0, + 0, + 0, + 0, + 0}; + shuffleItems1.LevelUp = 0; + shuffleItems1.MegaSpeedup = 0; + shuffleItems1.MegaStart = 0; + shuffleItems1.Moves = 0; + shuffleItems1.RaiseMaxLevel = 0; + shuffleItems1.SkillBoosterL = 0; + shuffleItems1.SkillBoosterM = 0; + shuffleItems1.SkillBoosterS = 0; + shuffleItems1.SkillSwap = 0; + shuffleItems1.Time = 0; + this.ItemsGrid.SelectedObject = shuffleItems1; + this.ItemsGrid.Size = new System.Drawing.Size(241, 369); + this.ItemsGrid.TabIndex = 54; + this.ItemsGrid.ToolbarVisible = false; + this.ItemsGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.UpdateProperty); + this.ItemsGrid.EnabledChanged += new System.EventHandler(this.ItemsGrid_EnabledChanged); + this.ItemsGrid.Enter += new System.EventHandler(this.ItemsGrid_Enter); + // + // Main + // + this.AllowDrop = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(517, 577); + this.Controls.Add(this.PB_Team4); + this.Controls.Add(this.PB_Team3); + this.Controls.Add(this.PB_Team2); + this.Controls.Add(this.PB_Team1); + this.Controls.Add(this.B_CheatsForm); + this.Controls.Add(this.GB_Resources); + this.Controls.Add(this.GB_Caught); + this.Controls.Add(this.GB_HighScore); + this.Controls.Add(this.B_Save); + this.Controls.Add(this.TB_FilePath); + this.Controls.Add(this.B_Open); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(533, 616); + this.MinimumSize = new System.Drawing.Size(533, 616); + this.Name = "Main"; + this.Text = "Pokemon Shuffle Save Editor"; + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Main_DragDrop); + this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Main_DragEnter); + this.GB_HighScore.ResumeLayout(false); + this.GB_HighScore.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_override)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_EventScore)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_EventIndex)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertScore)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_ExpertIndex)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_MainScore)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_MainIndex)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Event)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Expert)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Main)).EndInit(); + this.GB_Caught.ResumeLayout(false); + this.GB_Caught.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Skill)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_SkillLvl)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Lollipop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Lollipop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_SpeedUpY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_SpeedUpX)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_SpeedUpY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_SpeedUpX)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_MegaX)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_MegaY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Level)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Mon)).EndInit(); + this.GB_Resources.ResumeLayout(false); + this.GB_Resources.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Jewels)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Coins)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Hearts)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Team4)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button B_Open; + private System.Windows.Forms.TextBox TB_FilePath; + private System.Windows.Forms.Button B_Save; + private System.Windows.Forms.GroupBox GB_HighScore; + private System.Windows.Forms.PictureBox PB_Main; + private System.Windows.Forms.PictureBox PB_Event; + private System.Windows.Forms.PictureBox PB_Expert; + private System.Windows.Forms.GroupBox GB_Caught; + private System.Windows.Forms.Label L_IndexM; + private System.Windows.Forms.NumericUpDown NUP_MainIndex; + private System.Windows.Forms.NumericUpDown NUP_MainScore; + private System.Windows.Forms.Label L_IndexEv; + private System.Windows.Forms.Label L_IndexEx; + private System.Windows.Forms.NumericUpDown NUP_EventScore; + private System.Windows.Forms.NumericUpDown NUP_EventIndex; + private System.Windows.Forms.NumericUpDown NUP_ExpertScore; + private System.Windows.Forms.NumericUpDown NUP_ExpertIndex; + private System.Windows.Forms.Label L_Event; + private System.Windows.Forms.Label L_Expert; + private System.Windows.Forms.Label L_Main; + private System.Windows.Forms.PictureBox PB_Mon; + private System.Windows.Forms.ComboBox CB_MonIndex; + private System.Windows.Forms.CheckBox CHK_CaughtMon; + private System.Windows.Forms.NumericUpDown NUP_Level; + private System.Windows.Forms.Label L_ScoreEv; + private System.Windows.Forms.Label L_ScoreEx; + private System.Windows.Forms.Label L_ScoreM; + private System.Windows.Forms.GroupBox GB_Resources; + private System.Windows.Forms.Label L_Jewels; + private System.Windows.Forms.Label L_Coins; + private System.Windows.Forms.Label L_Hearts; + private System.Windows.Forms.NumericUpDown NUP_Hearts; + private System.Windows.Forms.NumericUpDown NUP_Jewels; + private System.Windows.Forms.NumericUpDown NUP_Coins; + private System.Windows.Forms.PictureBox PB_MegaX; + private System.Windows.Forms.PictureBox PB_MegaY; + private System.Windows.Forms.CheckBox CHK_MegaX; + private System.Windows.Forms.CheckBox CHK_MegaY; + private System.Windows.Forms.Button B_CheatsForm; + private Pokemon_Shuffle_Save_Editor.TabbedPropertyGrid ItemsGrid; + private System.Windows.Forms.NumericUpDown NUP_SpeedUpX; + private System.Windows.Forms.NumericUpDown NUP_SpeedUpY; + private System.Windows.Forms.PictureBox PB_SpeedUpX; + private System.Windows.Forms.PictureBox PB_SpeedUpY; + private System.Windows.Forms.PictureBox PB_Team1; + private System.Windows.Forms.PictureBox PB_Team2; + private System.Windows.Forms.PictureBox PB_Team3; + private System.Windows.Forms.PictureBox PB_Team4; + private System.Windows.Forms.Label L_RankEv; + private System.Windows.Forms.Label L_RankEx; + private System.Windows.Forms.Label L_RankM; + private System.Windows.Forms.PictureBox PB_Lollipop; + private System.Windows.Forms.NumericUpDown NUP_Lollipop; + private System.Windows.Forms.Label L_Level; + private System.Windows.Forms.PictureBox PB_override; + private System.Windows.Forms.PictureBox PB_Skill; + private System.Windows.Forms.NumericUpDown NUP_SkillLvl; + private System.Windows.Forms.Label L_Skill; + private System.Windows.Forms.ComboBox CB_Skill; + private System.Windows.Forms.CheckBox CHK_CurrentSkill; + private System.Windows.Forms.ToolTip toolTip1; + } +} + diff --git a/Pokemon Shuffle Save Editor/Main.cs b/Pokemon Shuffle Save Editor/Main.cs new file mode 100644 index 0000000..4313813 --- /dev/null +++ b/Pokemon Shuffle Save Editor/Main.cs @@ -0,0 +1,577 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Windows.Forms; +using static Pokemon_Shuffle_Save_Editor.ToolFunctions; + +namespace Pokemon_Shuffle_Save_Editor +{ + public partial class Main : Form + { + public static Database db = new Database(); + public static byte[] savedata = null; + public static Keys lastkeys; //to detect if ItemsGrid was entered from Tab or Shift+Tab + + private List monsel = new List(); + private List skillsel = new List(); + private ShuffleItems SI_Items = new ShuffleItems(); + + private bool loaded, updating, overrideHS; + public static int ltir; //Last TeamIndex Right-clicked + + public Main() + { + InitializeComponent(); + for (int i = 1; i < db.MonStopIndex; i++) + monsel.Add(new cbItem { Text = db.MonsList[i], Value = i }); + monsel = monsel.OrderBy(x => x.Text).ToList(); + CB_MonIndex.DataSource = monsel; + CB_Skill.DataSource = skillsel; + CB_MonIndex.DisplayMember = CB_Skill.DisplayMember = "Text"; + CB_MonIndex.ValueMember = CB_Skill.ValueMember = "Value"; + CB_Skill_Init(); + FormInit(); + } + + private void FormInit() + { + CB_MonIndex.SelectedIndex = 0; + CB_Skill.Visible = CHK_CurrentSkill.Visible = false; + B_Save.Enabled = GB_Caught.Enabled = GB_HighScore.Enabled = GB_Resources.Enabled = B_CheatsForm.Enabled = ItemsGrid.Enabled = loaded = false; + PB_Mon.Image = GetCaughtImage((int)CB_MonIndex.SelectedValue, CHK_CaughtMon.Checked); + PB_Main.Image = PB_Event.Image = PB_Expert.Image = GetStageImage(0, 0); + PB_Team1.Image = PB_Team2.Image = PB_Team3.Image = PB_Team4.Image = ResizeImage(GetMonImage(0), 48, 48); + PB_Lollipop.Image = new Bitmap(ResizeImage((Image)Properties.Resources.ResourceManager.GetObject("lollipop"), 24, 24)); + PB_Skill.Image = new Bitmap(ResizeImage((Image)Properties.Resources.ResourceManager.GetObject("skill"), 24, 24)); + PB_Lollipop.Visible = PB_Skill.Visible = false; + NUP_MainIndex.Maximum = BitConverter.ToInt32(db.StagesMain, 0) - 1; + NUP_ExpertIndex.Maximum = BitConverter.ToInt32(db.StagesExpert, 0); + NUP_EventIndex.Maximum = BitConverter.ToInt32(db.StagesEvent, 0) - 1; + ItemsGrid.SelectedObject = null; + TB_FilePath.Text = string.Empty; + savedata = null; + ltir = 0; + } + + private void Open(string file) + { + if (IsShuffleSave(file)) + { + B_Save.Enabled = GB_Caught.Enabled = GB_HighScore.Enabled = GB_Resources.Enabled = B_CheatsForm.Enabled = ItemsGrid.Enabled = loaded = true; + TB_FilePath.Text = file; + savedata = File.ReadAllBytes(file); + UpdateForm(null, null); + } + else + MessageBox.Show("Couldn't open your file, it wasn't detected as a proper Pokemon Shuffle savefile."); + } + + private bool IsShuffleSave(string file) // Try to do a better job at filtering files rather than just saying "oh, it's not savedata.bin quit" + { + FileInfo info = new FileInfo(file); + if (info.Length != 74807) return false; // Probably not + + var contents = new byte[8]; + File.OpenRead(file).Read(contents, 0, contents.Length); + return BitConverter.ToInt64(contents, 0) == 0x4000000009L; + } + + private void Parse(int slot = 0) + { + ltir = slot; + UpdateResourceBox(); + UpdateStageBox(); + UpdateOwnedBox(); + } + + private void CB_Skill_Init() + { + skillsel.Clear(); + for (int i = 0; i < db.Mons[(int)CB_MonIndex.SelectedValue].Item6.Length; i++) + { + if (db.Mons[(int)CB_MonIndex.SelectedValue].Item6[i] == 0) + break; + skillsel.Add(new cbItem { Text = db.SkillsList[db.Mons[(int)CB_MonIndex.SelectedValue].Item6[i] - 1], Value = i }); + } + CB_Skill.DataSource = skillsel.OrderBy(x => x.Value).ToList(); //for some reason the display doesn't update if I don't do this pointless reorderng stuff + CHK_CurrentSkill.Visible = (CHK_CaughtMon.Checked && skillsel.Count > 1); + } + + private void UpdateForm(object sender, EventArgs e) + { + if (!loaded || updating) + return; + updating = true; + if (sender != null) + { + if ((sender as Control).Name.ToLower().Contains("index")) + CB_Skill_Init(); + else + { + //Owned Bow Properties + int ind = (int)CB_MonIndex.SelectedValue; + ushort set_level = (ushort)(CHK_CaughtMon.Checked ? (NUP_Level.Value == 1 ? 0 : NUP_Level.Value) : 0); + ushort set_rml = (ushort)(CHK_CaughtMon.Checked ? NUP_Lollipop.Value : 0); + if (set_level > 10 + set_rml) + { + if ((sender as Control).Name.Contains("Level")) + set_rml = (ushort)(set_level - 10); + else if ((sender as Control).Name.Contains("Lollipop")) + set_level = (ushort)(10 + set_rml); + } + SetCaught(ind, CHK_CaughtMon.Checked); + SetLevel(ind, set_level, set_rml); + SetStone(ind, CHK_MegaX.Checked, CHK_MegaY.Checked); + SetSpeedup(ind, (db.HasMega[ind][0] && CHK_CaughtMon.Checked && CHK_MegaX.Checked), (int)NUP_SpeedUpX.Value, (db.HasMega[ind][1] && CHK_CaughtMon.Checked && CHK_MegaY.Checked), (int)NUP_SpeedUpY.Value); + SetSkill(ind, (int)(CHK_CaughtMon.Checked ? NUP_SkillLvl.Value : 1), (int)(CHK_CaughtMon.Checked ? CB_Skill.SelectedValue : 0)); + if (!CHK_CaughtMon.Checked || ((sender as Control).Name.ToLower().Contains("currentskill") && CHK_CurrentSkill.Checked)) + SetCurrentSkill(ind, CHK_CaughtMon.Checked ? (int)CB_Skill.SelectedValue : 0); + + //Stages Box Properties + SetScore((int)NUP_MainIndex.Value - 1, 0, (ulong)NUP_MainScore.Value); + SetScore((int)NUP_ExpertIndex.Value - 1, 1, (ulong)NUP_ExpertScore.Value); + SetScore((int)NUP_EventIndex.Value, 2, (ulong)NUP_EventScore.Value); + + //Ressources Box Properties + SetResources((int)NUP_Hearts.Value, (uint)NUP_Coins.Value, (uint)NUP_Jewels.Value, SI_Items.Items, SI_Items.Enchantments); + } + } + Parse(); + updating = false; + } + + private void UpdateOwnedBox() + { + int ind = (int)CB_MonIndex.SelectedValue; + + //team preview + int j = 1; + foreach (PictureBox pb in new[] { PB_Team1, PB_Team2, PB_Team3, PB_Team4 }) + { + pb.Image = GetTeamImage(GetTeam(j), (ltir == j)); + j++; + } + + //caught CHK + CHK_CaughtMon.Checked = GetMon(ind).Caught; + + //level view + NUP_Lollipop.Maximum = Math.Min(db.Mons[ind].Item4, 5); + NUP_Lollipop.Value = GetMon(ind).Lollipops; + NUP_Level.Maximum = 10 + NUP_Lollipop.Maximum; + NUP_Level.Value = GetMon(ind).Level; + + //Skill level + CHK_CurrentSkill.Checked = (GetMon(ind).CurrentSkill == (int)CB_Skill.SelectedValue); + NUP_SkillLvl.Value = GetMon(ind).SkillLevel[(int)CB_Skill.SelectedValue]; + toolTip1.SetToolTip(CB_Skill, db.SkillsTextList[db.Mons[ind].Item6[(int)CB_Skill.SelectedValue] - 1]); + + //Speedup values + if (db.MegaList.IndexOf(ind) != -1) //temporary fix while there are still some mega forms missing in megastone.bin + { + NUP_SpeedUpX.Maximum = db.HasMega[ind][0] ? db.Megas[db.MegaList.IndexOf(ind)].Item2 : 0; + NUP_SpeedUpY.Maximum = db.HasMega[ind][1] ? db.Megas[db.MegaList.IndexOf(ind, db.MegaList.IndexOf(ind) + 1)].Item2 : 0; + NUP_SpeedUpX.Value = GetMon(ind).SpeedUpX; + NUP_SpeedUpY.Value = GetMon(ind).SpeedUpY; + } + else + { + NUP_SpeedUpX.Maximum = NUP_SpeedUpY.Maximum = 1; + NUP_SpeedUpX.Value = NUP_SpeedUpY.Value = 0; + } + + #region Visibility + + L_Level.Visible = L_Skill.Visible = NUP_Level.Visible = PB_Skill.Visible = NUP_SkillLvl.Visible = CB_Skill.Visible = CHK_CaughtMon.Checked; + PB_Lollipop.Visible = NUP_Lollipop.Visible = (CHK_CaughtMon.Checked && NUP_Lollipop.Maximum != 0); + CHK_CurrentSkill.Visible = (CHK_CaughtMon.Checked && db.Mons[ind].Rest.Item2 > 1); + PB_Mon.Image = GetCaughtImage(ind, CHK_CaughtMon.Checked); + PB_MegaX.Visible = CHK_MegaX.Visible = db.HasMega[ind][0]; + PB_MegaY.Visible = CHK_MegaY.Visible = db.HasMega[ind][1]; + PB_MegaX.Image = db.HasMega[ind][0] ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("MegaStone" + db.Mons[ind].Item1.ToString("000") + (db.HasMega[ind][1] ? "_X" : string.Empty))) : new Bitmap(16, 16); + PB_MegaY.Image = db.HasMega[ind][1] ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("MegaStone" + db.Mons[ind].Item1.ToString("000") + "_Y")) : new Bitmap(16, 16); + CHK_MegaX.Checked = (GetMon(ind).Stone & 1) != 0; + CHK_MegaY.Checked = (GetMon(ind).Stone & 2) != 0; + NUP_SpeedUpX.Visible = PB_SpeedUpX.Visible = CHK_CaughtMon.Checked && CHK_MegaX.Visible && CHK_MegaX.Checked; + NUP_SpeedUpY.Visible = PB_SpeedUpY.Visible = CHK_CaughtMon.Checked && CHK_MegaY.Visible && CHK_MegaY.Checked; //Else NUP_SpeedUpY appears if the next mega in terms of offsets has been obtained + PB_SpeedUpX.Image = db.HasMega[ind][0] ? new Bitmap(ResizeImage((Image)Properties.Resources.ResourceManager.GetObject("mega_speedup"), 24, 24)) : new Bitmap(16, 16); + PB_SpeedUpY.Image = db.HasMega[ind][1] ? new Bitmap(ResizeImage((Image)Properties.Resources.ResourceManager.GetObject("mega_speedup"), 24, 24)) : new Bitmap(16, 16); + + #endregion Visibility + } + + private void UpdateResourceBox() + { + NUP_Coins.Value = GetRessources().Coins; + NUP_Jewels.Value = GetRessources().Jewels; + NUP_Hearts.Value = GetRessources().Hearts; + for (int i = 0; i < SI_Items.Items.Length; i++) + SI_Items.Items[i] = GetRessources().Items[i]; + for (int i = 0; i < SI_Items.Enchantments.Length; i++) + SI_Items.Enchantments[i] = GetRessources().Enhancements[i]; + ItemsGrid.Refresh(); + } + + private void UpdateStageBox() + { + int ind, type; + byte[] stage; + Object nup, pb; + foreach (Label lbl in new[] { L_RankM, L_RankEx, L_RankEv }) + { + if (lbl == L_RankM) + { + ind = (int)NUP_MainIndex.Value - 1; + type = 0; + nup = NUP_MainScore; + pb = PB_Main; + stage = db.StagesMain; + } + else if (lbl == L_RankEx) + { + ind = (int)NUP_ExpertIndex.Value - 1; + type = 1; + nup = NUP_ExpertScore; + pb = PB_Expert; + stage = db.StagesExpert; + } + else if (lbl == L_RankEv) + { + ind = (int)NUP_EventIndex.Value; + type = 2; + nup = NUP_EventScore; + pb = PB_Event; + stage = db.StagesEvent; + } + else break; + GetRankImage(lbl, GetStage(ind, type).Rank, GetStage(ind, type).Completed); + (nup as NumericUpDown).Value = GetStage(ind, type).Score; + (pb as PictureBox).Image = GetStageImage(BitConverter.ToInt16(stage, 0x50 + BitConverter.ToInt32(stage, 0x4) * ((type == 0) ? ind + 1 : ind)) & 0x3FF, type); + //(pb as PictureBox).Image = GetCompletedImage(BitConverter.ToInt16(stage, 0x50 + BitConverter.ToInt32(stage, 0x4) * ((type == 0) ? ind + 1 : ind)) & 0x3FF, type, (type == 0) ? (GetStage(ind, type).Completed || overrideHS) : true); + } + PB_override.Image = overrideHS ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("warn")) : new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("valid")); + } + + private void B_CheatsForm_Click(object sender, EventArgs e) + { + new Cheats().ShowDialog(); + updating = true; + Parse(); + updating = false; + } + + private void B_Open_Click(object sender, EventArgs e) + { + OpenFileDialog ofd = new OpenFileDialog { FileName = "savedata.bin", Filter = ".bin files (*.bin)|*.bin|All files (*.*)|*.*", FilterIndex = 1 }; + if (ofd.ShowDialog() == DialogResult.OK) + Open(ofd.FileName); + } + + private void B_Save_Click(object sender, EventArgs e) + { + if (!loaded || updating) + return; + updating = true; + SaveFileDialog sfd = new SaveFileDialog { FileName = Path.GetFileName(TB_FilePath.Text), Filter = ".bin files (*.bin)|*.bin|All files (*.*)|*.*", FilterIndex = 1 }; + if (sfd.ShowDialog() == DialogResult.OK) + { + File.WriteAllBytes(sfd.FileName, savedata); + MessageBox.Show("Saved save file to " + sfd.FileName + "." + Environment.NewLine + "Remember to delete secure value before importing."); + } + updating = false; + } + + private void PB_Override_Click(object sender, EventArgs e) + { + overrideHS = !overrideHS; + updating = true; + Parse(); + updating = false; + } + + private void PB_Owned_Click(object sender, EventArgs e) + { + int s = 0; + if ((sender as Control).Name.Contains("SpeedUpX")) + s = 1; + if ((sender as Control).Name.Contains("SpeedUpY")) + s = 2; + if ((sender as Control).Name.Contains("Lollipop")) + s = 3; + if ((sender as Control).Name.Contains("Mon")) + s = 4; + if ((sender as Control).Name.Contains("Skill")) + s = 5; + switch (s) + { + case 1: + NUP_SpeedUpX.Value = (NUP_SpeedUpX.Value == 0) ? NUP_SpeedUpX.Maximum : 0; + break; + + case 2: + NUP_SpeedUpY.Value = (NUP_SpeedUpY.Value == 0) ? NUP_SpeedUpY.Maximum : 0; + break; + + case 3: + NUP_Lollipop.Value = (NUP_Lollipop.Value == 0) ? NUP_Lollipop.Maximum : 0; + NUP_Level.Value = 10 + NUP_Lollipop.Value; + break; + + case 4: + if (!CHK_CaughtMon.Checked) + { + CHK_CaughtMon.Checked = true; + NUP_Lollipop.Value = NUP_Lollipop.Maximum; + NUP_Level.Value = NUP_Level.Maximum; + CHK_MegaX.Checked = db.HasMega[(int)CB_MonIndex.SelectedValue][0]; + CHK_MegaY.Checked = db.HasMega[(int)CB_MonIndex.SelectedValue][1]; + NUP_SpeedUpX.Value = (db.HasMega[(int)CB_MonIndex.SelectedValue][0]) ? NUP_SpeedUpX.Maximum : 0; + NUP_SpeedUpY.Value = (db.HasMega[(int)CB_MonIndex.SelectedValue][1]) ? NUP_SpeedUpY.Maximum : 0; + NUP_SkillLvl.Value = NUP_SkillLvl.Maximum; + } + else CHK_CaughtMon.Checked = CHK_MegaX.Checked = CHK_MegaY.Checked = false; + break; + + case 5: + bool boool = false; + foreach (int sLv in GetMon((int)CB_MonIndex.SelectedValue).SkillLevel) + { + if (sLv != 5 && sLv != 0) + boool = true; + } + for (int i = 0; i < db.Rest[(int)CB_MonIndex.SelectedValue].Item2; i++) + SetSkill((int)CB_MonIndex.SelectedValue, (boool ? 5 : 1), i); + break; + + default: + return; + } + updating = true; + Parse(); + updating = false; + } + + private void PB_Stage_Click(object sender, EventArgs e) + { + int i, ind, max; + if ((sender as Control).Name.Contains("Main")) + { + i = 1; + ind = (int)NUP_MainIndex.Value - 1; + max = (int)NUP_MainIndex.Maximum; + } + else if ((sender as Control).Name.Contains("Expert")) + { + i = 2; + ind = (int)NUP_ExpertIndex.Value - 1; + max = (int)NUP_ExpertIndex.Maximum; + } + else if ((sender as Control).Name.Contains("Event")) + { + i = 3; + ind = (int)NUP_EventIndex.Value; + max = (int)NUP_EventIndex.Maximum + 1; + } + else return; + if ((e as MouseEventArgs).Button == MouseButtons.Left) //Left Click + { + if (GetStage(ind, i - 1).Completed) //is completed + { + if (GetStage(ind, i - 1).Rank > 0 && GetStage(ind, i - 1).Rank < 4) //is rank != C + SetRank(ind, i - 1, GetStage(ind, i - 1).Rank - 1); //minus 1 rank + else //is rank = C or unknown + { + SetRank(ind, i - 1, 3); //rank S + PatchScore(ind, i - 1); + } + } + //Nothing happens if uncompleted + } + if ((e as MouseEventArgs).Button == System.Windows.Forms.MouseButtons.Right) //Right Click + { + SetStage(ind, i - 1, !GetStage(ind, i - 1).Completed); //invert completed state + if (GetStage(ind, i - 1).Completed) //is completed (was uncompleted) + { + if (i == 1 && !overrideHS) //Main stages + { + for (int j = ind; j >= 0; j--) + { + SetStage(j, i - 1, true); //completed for every previous stage + PatchScore(j, i - 1); + } + } + SetRank(ind, i - 1, 3); //rank S + PatchScore(ind, i - 1); + } + else //is uncompleted (was completed) + { + if (i == 1 && !overrideHS) //Main stages + { + for (int j = ind; j < max; j++) //revert every next stage to default + { + SetStage(j, i - 1); + SetRank(j, i - 1, 0); + SetScore(j, i - 1, 0); + } + } + } + } + updating = true; + Parse(); + updating = false; + } + + private void PB_Team_Click(object sender, EventArgs e) + { + int s = 0; + if ((sender as Control).Name.Contains("Team1")) + s = 1; + if ((sender as Control).Name.Contains("Team2")) + s = 2; + if ((sender as Control).Name.Contains("Team3")) + s = 3; + if ((sender as Control).Name.Contains("Team4")) + s = 4; + if (s > 0 && s < 5) + { + if ((e as MouseEventArgs).Button == MouseButtons.Left) + { + if (ModifierKeys == Keys.Control) + { + int ind = (int)CB_MonIndex.SelectedValue; + for (int i = 1; i < 5; i++) + { + if (i != s && GetTeam(i) == ind) + SetTeam(i, GetTeam(s)); + } + if (!GetMon(ind).Caught) + SetCaught(ind, true); + SetTeam(s, ind); + } + else + CB_MonIndex.SelectedValue = GetTeam(s); + updating = true; + Parse(); + updating = false; + } + else if ((e as MouseEventArgs).Button == MouseButtons.Right) + { + if (ltir == 0) + { + updating = true; + Parse(s); + updating = false; + } + else + { + int temp = GetTeam(ltir); + SetTeam(ltir, GetTeam(s)); + SetTeam(s, temp); + updating = true; + Parse(); + updating = false; + } + } + } + else return; + } + + private void TB_Filepath_DoubleClick(object sender, EventArgs e) + { + if ((sender as Control).Enabled == true) + { + loaded = false; + GroupBox[] list = { GB_Caught, GB_HighScore, GB_Resources }; + foreach (GroupBox gb in list) + { + foreach (Control ctrl in gb.Controls) + { + if (ctrl is CheckBox) + { + (ctrl as CheckBox).Checked = false; + if (ctrl != CHK_CaughtMon) + (ctrl as CheckBox).Visible = false; + } + if (ctrl is PictureBox) + (ctrl as PictureBox).Image = new Bitmap(ctrl.Width, ctrl.Height); + if (ctrl is NumericUpDown) + { + (ctrl as NumericUpDown).Value = (ctrl as NumericUpDown).Minimum; + if (gb == GB_Caught) + (ctrl as NumericUpDown).Visible = false; + } + if (ctrl is Label) + { + if (gb == GB_Caught) + (ctrl as Label).Visible = false; + if (ctrl.Name.Contains("Rank")) + (ctrl as Label).Text = "-"; + } + } + } + FormInit(); + } + } + + protected string GetDragFilename(DragEventArgs e) + { + if ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) + { + Array data = ((IDataObject)e.Data).GetData("FileName") as Array; + if (data != null) + { + if ((data.Length == 1) && (data.GetValue(0) is String)) + return ((string[])data)[0]; + } + } + return null; + } + + private void Main_DragDrop(object sender, DragEventArgs e) + { + Open(GetDragFilename(e)); + } + + private void Main_DragEnter(object sender, DragEventArgs e) + { + string filename = GetDragFilename(e); + e.Effect = (filename != null && IsShuffleSave(filename)) ? DragDropEffects.Copy : DragDropEffects.None; + } + + private void ItemsGrid_EnabledChanged(object sender, EventArgs e) + { + ItemsGrid.SelectedObject = (ItemsGrid.Enabled) ? SI_Items : null; + } + + private void ItemsGrid_Enter(object sender, EventArgs e) + { + if (lastkeys == Keys.Tab) { ItemsGrid.SelectedGridItem = ItemsGrid.EnumerateAllItems().First((item) => item.PropertyDescriptor != null); } + else if (lastkeys == (Keys.Tab | Keys.Shift)) { ItemsGrid.SelectedGridItem = ItemsGrid.EnumerateAllItems().Last(); } + } + + private void UpdateSkill(object s, EventArgs e) + { + NUP_SkillLvl.Value = GetMon((int)CB_MonIndex.SelectedValue).SkillLevel[(int)CB_Skill.SelectedValue]; + UpdateForm(s, e); + } + + private void CB_MonIndex_EnabledChanged(object sender, EventArgs e) + { + if (CB_MonIndex.Enabled) + CB_Skill_Init(); + } + + private void UpdateProperty(object s, PropertyValueChangedEventArgs e) + { + UpdateForm(s, e); + } + + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + lastkeys = keyData; + return base.ProcessCmdKey(ref msg, keyData); + } + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Main.resx b/Pokemon Shuffle Save Editor/Main.resx new file mode 100644 index 0000000..c66d955 --- /dev/null +++ b/Pokemon Shuffle Save Editor/Main.resx @@ -0,0 +1,383 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + + 25 + + + + + AAABAAMAEBAAAAAAIABoBAAANgAAACAgAAAAACAAqBAAAJ4EAAAwMAAAAAAgAKglAABGFQAAKAAAABAA + AAAgAAAAAQAgAAAAAABABAAAAAAAAAAAAAAAAAAAAAAAAACu7/8puPT/p9j//6fY//8ptvH/AJvW/xyD + rP9ugpj/bYCU/xt9pf8Akcb/J6rg/6bX/v+n2P//Kbj0/wCu7/8Aru//Kbj0/6fZ//+Nsc//FUdZ/wA+ + R/8AVGD/AGRx/wBkcf8AU1//AD1G/xRDVP+Al7H/oMvt/ym49P8Aru//AK7v/ym59P9siJ//Bjo//wCO + of8Am7H/AKK1/xd4jP8Xdoz/AJ+0/wCXq/8AiZn/Bjg9/19ugP8kquL/AK7v/wCu7/8NjsD/FARf/x0E + oP8JXo//AL7R/w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X//wDw+/8A8vv/APX//wD2//8A8/v/APP7/wD2 + //8A9f//APL7/wDw+/8A9f//APb6/w7Ezv9Lb5z/HCx+/ww7av8BeIb/AB8h/wB+rf8ArvT/AK7v/wCu + 7/8Aru//Bavs/1mGm/+I4+f/mP///6j+//+o8vL/N6Wo/wKCh/8Axsv/APL5/wDz//8A8///AO3z/wBn + bf8AZ2//AO30/wDz//8A8///APL5/wDEy/8AgYf/AI2X/yjR2f8MxdD/ALPD/wCDjv8AJjX/AJzX/wCu + 7/8Aru//AK7v/wCu7/8ArfH/QY6v/4LIyv+A/f//bO7y/3qjp/8wMS3/AgIB/wAlJ/8Atb//APb//wDz + //8A8fr/AM7U/wDO1P8A8fr/APP//wD2//8Atb//ACQn/wAAAP8ABAX/EFRX/we5x/8ArsH/AF1k/wA7 + Uv8ApeP/AK7v/wCu7/8Aru//AK7v/wCv8f82krb/dbKy/2v///9LyMv/WF5g/zEwMf9DQ0P/NTQ0/wJR + V/8A+///APP//wDz//8A8///APP//wDz//8A8///APv//wJRV/81NDT/Pj8+/wgICP8AERH/AJGe/wCs + wf8AR0z/BUpi/wCo5v8Aru//AK7v/wCu7/8Aru//AK/x/zqXwf9wq67/af3//03Kzf9IUVP/SklK/9LR + 0v+9trb/HFtg/wD7//8A8///APP//wDz//8A8///APP//wDz//8A+///HFtg/722tv/Pzs//Kioq/wAT + Ff8AlJ7/AKm9/wA/Qf8IVnH/AKzt/wCu7/8Aru//AK7v/wCu7/8Ar/H/QqnX/4Cnpf+A+vv/Yu/y/zmB + hP8wNDX/iISG/3KKi/8Jsrr/APb//wDz//8A8///APP//wDz//8A8///APP//wD2//8Jsrr/comL/4KA + gv8OFxb/AFZb/wCwwP8AobL/AC80/x9zlf8ArvL/AK7v/wCu7/8Aru//AK7v/wCv8f9Fs+b/kaen/5H0 + 9f93/P//Nevs/x6krP8LhIv/A77H/wDw9v8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDw + 9v8Du8P/BX+F/wCOlf8Cusn/BrDD/wCap/8DJin/LYy2/wCu8v8Aru//AK7v/wCu7/8Aru//AK7w/07A + 9/9xf4X/adrd/2P7//8w+P//Dvf//wz7//8K9P//BvP//wHz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wD0//8A9v7/AN3t/wC90P8Arb//AICM/xIdIP9KtOj/AK/x/wCu7/8Aru//AK7v/wCu + 7/8Aru//Vsj5/1tqdv8vm6L/Pfv//yv3//8X9f//LPb//031//9C9f//G/T//wPz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDv/P8A3Ov/ALzQ/wCww/8AX2j/MjlB/06x5P8Aq/H/AK7v/wCu + 7/8Aru//AK7v/wCu8f9HseT/Q0lW/wcvMP8P7/T/Fff//yT3//9i9///x/3//8r///92+v//H/X//wLz + //8C8///AvP//wLz//8C8///AvP//wLz//8C8///APL//wDj9v8AxNT/AK+9/wEfH/8+Q0r/Poyv/wCS + x/8ArvH/AK7v/wCu7/8Aru//AKLk/xBGX/8FMjn/AHmI/wSdo/8J8/v/LPX//5L5///1////+P///7r9 + //9U9///FvT//xPz//8T8///E/P//xHz//8N8///DfP//w3z//8D8///AO79/wDP3/8AeID/AFhk/wUm + Kv8OO0z/AHym/wCb1/8Are//AK7v/wCw9f8AQFn/ABUb/wC90v8A3/H/BNfh/wvw+/8/+P//o/3//9z/ + ///p////3P///7T9//9x+v//S/j//zn3//819///Ovj//z/4//9C+P//Qvj//z/5//8n9///AeHu/wC0 + wP8ArL//AI6i/wAQEv8AL0D/AIe3/wCj4v8AsfP/AIe6/wAFB/8AIyz/ANXs/wDp+P8J9f//J/f//33l + 6/907fL/cP7//4D8//95+f//cvn//2L4//9S+P//S/f//0v3//9L+P//Sfj//0b5//9G/P//XOvw/3vh + 5f8o9f3/Ad7w/wC8zv8Ap7z/ABog/wADBf8AY4X/AJfL/wCm5v8AMUf/AAAA/wEtMf8E8f//CfP//zP3 + //+F/f//burs/zCcof80kpT/PcvM/0Dr7/889vz/PPn//zz5//88+f//PPn//zz2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P5/6rZ + //+l2v//o9n9/5fF5/9KkrH/FmmM/xJKYP8oaoL/AKzt/wCq7f8Ar/P/UsT6/6zb//+l1///pdf//6rZ + //9Sw/n/AK7v/wCu7/8Aru//AK7v/1LD+f+q2f//pdf//6XX//+q2f//UsP5/wCu7/8Aru//AK7v/wCu + 7/9Sw/n/qtn//6XX//+l1///rNv//1LF+v8Ar/P/AKrr/wCr7P8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAwAAAAYAAAAAEA + IAAAAAAAgCUAAAAAAAAAAAAAAAAAAAAAAAAAru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX + //+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//ALL3/wCu9/8Aru//AKbm/3O+7/+lwub/lLre/5S2 + 1v+Uttb/lLbW/5y61v9rstb/AJrW/wCi3v8Apub/AKrv/wCu7/8Asvf/AK7v/3vO//+t2///pdf//6XX + //+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu9/8Aqu//AKLe/wCazv8AksX/AIq9/2ue + vf+UpsX/jKa9/4ymvf+Mor3/jKK9/5Smvf9rnr3/AIa1/wCGtf8AhrX/AIq9/wCSxf8Antb/AKbm/3vO + //+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AKbm/wCe1v8AksX/AIKt/wBx + nP8AWXP/AEVa/yE1Qv8pKDH/ISQp/yEkKf8hJCn/ISQp/ykoMf8h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f8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aqu//MU1S/0JhWv9aUaX/jGn//6WS + ///Fuv//1sr//72u//+EYeb/KVlz/wDz9/8A9///APv//wDO1v8ATVL/AMrO/wDz//8A7/f/AMK9/wg5 + Sv8IOUr/AMK9/wDv9/8A8///AMrO/wBNUv8Aztb/APv//wD3//8A6+//IU1j/2tNzv9jTeb/KQzF/yEE + tf8hBK3/IQC1/xAEUv8AGBD/AAwQ/wCOvf8Asvf/AK7v/wCu7/8Aru//AK7v/wCu7/8Arvf/QmFz/1qW + lP9jvr3/lIa9/86y9//v5/////f//9bG7/97jqX/Id/e/wD7//8A8///APf//wDf7/8A4+//AP///wD3 + //8A9///AP///wDj7/8A4+//AP///wD3//8A9///AP///wDj7/8A3+//APf//wDz//8A+///AM7W/zFR + a/9zUbX/Ohy9/yEAtf8hAJT/EABK/wBZWv8ANTH/ABAZ/wCe1v8Asvf/AK7v/wCu7/8Aru//AK7v/wCu + 7/8Asvf/Ooal/3uChP97////lOvm/73X3v/e6+//7/P3/8Xn5v9j9///EP///wD7//8A9///APP//wD3 + //8A9///APP//wDz//8A8///APf//wD3//8A9///APf//wDz//8A8///APP//wD3//8A9///APP//wD3 + //8A+///AP///wjf5v9Knpz/MVlz/wgxWv8IRVL/AIKE/wCirf8ADAj/ADlK/wCu7/8Arvf/AK7v/wCu + 7/8Aru//AK7v/wCu7/8Asvf/GZ7O/4R5e/+E3+b/lP///6X///+1////xf///63///9S6+//CL7F/wDG + zv8A8///AP///wDz//8A8///APP//wDz//8A+///ANfe/wAoKf8AKCn/ANfm/wD7//8A8///APP//wDz + //8A8///AP///wDz//8Axs7/ALrF/wDX5v8x8///Kdfe/wC+xf8AtsX/ALbF/wB5hP8AAAD/AGWM/wCy + 9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Arvf/AKrm/3N5hP+EwsX/jP///4z///+E+///hP///5TG + xf9KUVL/CAQA/wAAAP8ANTH/AMLO/wD///8A8///APP//wDz//8A+///AMrW/wBFUv8ARVL/AMrW/wD7 + //8A8///APP//wDz//8A////AL7O/wAxMf8AAAD/AAAA/wAUGf8ZgoT/Idvm/wC6zv8Arr3/ALLF/wBN + Uv8ABAj/AIa1/wCy9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK73/1qClP+EoqX/e////3v7 + //9j////WrrF/3txc/9CQTr/CAgI/wAAAP8AAAD/ABQZ/wDf7/8A+///APP//wDz//8A8///APf//wD/ + //8A////APf//wDz//8A8///APP//wD7//8A3+//ABQZ/wAAAP8AAAD/AAAA/wAAAP8IAAD/EI6U/wDG + 1v8ArsX/AK69/wAoKf8AGCH/AJbO/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/1KC + lP97joz/c////2v///9S+///Qmlr/2thY/9CQUL/AAAA/xAQEP8ICAj/AAAA/wCGlP8A////APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD///8AhpT/AAAA/wgICP8IDAj/AAAA/wAA + AP8AAAD/ADk6/wDC1v8ArsX/AKq9/wAYGf8IICn/AJrO/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//ALL3/1KCnP9zioz/a////2P///9S+///OlVa/1pVUv8xMTH/UlFS/+bn5v/W0tb/GRQQ/wBZ + Wv8A////APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD///8AWVr/GRQQ/9bS + 1v/m4+b/SklK/wAAAP8AAAD/ACgp/wC+zv8ArsX/AKa1/wAUEP8IKDH/AJ7W/wCy9/8Aru//AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//ALL3/1qOrf9zgoT/a/f//2v///9a////Om1z/0pBQv8pKCn/paKl//// + ////////c11a/wBte/8A////APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD/ + //8AbXv/c11a////////////nJqc/wAAAP8AAAD/AEVK/wDCzv8ArsX/AJ6t/wAMCP8QNUL/AKLe/wCy + 9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/2Oixf97gnv/e/P3/3v///9r////OrrF/zox + Mf8pKCn/UlFS//fz9//m29b/KS0x/wDS3v8A+///APP//wDz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wD7//8A0t7/KS0x/+bb1v/38/f/QkVC/wAAAP8AAAD/AJac/wC6zv8Aqr3/AJKl/wAA + AP8pUWP/AKrm/wCy9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/2Oqzv+MhoT/jOvv/4z/ + //+E////Sv///zGqrf8xSUr/CAQI/yEcGf8QNTr/AKq1/wD///8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A////AKq1/xAxOv8ZGBn/AAAA/wAkIf8AipT/CMbW/wCu + vf8Arr3/AIaM/wAAAP86ZXv/AK7v/wCu9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//ALL3/2u6 + 5v+Ujoz/lNve/5T///+M+///Wvv//yH///8h6/f/EMLO/wC6xf8A5/f/AP///wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///AP///wDj7/8Atr3/ALrF/wDS + 3v8A0t7/CLbO/wiqvf8Arr3/AGlz/wgAAP9KhqX/ALL3/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK73/3PG9/97dXv/e7K1/3v///97+///Uvv//yH3//8Q9///CP///wj///8A9///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wD3 + //8A////AO///wDX5v8Awtb/ALbF/wCqvf8Arr3/AD1C/xAICP9rrtb/ALL3/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/3vS//9rcXv/Ql1j/0r3//9S+///Svv//yH3//8Q8///EPP//xn3 + //8h8///GfP//xDz//8I8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///AOf3/wDS5v8Awtb/ALLF/wCqvf8AorX/ABAQ/zExOv97xvf/ALL3/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/4TX//97lq3/GRQQ/ynCzv8x////Ovf//yH3 + //8Z9///Iff//0L3//9j9///a/f//1L3//8x9///EPP//wDz//8A8///APP//wDz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///AOv3/wDX5v8Awtb/ALLF/wCyxf8Agoz/AAAA/1pl + c/9zrtb/AKLm/wCu9/8Aru//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+EmrX/EAAA/whZ + Wv8Q////Gff//xn3//8Z9///Mff//2v3//+t+///xf///7X///97+///Mff//wjz//8A8///APP//wDz + //8A8///APP//wDz//8A8///APP//wDz//8A8///APP//wDz//8A8///AO///wDb7/8Axtb/ALbF/wC2 + xf8AOTr/CAQA/3uKnP9rnr3/AIa1/wCi3v8Asvf/AK7v/wCu7/8Aru//AK7v/wCu7/8Arvf/ALL3/0p9 + nP8ZFBn/AAQI/wAgIf8Iws7/CP///xDz//8h9///Qvf//5T7///m////9////+b///+9////Y/f//xn3 + //8I8///CPP//wjz//8I8///CPP//wjz//8I8///CPP//wjz//8I8///CPP//wjz//8A8///APP//wDj + 9/8Azt7/AMbW/wCSnP8AFBn/AAQA/xkUGf9CcYz/AIa1/wCGtf8Apub/AK73/wCu7/8Aru//AK7v/wCu + 7/8Atv//AGmU/wAAAP8AGBn/AJ61/wCyxf8ATVL/COfv/wj3//8Z8///Uvf//8X7///3//////////// + ///e////nPv//0r3//8h9///GfP//xnz//8Z8///GfP//xnz//8Z8///EPP//xDz//8Q8///EPP//xDz + //8I8///APf//wDv//8A2+//AL7F/wA1Ov8AgpT/AHWE/wAQEP8AAAD/AFlz/wCGtf8Air3/AKrv/wCu + 7/8Aru//AK7v/wC2//8AgrX/AAQI/wAUGf8Arr3/AMrm/wDn9/8AusX/CN/v/wj3//8Z9///Y/f//8X/ + ///v////9//////////3////1v///6X7//9z+///Svf//zr3//8x9///Kff//yn3//8p9///Kff//zH3 + //8x9///Ovf//zH3//8p9///Gff//wjz//8A6/f/AL7O/wCWnP8AssX/AJat/wCClP8AEBD/AAQA/wBh + hP8AhrX/AJbO/wCu9/8Aru//ALL3/wCm5v8AGCH/AAAA/wA1Qv8Awt7/ANfm/wDr9/8I+///CPf//xnz + //9C+///jP///63///+t////vf///8X///+9////vf///63///+U+///c/v//1r7//9S9///Svf//1L7 + //9a+///Y/v//2P7//9j+///Wvv//2P7//9z////e////0r7//8I8///AOPv/wDS5v8Aus7/AKa1/wCW + rf8AKDH/AAAA/wAQGf8AeaX/AIq1/wCq5v8Aru//ALr//wBVc/8AAAD/AAAA/wA1Qv8A1+//AOf3/wDv + //8I8///EPP//0L7//+U5+//hMLF/0r3//9K////Wvv//2P7//9a9///Uvf//1L3//9S9///Svf//0r3 + //9K9///Svf//0r3//9C9///Qvf//zr3//869///Ovv//zr///9C9///a7a9/5zj5v9S////CO///wDb + 7/8Axtb/ALbO/wCqvf8AKDH/AAAA/wAAAP8APVL/AIa1/wCazv8Asvf/AJ7e/wAIEP8AAAD/AAAA/wBF + Sv8A7///CO///wjz//8Q9///Ovf//5T///+U+///Qq6t/yl1e/8xsrX/Ou/3/0L///9C////Ovv//zr7 + //869///Ovf//zr3//869///Ovf//zr3//86+///Ovv//0L///9C////Qu/3/0K2vf86fYT/Oqat/2v3 + //+c////Svv//wDv//8A1+b/AMLW/wC+zv8ANTr/AAAA/wAAAP8ABAj/AHGc/wCOvf8Auv//AGGE/wAA + AP8ABAD/AAAA/whBSv8I9///CPf//xD3//9C9///lP///63///9r+///Ov///ymqtf8xHBn/OkVC/zqG + hP9CusX/QuPm/0Lz//9C////Qv///0L///9C////Qv///0L///9C8///QuPm/0q+xf9KjpT/SllS/0o5 + Ov9Ktr3/Qv///0L3//97+///nP///1L7//8I6/f/ANfm/wDK1v8ALTH/AAAA/wAAAP8AAAD/AEFa/wCK + vf8Arvf/CC06/xAIAP8QEBD/EAwI/xAxMf8Z7/f/Kfv//1r7//+c////nP///3v7//9S////QvP3/zFJ + Sv8hOUL/IVlz/zE5Qv9CNTH/SkE6/0JZWv9CbWv/Qnl7/0p9hP9KfYT/Qnl7/0Jtc/9KXVr/UklC/0pB + Qv9CSUr/KWmE/0JVWv9SZWP/SvP3/0r7//9S9///a/v//5T///9j+///EO///wDS3v8AGBn/AAAA/wAA + AP8AAAD/ABgh/wCCrf8Aks7/GRgZ/xkcGf8ZHBn/IRwZ/ykxMf9K5+//e////4z///9r+///Uvv//1L/ + //9S////Sn17/zoxMf8Als7/ALr//wCm5v8Ijr3/GXml/1Jpe/9jZWv/WmFr/1JdY/9SXWP/WmFr/2Nl + a/9SaXv/GX2l/xCOvf8Apub/ALb//wiazv9SSUr/UoKE/1L7//9K+///Qvf//1L3//9z+///a////ynb + 5v8ACAj/AAAA/wAAAP8AAAD/AAAA/wBpjP8IdZz/IRwZ/yEkIf8pLSn/QkFC/1pRUv9rztb/Wv///zr3 + //8x9///Ov///0r7//9Kioz/Sj06/xmCrf8Atv//AK7v/wCy9/8Atvf/ALL3/3vS//+t3///pdv//5zX + //+c1///pdv//63f//970v//ALL3/wCy9/8Asvf/AK7v/wCy9/8Zhq3/WkVC/1qKjP9S+///Sv///0L3 + //869///Qv///0q+xf8pICH/AAQA/wAAAP8AAAD/AAAA/wBNY/8ZXXv/OjUx/1pZWv9zcXP/Wl1a/0I9 + Ov86dXv/Mf///yn7//8p////Md/m/zppa/9COTH/GYKt/wC2//8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdv//6Xb//+l2///pdv//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Atv//IYKt/1JF + Qv9SeXv/UuPm/1L///9C+///Ov///ylpc/8pHBn/MTEx/yEgIf8AAAD/AAAA/wAxQv9SeYz/nJaU/5ye + nP9jZWP/QkFC/0I9Ov86PTr/OtLe/zHr7/8pjpT/ISgp/0I9Qv9ansX/ALb3/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//ALL3/1qexf9jWVr/UlVS/1Kmpf9K7/f/Qtfe/zo5Ov8pJCH/ISQh/1JRUv9SUVL/EAwI/wAY + If+cqrX/paKc/1pZWv9CRUL/QkVC/0JFQv9CPTr/Ok1K/yk5Ov8pHBn/UmVz/5zK7/971///AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu + 7/8Aru//AK7v/wCu7/8Aru//AK7v/3vX//+cyu//a32M/1JJSv9KXVr/Sl1a/0I9Ov8xOTr/ISQh/yEg + If9jZWP/c3Fz/ykxMf+EhoT/WllS/0pFQv9KSUL/SkVC/0I9Ov86PTr/QkFK/1pthP+Mtt7/reP//63f + //97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b + //97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t3///pd///5S+3v9rgpT/UlVa/0JB + Qv86NTH/MS0p/yEgGf8hIBn/a2lj/4SChP9CWWP/QkFC/0JJSv86WWP/KV1z/1qGnP+ErsX/nM73/63j + //+l3///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6XX + //+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO//+t2///pdf//6Xf + //+l3///nM73/4Suzv9ahpz/IVVr/yFBUv8ZJCn/ISAh/0ppc/8Apt7/AJrW/wCe3v8Aqu//ALL3/3vS + //+14///pdv//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu7/8Aru//AK7v/3vO + //+t2///pdf//6XX//+l1///pdv//7Xj//971///ALL3/wCq7/8Antb/AJbO/wCi3v8Asvf/ALL3/wCy + 9/8Asvf/AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCu7/8Aru//AK7v/wCu + 7/8Aru//AK7v/3vO//+t2///pdf//6XX//+l1///pdf//63b//97zv//AK7v/wCy9/8Asvf/ALL3/wCy + 9/8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8= + + + \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Mission_Popup.Designer.cs b/Pokemon Shuffle Save Editor/Mission_Popup.Designer.cs new file mode 100644 index 0000000..81dd9fa --- /dev/null +++ b/Pokemon Shuffle Save Editor/Mission_Popup.Designer.cs @@ -0,0 +1,302 @@ +namespace Pokemon_Shuffle_Save_Editor +{ + partial class Mission_Popup + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.NUP_Mission = new System.Windows.Forms.NumericUpDown(); + this.L_Top = new System.Windows.Forms.Label(); + this.GB_States = new System.Windows.Forms.GroupBox(); + this.CHK_10 = new System.Windows.Forms.CheckBox(); + this.CHK_09 = new System.Windows.Forms.CheckBox(); + this.CHK_08 = new System.Windows.Forms.CheckBox(); + this.CHK_07 = new System.Windows.Forms.CheckBox(); + this.CHK_06 = new System.Windows.Forms.CheckBox(); + this.CHK_05 = new System.Windows.Forms.CheckBox(); + this.CHK_04 = new System.Windows.Forms.CheckBox(); + this.CHK_03 = new System.Windows.Forms.CheckBox(); + this.CHK_02 = new System.Windows.Forms.CheckBox(); + this.CHK_01 = new System.Windows.Forms.CheckBox(); + this.button1 = new System.Windows.Forms.Button(); + this.L_Active = new System.Windows.Forms.Label(); + this.NUP_Active = new System.Windows.Forms.NumericUpDown(); + this.B_Erase = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Mission)).BeginInit(); + this.GB_States.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Active)).BeginInit(); + this.SuspendLayout(); + // + // NUP_Mission + // + this.NUP_Mission.Location = new System.Drawing.Point(122, 12); + this.NUP_Mission.Maximum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.NUP_Mission.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Mission.Name = "NUP_Mission"; + this.NUP_Mission.Size = new System.Drawing.Size(43, 20); + this.NUP_Mission.TabIndex = 0; + this.NUP_Mission.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Mission.ValueChanged += new System.EventHandler(this.NUP_Mission_ValueChanged); + // + // L_Top + // + this.L_Top.AutoSize = true; + this.L_Top.Location = new System.Drawing.Point(12, 14); + this.L_Top.Name = "L_Top"; + this.L_Top.Size = new System.Drawing.Size(104, 13); + this.L_Top.TabIndex = 1; + this.L_Top.Text = "Edit Mission Card # :"; + // + // GB_States + // + this.GB_States.Controls.Add(this.CHK_10); + this.GB_States.Controls.Add(this.CHK_09); + this.GB_States.Controls.Add(this.CHK_08); + this.GB_States.Controls.Add(this.CHK_07); + this.GB_States.Controls.Add(this.CHK_06); + this.GB_States.Controls.Add(this.CHK_05); + this.GB_States.Controls.Add(this.CHK_04); + this.GB_States.Controls.Add(this.CHK_03); + this.GB_States.Controls.Add(this.CHK_02); + this.GB_States.Controls.Add(this.CHK_01); + this.GB_States.Location = new System.Drawing.Point(12, 38); + this.GB_States.Name = "GB_States"; + this.GB_States.Size = new System.Drawing.Size(260, 101); + this.GB_States.TabIndex = 2; + this.GB_States.TabStop = false; + this.GB_States.Text = "Missions state"; + // + // CHK_10 + // + this.CHK_10.AutoSize = true; + this.CHK_10.Location = new System.Drawing.Point(216, 75); + this.CHK_10.Name = "CHK_10"; + this.CHK_10.Size = new System.Drawing.Size(38, 17); + this.CHK_10.TabIndex = 12; + this.CHK_10.Text = "10"; + this.CHK_10.UseVisualStyleBackColor = true; + this.CHK_10.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_09 + // + this.CHK_09.AutoSize = true; + this.CHK_09.Location = new System.Drawing.Point(168, 75); + this.CHK_09.Name = "CHK_09"; + this.CHK_09.Size = new System.Drawing.Size(38, 17); + this.CHK_09.TabIndex = 11; + this.CHK_09.Text = "09"; + this.CHK_09.UseVisualStyleBackColor = true; + this.CHK_09.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_08 + // + this.CHK_08.AutoSize = true; + this.CHK_08.Location = new System.Drawing.Point(115, 75); + this.CHK_08.Name = "CHK_08"; + this.CHK_08.Size = new System.Drawing.Size(38, 17); + this.CHK_08.TabIndex = 10; + this.CHK_08.Text = "08"; + this.CHK_08.UseVisualStyleBackColor = true; + this.CHK_08.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_07 + // + this.CHK_07.AutoSize = true; + this.CHK_07.Location = new System.Drawing.Point(66, 75); + this.CHK_07.Name = "CHK_07"; + this.CHK_07.Size = new System.Drawing.Size(38, 17); + this.CHK_07.TabIndex = 9; + this.CHK_07.Text = "07"; + this.CHK_07.UseVisualStyleBackColor = true; + this.CHK_07.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_06 + // + this.CHK_06.AutoSize = true; + this.CHK_06.Location = new System.Drawing.Point(6, 75); + this.CHK_06.Name = "CHK_06"; + this.CHK_06.Size = new System.Drawing.Size(38, 17); + this.CHK_06.TabIndex = 8; + this.CHK_06.Text = "06"; + this.CHK_06.UseVisualStyleBackColor = true; + this.CHK_06.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_05 + // + this.CHK_05.AutoSize = true; + this.CHK_05.Location = new System.Drawing.Point(216, 19); + this.CHK_05.Name = "CHK_05"; + this.CHK_05.Size = new System.Drawing.Size(38, 17); + this.CHK_05.TabIndex = 7; + this.CHK_05.Text = "05"; + this.CHK_05.UseVisualStyleBackColor = true; + this.CHK_05.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_04 + // + this.CHK_04.AutoSize = true; + this.CHK_04.Location = new System.Drawing.Point(168, 19); + this.CHK_04.Name = "CHK_04"; + this.CHK_04.Size = new System.Drawing.Size(38, 17); + this.CHK_04.TabIndex = 6; + this.CHK_04.Text = "04"; + this.CHK_04.UseVisualStyleBackColor = true; + this.CHK_04.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_03 + // + this.CHK_03.AutoSize = true; + this.CHK_03.Location = new System.Drawing.Point(115, 19); + this.CHK_03.Name = "CHK_03"; + this.CHK_03.Size = new System.Drawing.Size(38, 17); + this.CHK_03.TabIndex = 5; + this.CHK_03.Text = "03"; + this.CHK_03.UseVisualStyleBackColor = true; + this.CHK_03.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_02 + // + this.CHK_02.AutoSize = true; + this.CHK_02.Location = new System.Drawing.Point(66, 19); + this.CHK_02.Name = "CHK_02"; + this.CHK_02.Size = new System.Drawing.Size(38, 17); + this.CHK_02.TabIndex = 4; + this.CHK_02.Text = "02"; + this.CHK_02.UseVisualStyleBackColor = true; + this.CHK_02.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // CHK_01 + // + this.CHK_01.AutoSize = true; + this.CHK_01.Location = new System.Drawing.Point(6, 19); + this.CHK_01.Name = "CHK_01"; + this.CHK_01.Size = new System.Drawing.Size(38, 17); + this.CHK_01.TabIndex = 3; + this.CHK_01.Text = "01"; + this.CHK_01.UseVisualStyleBackColor = true; + this.CHK_01.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // button1 + // + this.button1.AutoSize = true; + this.button1.Location = new System.Drawing.Point(197, 142); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 3; + this.button1.Text = "OK"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.B_OK_Click); + // + // L_Active + // + this.L_Active.AutoSize = true; + this.L_Active.Location = new System.Drawing.Point(12, 147); + this.L_Active.Name = "L_Active"; + this.L_Active.Size = new System.Drawing.Size(106, 13); + this.L_Active.TabIndex = 5; + this.L_Active.Text = "Active Mission Card :"; + // + // NUP_Active + // + this.NUP_Active.Location = new System.Drawing.Point(122, 145); + this.NUP_Active.Maximum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.NUP_Active.Name = "NUP_Active"; + this.NUP_Active.Size = new System.Drawing.Size(43, 20); + this.NUP_Active.TabIndex = 4; + // + // B_Erase + // + this.B_Erase.AutoSize = true; + this.B_Erase.Location = new System.Drawing.Point(197, 9); + this.B_Erase.Name = "B_Erase"; + this.B_Erase.Size = new System.Drawing.Size(75, 23); + this.B_Erase.TabIndex = 6; + this.B_Erase.Text = "Erase All"; + this.B_Erase.UseVisualStyleBackColor = true; + this.B_Erase.Click += new System.EventHandler(this.B_Erase_Click); + // + // Mission_Popup + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(284, 174); + this.Controls.Add(this.B_Erase); + this.Controls.Add(this.L_Active); + this.Controls.Add(this.NUP_Active); + this.Controls.Add(this.button1); + this.Controls.Add(this.GB_States); + this.Controls.Add(this.L_Top); + this.Controls.Add(this.NUP_Mission); + this.MaximumSize = new System.Drawing.Size(300, 213); + this.MinimumSize = new System.Drawing.Size(300, 213); + this.Name = "Mission_Popup"; + this.Text = "Mission_Popup"; + ((System.ComponentModel.ISupportInitialize)(this.NUP_Mission)).EndInit(); + this.GB_States.ResumeLayout(false); + this.GB_States.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Active)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.NumericUpDown NUP_Mission; + private System.Windows.Forms.Label L_Top; + private System.Windows.Forms.GroupBox GB_States; + private System.Windows.Forms.CheckBox CHK_01; + private System.Windows.Forms.CheckBox CHK_10; + private System.Windows.Forms.CheckBox CHK_09; + private System.Windows.Forms.CheckBox CHK_08; + private System.Windows.Forms.CheckBox CHK_07; + private System.Windows.Forms.CheckBox CHK_06; + private System.Windows.Forms.CheckBox CHK_05; + private System.Windows.Forms.CheckBox CHK_04; + private System.Windows.Forms.CheckBox CHK_03; + private System.Windows.Forms.CheckBox CHK_02; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label L_Active; + private System.Windows.Forms.NumericUpDown NUP_Active; + private System.Windows.Forms.Button B_Erase; + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Mission_Popup.cs b/Pokemon Shuffle Save Editor/Mission_Popup.cs new file mode 100644 index 0000000..2fb8187 --- /dev/null +++ b/Pokemon Shuffle Save Editor/Mission_Popup.cs @@ -0,0 +1,81 @@ +using System; +using System.Windows.Forms; +using static Pokemon_Shuffle_Save_Editor.Main; + +namespace Pokemon_Shuffle_Save_Editor +{ + public partial class Mission_Popup : Form + { + public bool[][] retStates { get; private set; } + + public int retActive + { + get { return (int)NUP_Active.Value; } + } + + public Mission_Popup(int active) + { + InitializeComponent(); + StatesInit(); + for (int i = 0; i < retStates.Length; i++) + { + for (int j = 0; j < retStates[i].Length; j++) + { + retStates[i][j] = (((savedata[MissionCards.Ofset(i, j)] >> MissionCards.Shift(i, j)) & 1) == 1); + } + } + NUP_Active.Value = active; + NUP_Mission.Value = (active > 0) ? active : 1; + NUP_Active.Maximum = NUP_Mission.Maximum = db.Missions.Length; + UpdateForm(); + } + + private void UpdateForm() + { + foreach (CheckBox chk in GB_States.Controls) + { + chk.Visible = db.Missions[(int)NUP_Mission.Value - 1][Int32.Parse(chk.Text) - 1]; + chk.Checked = db.Missions[(int)NUP_Mission.Value - 1][Int32.Parse(chk.Text) - 1] && retStates[(int)NUP_Mission.Value - 1][Int32.Parse(chk.Text) - 1]; + } + } + + private void StatesInit() + { + retStates = new bool[db.Missions.Length][]; + for (int i = 0; i < retStates.Length; i++) + retStates[i] = new bool[db.Missions[i].Length]; + } + + protected override bool ProcessDialogKey(Keys keyData) //Allows quit when Esc is pressed + { + if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape) + { + this.Close(); + return true; + } + return base.ProcessDialogKey(keyData); + } + + private void NUP_Mission_ValueChanged(object sender, EventArgs e) + { + UpdateForm(); + } + + private void CheckedChanged(object sender, EventArgs e) + { + retStates[(int)NUP_Mission.Value - 1][Int32.Parse((sender as CheckBox).Text) - 1] = (sender as CheckBox).Checked; + } + + private void B_Erase_Click(object sender, EventArgs e) + { + StatesInit(); + B_OK_Click(sender, e); + } + + private void B_OK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} diff --git a/Pokemon Shuffle Save Editor/Form1.resx b/Pokemon Shuffle Save Editor/Mission_Popup.resx similarity index 100% rename from Pokemon Shuffle Save Editor/Form1.resx rename to Pokemon Shuffle Save Editor/Mission_Popup.resx diff --git a/Pokemon Shuffle Save Editor/NUP_Popup.Designer.cs b/Pokemon Shuffle Save Editor/NUP_Popup.Designer.cs new file mode 100644 index 0000000..874d7f2 --- /dev/null +++ b/Pokemon Shuffle Save Editor/NUP_Popup.Designer.cs @@ -0,0 +1,127 @@ +namespace Pokemon_Shuffle_Save_Editor +{ + partial class NUP_Popup + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.L_Text = new System.Windows.Forms.Label(); + this.NUP_Value = new System.Windows.Forms.NumericUpDown(); + this.L_Range = new System.Windows.Forms.Label(); + this.B_OK = new System.Windows.Forms.Button(); + this.CHK_Value = new System.Windows.Forms.CheckBox(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Value)).BeginInit(); + this.SuspendLayout(); + // + // L_Text + // + this.L_Text.Dock = System.Windows.Forms.DockStyle.Top; + this.L_Text.Location = new System.Drawing.Point(0, 0); + this.L_Text.Name = "L_Text"; + this.L_Text.Size = new System.Drawing.Size(249, 27); + this.L_Text.TabIndex = 0; + this.L_Text.Text = "Select desired value :"; + this.L_Text.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // NUP_Value + // + this.NUP_Value.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUP_Value.Location = new System.Drawing.Point(63, 25); + this.NUP_Value.Maximum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NUP_Value.Name = "NUP_Value"; + this.NUP_Value.Size = new System.Drawing.Size(96, 20); + this.NUP_Value.TabIndex = 1; + // + // L_Range + // + this.L_Range.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.L_Range.AutoSize = true; + this.L_Range.Location = new System.Drawing.Point(165, 27); + this.L_Range.Name = "L_Range"; + this.L_Range.Size = new System.Drawing.Size(34, 13); + this.L_Range.TabIndex = 2; + this.L_Range.Text = "(0 - 0)"; + this.L_Range.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // B_OK + // + this.B_OK.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.B_OK.Location = new System.Drawing.Point(162, 49); + this.B_OK.Name = "B_OK"; + this.B_OK.Size = new System.Drawing.Size(75, 23); + this.B_OK.TabIndex = 3; + this.B_OK.Text = "OK"; + this.B_OK.UseVisualStyleBackColor = true; + this.B_OK.Click += new System.EventHandler(this.B_OK_Click); + // + // CHK_Value + // + this.CHK_Value.AutoSize = true; + this.CHK_Value.Location = new System.Drawing.Point(12, 53); + this.CHK_Value.Name = "CHK_Value"; + this.CHK_Value.Size = new System.Drawing.Size(57, 17); + this.CHK_Value.TabIndex = 4; + this.CHK_Value.Text = "Check"; + this.CHK_Value.UseVisualStyleBackColor = true; + // + // NUP_Popup + // + this.AcceptButton = this.B_OK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(249, 82); + this.Controls.Add(this.CHK_Value); + this.Controls.Add(this.B_OK); + this.Controls.Add(this.L_Range); + this.Controls.Add(this.NUP_Value); + this.Controls.Add(this.L_Text); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "NUP_Popup"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Custom value requested"; + ((System.ComponentModel.ISupportInitialize)(this.NUP_Value)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label L_Text; + private System.Windows.Forms.NumericUpDown NUP_Value; + private System.Windows.Forms.Label L_Range; + private System.Windows.Forms.Button B_OK; + private System.Windows.Forms.CheckBox CHK_Value; + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/NUP_Popup.cs b/Pokemon Shuffle Save Editor/NUP_Popup.cs new file mode 100644 index 0000000..51b3aad --- /dev/null +++ b/Pokemon Shuffle Save Editor/NUP_Popup.cs @@ -0,0 +1,58 @@ +using System; +using System.Windows.Forms; + +namespace Pokemon_Shuffle_Save_Editor +{ + public partial class NUP_Popup : Form + { + public int retVal + { + get { return (int)NUP_Value.Value; } + } + public bool retChk + { + get { return CHK_Value.Checked; } + } + + public NUP_Popup(int min, int max, int def, string str = "value") + { + InitializeComponent(); + B_OK.Location = new System.Drawing.Point(84, 51); + CHK_Value.Visible = false; + L_Text.Text = "Select desired " + str + " :"; + NUP_Value.Minimum = min; + NUP_Value.Maximum = max; + NUP_Value.Value = def; + L_Range.Text = "(" + min + " - " + max + ")"; + } + + public NUP_Popup(int min, int max, int def, bool chkd, string lbl = "value", string chk = "boolean") + { + InitializeComponent(); + B_OK.Location = new System.Drawing.Point(162, 51); + L_Text.Text = "Select desired " + lbl + " :"; + NUP_Value.Minimum = min; + NUP_Value.Maximum = max; + NUP_Value.Value = def; + L_Range.Text = "(" + min + " - " + max + ")"; + CHK_Value.Text = chk; + CHK_Value.Checked = chkd; + } + + protected override bool ProcessDialogKey(Keys keyData) //Allows quit when Esc is pressed + { + if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape) + { + this.Close(); + return true; + } + return base.ProcessDialogKey(keyData); + } + + private void B_OK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/NUP_Popup.resx b/Pokemon Shuffle Save Editor/NUP_Popup.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Pokemon Shuffle Save Editor/NUP_Popup.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Pokathlon_Popup.Designer.cs b/Pokemon Shuffle Save Editor/Pokathlon_Popup.Designer.cs new file mode 100644 index 0000000..6cd79e0 --- /dev/null +++ b/Pokemon Shuffle Save Editor/Pokathlon_Popup.Designer.cs @@ -0,0 +1,244 @@ +namespace Pokemon_Shuffle_Save_Editor +{ + partial class Pokathlon_Popup + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.L_Step = new System.Windows.Forms.Label(); + this.NUP_Step = new System.Windows.Forms.NumericUpDown(); + this.NUP_Moves = new System.Windows.Forms.NumericUpDown(); + this.L_Moves = new System.Windows.Forms.Label(); + this.L_Opponent = new System.Windows.Forms.Label(); + this.PB_Opponent = new System.Windows.Forms.PictureBox(); + this.NUP_Opponent = new System.Windows.Forms.NumericUpDown(); + this.B_OK = new System.Windows.Forms.Button(); + this.B_Random = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.CHK_Paused = new System.Windows.Forms.CheckBox(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Step)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Moves)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Opponent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Opponent)).BeginInit(); + this.SuspendLayout(); + // + // L_Step + // + this.L_Step.AutoSize = true; + this.L_Step.Location = new System.Drawing.Point(12, 9); + this.L_Step.Name = "L_Step"; + this.L_Step.Size = new System.Drawing.Size(35, 13); + this.L_Step.TabIndex = 0; + this.L_Step.Text = "Step :"; + // + // NUP_Step + // + this.NUP_Step.Location = new System.Drawing.Point(15, 24); + this.NUP_Step.Maximum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.NUP_Step.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Step.Name = "NUP_Step"; + this.NUP_Step.Size = new System.Drawing.Size(59, 20); + this.NUP_Step.TabIndex = 1; + this.NUP_Step.Value = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.NUP_Step.ValueChanged += new System.EventHandler(this.ValueChanged); + // + // NUP_Moves + // + this.NUP_Moves.Location = new System.Drawing.Point(110, 24); + this.NUP_Moves.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.NUP_Moves.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Moves.Name = "NUP_Moves"; + this.NUP_Moves.Size = new System.Drawing.Size(59, 20); + this.NUP_Moves.TabIndex = 3; + this.NUP_Moves.Value = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.NUP_Moves.ValueChanged += new System.EventHandler(this.ValueChanged); + // + // L_Moves + // + this.L_Moves.AutoSize = true; + this.L_Moves.Location = new System.Drawing.Point(107, 8); + this.L_Moves.Name = "L_Moves"; + this.L_Moves.Size = new System.Drawing.Size(62, 13); + this.L_Moves.TabIndex = 2; + this.L_Moves.Text = "Moves left :"; + // + // L_Opponent + // + this.L_Opponent.AutoSize = true; + this.L_Opponent.Location = new System.Drawing.Point(12, 58); + this.L_Opponent.Name = "L_Opponent"; + this.L_Opponent.Size = new System.Drawing.Size(85, 13); + this.L_Opponent.TabIndex = 4; + this.L_Opponent.Text = "Next Opponent :"; + // + // PB_Opponent + // + this.PB_Opponent.Location = new System.Drawing.Point(115, 66); + this.PB_Opponent.Name = "PB_Opponent"; + this.PB_Opponent.Size = new System.Drawing.Size(48, 48); + this.PB_Opponent.TabIndex = 29; + this.PB_Opponent.TabStop = false; + // + // NUP_Opponent + // + this.NUP_Opponent.Location = new System.Drawing.Point(15, 74); + this.NUP_Opponent.Maximum = new decimal(new int[] { + 150, + 0, + 0, + 0}); + this.NUP_Opponent.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Opponent.Name = "NUP_Opponent"; + this.NUP_Opponent.Size = new System.Drawing.Size(59, 20); + this.NUP_Opponent.TabIndex = 61; + this.toolTip1.SetToolTip(this.NUP_Opponent, "The numbers are the stage numbers of all Main stages."); + this.NUP_Opponent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUP_Opponent.ValueChanged += new System.EventHandler(this.ValueChanged); + // + // B_OK + // + this.B_OK.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.B_OK.Location = new System.Drawing.Point(88, 132); + this.B_OK.Name = "B_OK"; + this.B_OK.Size = new System.Drawing.Size(75, 23); + this.B_OK.TabIndex = 62; + this.B_OK.Text = "OK"; + this.B_OK.UseVisualStyleBackColor = true; + this.B_OK.Click += new System.EventHandler(this.B_OK_Click); + // + // B_Random + // + this.B_Random.Location = new System.Drawing.Point(15, 99); + this.B_Random.Name = "B_Random"; + this.B_Random.Size = new System.Drawing.Size(59, 23); + this.B_Random.TabIndex = 63; + this.B_Random.Text = "Random"; + this.toolTip1.SetToolTip(this.B_Random, "Click to get a random opponent among the legit ones for that step.\r\n\r\nCtrl + Clic" + + "k to get a random opponent among the first 150 main stages."); + this.B_Random.UseVisualStyleBackColor = true; + this.B_Random.Click += new System.EventHandler(this.B_Random_Click); + // + // toolTip1 + // + this.toolTip1.IsBalloon = true; + this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; + this.toolTip1.ToolTipTitle = "Button description"; + // + // CHK_Paused + // + this.CHK_Paused.AutoSize = true; + this.CHK_Paused.Location = new System.Drawing.Point(15, 136); + this.CHK_Paused.Name = "CHK_Paused"; + this.CHK_Paused.Size = new System.Drawing.Size(65, 17); + this.CHK_Paused.TabIndex = 64; + this.CHK_Paused.Text = "Enabled"; + this.toolTip1.SetToolTip(this.CHK_Paused, "If this is checked, the game will allow you to resume\r\na¨Pokathlon session on nex" + + "t launch."); + this.CHK_Paused.UseVisualStyleBackColor = true; + this.CHK_Paused.CheckedChanged += new System.EventHandler(this.ValueChanged); + // + // Pokathlon_Popup + // + this.AcceptButton = this.B_OK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(181, 167); + this.Controls.Add(this.CHK_Paused); + this.Controls.Add(this.B_Random); + this.Controls.Add(this.B_OK); + this.Controls.Add(this.NUP_Opponent); + this.Controls.Add(this.PB_Opponent); + this.Controls.Add(this.L_Opponent); + this.Controls.Add(this.NUP_Moves); + this.Controls.Add(this.L_Moves); + this.Controls.Add(this.NUP_Step); + this.Controls.Add(this.L_Step); + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(197, 206); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(197, 206); + this.Name = "Pokathlon_Popup"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Pokathlon Editor"; + ((System.ComponentModel.ISupportInitialize)(this.NUP_Step)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Moves)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Opponent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUP_Opponent)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label L_Step; + private System.Windows.Forms.NumericUpDown NUP_Step; + private System.Windows.Forms.NumericUpDown NUP_Moves; + private System.Windows.Forms.Label L_Moves; + private System.Windows.Forms.Label L_Opponent; + private System.Windows.Forms.PictureBox PB_Opponent; + private System.Windows.Forms.NumericUpDown NUP_Opponent; + private System.Windows.Forms.Button B_OK; + private System.Windows.Forms.Button B_Random; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.CheckBox CHK_Paused; + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Pokathlon_Popup.cs b/Pokemon Shuffle Save Editor/Pokathlon_Popup.cs new file mode 100644 index 0000000..00df05e --- /dev/null +++ b/Pokemon Shuffle Save Editor/Pokathlon_Popup.cs @@ -0,0 +1,86 @@ +using System; +using System.Windows.Forms; +using static Pokemon_Shuffle_Save_Editor.Main; +using static Pokemon_Shuffle_Save_Editor.ToolFunctions; + +namespace Pokemon_Shuffle_Save_Editor +{ + public partial class Pokathlon_Popup : Form + { + public bool retEnabled + { + get { return CHK_Paused.Checked; } + } + public int retStep + { + get { return (int)NUP_Step.Value; } + } + public int retMoves + { + get { return (int)NUP_Moves.Value; } + } + public int retOpponent + { + get { return (int)NUP_Opponent.Value; } + } + + public Pokathlon_Popup(int oValue, int mValue, int sValue, int oMin = 1, int mMin = 0, int sMin = 0, int oMax = 400, int mMax = 99, int sMax = 50) + { + InitializeComponent(); + int j = 0; + int[] list = { oValue, mValue, sValue, oMin, mMin, sMin, oMax, mMax, sMax }; + foreach (NumericUpDown nup in new[] { NUP_Opponent, NUP_Moves, NUP_Step }) + { + nup.Minimum = list[3 + j]; + nup.Maximum = list[6 + j]; + nup.Value = list[j]; + j++; + } + UpdateForm(); + CHK_Paused.Checked = (((BitConverter.ToInt16(savedata, 0xB768) >> 7) & 3) == 3); + } + + protected override bool ProcessDialogKey(Keys keyData) //Allows quit when Esc is pressed + { + if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape) + { + this.Close(); + return true; + } + return base.ProcessDialogKey(keyData); + } + + private void ValueChanged(object sender, EventArgs e) + { + UpdateForm(); + } + + private void UpdateForm() + { + B_Random.Visible = ((int)NUP_Step.Value > 0); + PB_Opponent.Image = ResizeImage(GetMonImage(BitConverter.ToInt16(db.StagesMain, 0x50 + BitConverter.ToInt32(db.StagesMain, 0x4) * (int)NUP_Opponent.Value) & 0x3FF), 48, 48); + } + + private void B_OK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void B_Random_Click(object sender, EventArgs e) + { + int min, max; + if (ModifierKeys == Keys.Control) + { + min = (int)NUP_Opponent.Minimum; + max = (int)NUP_Opponent.Maximum; + } + else + { + min = db.PokathlonRand[(int)NUP_Step.Value - 1][0]; + max = db.PokathlonRand[(int)NUP_Step.Value - 1][1] + 1; //Random() never equals its max value, hence max +1 + } + NUP_Opponent.Value = new Random().Next(min, max); + } + } +} \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Pokathlon_Popup.resx b/Pokemon Shuffle Save Editor/Pokathlon_Popup.resx new file mode 100644 index 0000000..69363bf --- /dev/null +++ b/Pokemon Shuffle Save Editor/Pokathlon_Popup.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + + 17, 17 + + + 17, 17 + + \ No newline at end of file diff --git a/Pokemon Shuffle Save Editor/Pokemon Shuffle Save Editor.csproj b/Pokemon Shuffle Save Editor/Pokemon Shuffle Save Editor.csproj index 69e02ef..632aa6b 100644 --- a/Pokemon Shuffle Save Editor/Pokemon Shuffle Save Editor.csproj +++ b/Pokemon Shuffle Save Editor/Pokemon Shuffle Save Editor.csproj @@ -13,6 +13,21 @@ v4.0 Client 512 + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true x86 @@ -33,6 +48,9 @@ prompt 4 + + icon.ico + @@ -52,19 +70,52 @@ Cheats.cs - + + + Form + + + Mission_Popup.cs + + Form - - Form1.cs + + NUP_Popup.cs + + + Form + + + Pokathlon_Popup.cs + + + + Form + + + Main.cs + + Component + + Cheats.cs - - Form1.cs + + Main.cs + + + Mission_Popup.cs + + + NUP_Popup.cs + + + Pokathlon_Popup.cs ResXFileCodeGenerator @@ -86,12 +137,18 @@ True + + + + + + @@ -157,12 +214,16 @@ + + + + @@ -191,6 +252,8 @@ + + @@ -211,6 +274,8 @@ + + @@ -221,6 +286,8 @@ + + @@ -233,18 +300,26 @@ + + + + + + + + @@ -263,6 +338,21 @@ + + + + + + + + + + + + + + + @@ -273,11 +363,15 @@ + + + + @@ -332,6 +426,7 @@ + @@ -351,6 +446,7 @@ + @@ -367,7 +463,9 @@ + + @@ -390,12 +488,15 @@ + + + @@ -414,6 +515,7 @@ + @@ -421,12 +523,17 @@ + + + + + @@ -474,7 +581,9 @@ + + @@ -490,6 +599,7 @@ + @@ -507,6 +617,7 @@ + @@ -517,12 +628,15 @@ + + + @@ -550,6 +664,7 @@ + @@ -566,7 +681,9 @@ + + @@ -576,7 +693,9 @@ + + @@ -629,7 +748,9 @@ + + @@ -654,18 +775,22 @@ + + + + @@ -680,6 +805,7 @@ + @@ -694,11 +820,14 @@ + + + @@ -739,6 +868,7 @@ + @@ -748,6 +878,7 @@ + @@ -775,7 +906,9 @@ + + @@ -799,12 +932,15 @@ + + + @@ -835,6 +971,7 @@ + @@ -850,7 +987,9 @@ + + @@ -888,6 +1027,7 @@ + @@ -927,6 +1067,7 @@ + @@ -975,14 +1116,18 @@ + + + + @@ -1017,11 +1162,13 @@ + + @@ -1050,8 +1197,11 @@ + + + @@ -1069,7 +1219,9 @@ + + @@ -1080,10 +1232,12 @@ + + @@ -1091,10 +1245,37 @@ + + + + + + + + + + + + + False + Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 4.5 + true + +