mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-09-14 05:05:17 -05:00
Merge pull request #256 from sora10pls/master
Add static/gift shiny lock removal option
This commit is contained in:
@@ -53,6 +53,7 @@ private void InitializeComponent()
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.GB_Tweak = new System.Windows.Forms.GroupBox();
|
||||
this.CHK_AllowMega = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_Item = new System.Windows.Forms.CheckBox();
|
||||
this.L_RandOpt = new System.Windows.Forms.Label();
|
||||
this.CHK_BST = new System.Windows.Forms.CheckBox();
|
||||
@@ -66,7 +67,7 @@ private void InitializeComponent()
|
||||
this.CHK_G1 = new System.Windows.Forms.CheckBox();
|
||||
this.NUD_LevelBoost = new System.Windows.Forms.NumericUpDown();
|
||||
this.CHK_Level = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_AllowMega = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_RemoveShinyLock = new System.Windows.Forms.CheckBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Level)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Form)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Ability)).BeginInit();
|
||||
@@ -336,6 +337,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// GB_Tweak
|
||||
//
|
||||
this.GB_Tweak.Controls.Add(this.CHK_RemoveShinyLock);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_AllowMega);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_Item);
|
||||
this.GB_Tweak.Controls.Add(this.L_RandOpt);
|
||||
@@ -350,11 +352,21 @@ private void InitializeComponent()
|
||||
this.GB_Tweak.Controls.Add(this.CHK_G1);
|
||||
this.GB_Tweak.Location = new System.Drawing.Point(7, 58);
|
||||
this.GB_Tweak.Name = "GB_Tweak";
|
||||
this.GB_Tweak.Size = new System.Drawing.Size(258, 114);
|
||||
this.GB_Tweak.Size = new System.Drawing.Size(258, 129);
|
||||
this.GB_Tweak.TabIndex = 509;
|
||||
this.GB_Tweak.TabStop = false;
|
||||
this.GB_Tweak.Text = "Extra Randomization Tweaks";
|
||||
//
|
||||
// CHK_AllowMega
|
||||
//
|
||||
this.CHK_AllowMega.AutoSize = true;
|
||||
this.CHK_AllowMega.Location = new System.Drawing.Point(9, 94);
|
||||
this.CHK_AllowMega.Name = "CHK_AllowMega";
|
||||
this.CHK_AllowMega.Size = new System.Drawing.Size(155, 17);
|
||||
this.CHK_AllowMega.TabIndex = 296;
|
||||
this.CHK_AllowMega.Text = "Allow Random Mega Forms";
|
||||
this.CHK_AllowMega.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CHK_Item
|
||||
//
|
||||
this.CHK_Item.AutoSize = true;
|
||||
@@ -517,15 +529,15 @@ private void InitializeComponent()
|
||||
this.CHK_Level.Text = "Multiply PKM Level by";
|
||||
this.CHK_Level.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CHK_AllowMega
|
||||
// CHK_RemoveShinyLock
|
||||
//
|
||||
this.CHK_AllowMega.AutoSize = true;
|
||||
this.CHK_AllowMega.Location = new System.Drawing.Point(9, 94);
|
||||
this.CHK_AllowMega.Name = "CHK_AllowMega";
|
||||
this.CHK_AllowMega.Size = new System.Drawing.Size(155, 17);
|
||||
this.CHK_AllowMega.TabIndex = 296;
|
||||
this.CHK_AllowMega.Text = "Allow Random Mega Forms";
|
||||
this.CHK_AllowMega.UseVisualStyleBackColor = true;
|
||||
this.CHK_RemoveShinyLock.AutoSize = true;
|
||||
this.CHK_RemoveShinyLock.Location = new System.Drawing.Point(9, 109);
|
||||
this.CHK_RemoveShinyLock.Name = "CHK_RemoveShinyLock";
|
||||
this.CHK_RemoveShinyLock.Size = new System.Drawing.Size(127, 17);
|
||||
this.CHK_RemoveShinyLock.TabIndex = 297;
|
||||
this.CHK_RemoveShinyLock.Text = "Remove Shiny Locks";
|
||||
this.CHK_RemoveShinyLock.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// StaticEncounterEditor6
|
||||
//
|
||||
@@ -601,5 +613,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.CheckBox CHK_G1;
|
||||
private System.Windows.Forms.CheckBox CHK_Item;
|
||||
private System.Windows.Forms.CheckBox CHK_AllowMega;
|
||||
private System.Windows.Forms.CheckBox CHK_RemoveShinyLock;
|
||||
}
|
||||
}
|
||||
@@ -158,6 +158,9 @@ private void B_RandAll_Click(object sender, EventArgs e)
|
||||
|
||||
if (CHK_Level.Checked)
|
||||
NUD_Level.Value = Randomizer.getModifiedLevel((int)NUD_Level.Value, NUD_LevelBoost.Value);
|
||||
|
||||
if (CHK_RemoveShinyLock.Checked)
|
||||
CHK_NoShiny.Checked = false;
|
||||
}
|
||||
WinFormsUtil.Alert("Randomized all Static Encounters according to specification!");
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ private void InitializeComponent()
|
||||
this.CHK_Level = new System.Windows.Forms.CheckBox();
|
||||
this.B_RandAll = new System.Windows.Forms.Button();
|
||||
this.GB_Tweak = new System.Windows.Forms.GroupBox();
|
||||
this.CHK_AllowMega = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_Item = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_G7 = new System.Windows.Forms.CheckBox();
|
||||
this.L_RandOpt = new System.Windows.Forms.Label();
|
||||
@@ -92,7 +93,7 @@ private void InitializeComponent()
|
||||
this.B_Starters = new System.Windows.Forms.Button();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.CHK_AllowMega = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_RemoveShinyLock = new System.Windows.Forms.CheckBox();
|
||||
this.TC_Tabs.SuspendLayout();
|
||||
this.Tab_Gifts.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_GGender)).BeginInit();
|
||||
@@ -644,7 +645,7 @@ private void InitializeComponent()
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.NUD_LevelBoost.Location = new System.Drawing.Point(231, 74);
|
||||
this.NUD_LevelBoost.Location = new System.Drawing.Point(231, 65);
|
||||
this.NUD_LevelBoost.Maximum = new decimal(new int[] {
|
||||
3,
|
||||
0,
|
||||
@@ -664,7 +665,7 @@ private void InitializeComponent()
|
||||
this.CHK_Level.AutoSize = true;
|
||||
this.CHK_Level.Checked = true;
|
||||
this.CHK_Level.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.CHK_Level.Location = new System.Drawing.Point(99, 75);
|
||||
this.CHK_Level.Location = new System.Drawing.Point(99, 66);
|
||||
this.CHK_Level.Name = "CHK_Level";
|
||||
this.CHK_Level.Size = new System.Drawing.Size(130, 17);
|
||||
this.CHK_Level.TabIndex = 510;
|
||||
@@ -683,6 +684,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// GB_Tweak
|
||||
//
|
||||
this.GB_Tweak.Controls.Add(this.CHK_RemoveShinyLock);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_AllowMega);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_Item);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_G7);
|
||||
@@ -696,13 +698,23 @@ private void InitializeComponent()
|
||||
this.GB_Tweak.Controls.Add(this.CHK_G3);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_G2);
|
||||
this.GB_Tweak.Controls.Add(this.CHK_G1);
|
||||
this.GB_Tweak.Location = new System.Drawing.Point(52, 100);
|
||||
this.GB_Tweak.Location = new System.Drawing.Point(52, 91);
|
||||
this.GB_Tweak.Name = "GB_Tweak";
|
||||
this.GB_Tweak.Size = new System.Drawing.Size(258, 130);
|
||||
this.GB_Tweak.Size = new System.Drawing.Size(258, 144);
|
||||
this.GB_Tweak.TabIndex = 508;
|
||||
this.GB_Tweak.TabStop = false;
|
||||
this.GB_Tweak.Text = "Extra Randomization Tweaks";
|
||||
//
|
||||
// CHK_AllowMega
|
||||
//
|
||||
this.CHK_AllowMega.AutoSize = true;
|
||||
this.CHK_AllowMega.Location = new System.Drawing.Point(9, 109);
|
||||
this.CHK_AllowMega.Name = "CHK_AllowMega";
|
||||
this.CHK_AllowMega.Size = new System.Drawing.Size(155, 17);
|
||||
this.CHK_AllowMega.TabIndex = 298;
|
||||
this.CHK_AllowMega.Text = "Allow Random Mega Forms";
|
||||
this.CHK_AllowMega.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CHK_Item
|
||||
//
|
||||
this.CHK_Item.AutoSize = true;
|
||||
@@ -872,15 +884,15 @@ private void InitializeComponent()
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// CHK_AllowMega
|
||||
// CHK_RemoveShinyLock
|
||||
//
|
||||
this.CHK_AllowMega.AutoSize = true;
|
||||
this.CHK_AllowMega.Location = new System.Drawing.Point(9, 109);
|
||||
this.CHK_AllowMega.Name = "CHK_AllowMega";
|
||||
this.CHK_AllowMega.Size = new System.Drawing.Size(155, 17);
|
||||
this.CHK_AllowMega.TabIndex = 298;
|
||||
this.CHK_AllowMega.Text = "Allow Random Mega Forms";
|
||||
this.CHK_AllowMega.UseVisualStyleBackColor = true;
|
||||
this.CHK_RemoveShinyLock.AutoSize = true;
|
||||
this.CHK_RemoveShinyLock.Location = new System.Drawing.Point(9, 124);
|
||||
this.CHK_RemoveShinyLock.Name = "CHK_RemoveShinyLock";
|
||||
this.CHK_RemoveShinyLock.Size = new System.Drawing.Size(127, 17);
|
||||
this.CHK_RemoveShinyLock.TabIndex = 299;
|
||||
this.CHK_RemoveShinyLock.Text = "Remove Shiny Locks";
|
||||
this.CHK_RemoveShinyLock.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// StaticEncounterEditor7
|
||||
//
|
||||
@@ -984,5 +996,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.CheckBox CHK_G_Lock;
|
||||
private System.Windows.Forms.CheckBox CHK_Item;
|
||||
private System.Windows.Forms.CheckBox CHK_AllowMega;
|
||||
private System.Windows.Forms.CheckBox CHK_RemoveShinyLock;
|
||||
}
|
||||
}
|
||||
@@ -349,6 +349,9 @@ private void B_Starters_Click(object sender, EventArgs e)
|
||||
if (CHK_Item.Checked)
|
||||
t.HeldItem = items[Util.rnd32() % items.Length];
|
||||
|
||||
if (CHK_RemoveShinyLock.Checked)
|
||||
t.ShinyLock = false; // in case any user modifications locked the starters
|
||||
|
||||
// no level boosting
|
||||
}
|
||||
|
||||
@@ -382,6 +385,9 @@ private void B_RandAll_Click(object sender, EventArgs e)
|
||||
|
||||
if (CHK_Level.Checked)
|
||||
t.Level = Randomizer.getModifiedLevel(t.Level, NUD_LevelBoost.Value);
|
||||
|
||||
if (CHK_RemoveShinyLock.Checked)
|
||||
t.ShinyLock = false;
|
||||
}
|
||||
foreach (EncounterStatic7 t in Encounters)
|
||||
{
|
||||
@@ -394,6 +400,9 @@ private void B_RandAll_Click(object sender, EventArgs e)
|
||||
|
||||
if (CHK_Level.Checked)
|
||||
t.Level = Randomizer.getModifiedLevel(t.Level, NUD_LevelBoost.Value);
|
||||
|
||||
if (CHK_RemoveShinyLock.Checked)
|
||||
t.ShinyLock = false;
|
||||
}
|
||||
foreach (EncounterTrade7 t in Trades)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user