From 504b41f25c5a875ef0edea72acece287778d86fb Mon Sep 17 00:00:00 2001 From: sora10pls Date: Wed, 23 May 2018 15:28:07 -0400 Subject: [PATCH] Add min/max PKM for RSTE --- pk3DS/Subforms/Gen6/RSTE.cs | 57 ++++++-- pk3DS/Subforms/Gen6/TrainerRand.Designer.cs | 140 +++++++++++++++----- pk3DS/Subforms/Gen6/TrainerRand.cs | 2 + 3 files changed, 158 insertions(+), 41 deletions(-) diff --git a/pk3DS/Subforms/Gen6/RSTE.cs b/pk3DS/Subforms/Gen6/RSTE.cs index ec73d3a..f985be5 100644 --- a/pk3DS/Subforms/Gen6/RSTE.cs +++ b/pk3DS/Subforms/Gen6/RSTE.cs @@ -536,7 +536,7 @@ private void Setup() private readonly List Tags = new List(); private readonly Dictionary TagTypes = new Dictionary(); public static int[] sL; // Random Species List - public static decimal rGiftPercent, rLevelMultiplier, rForceFullyEvolvedLevel, rForceHighPowerLevel; + public static decimal rGiftPercent, rLevelMultiplier, rMinPKM, rMaxPKM, rForceFullyEvolvedLevel, rForceHighPowerLevel; private void B_Randomize_Click(object sender, EventArgs e) { rPKM = rMove = rMetronome = rAbility = rDiffAI = rDiffIV = rClass = rGift = rItem = rDoRand = false; // init to false @@ -629,7 +629,8 @@ private void Randomize() Item = rItem || checkBox_Item.Checked }; - InitializeTrainerTeamInfo(t, rImportant[i] == null); + SetMinMaxPKM(t); + SetFullParties(t, rImportant[i] == null); RandomizeTrainerAIClass(t, trClass); RandomizeTrainerPrizeItem(t); RandomizeTeam(t, move, learn, itemvals, type, mevo, typerand); @@ -725,22 +726,58 @@ private static void RandomizeTeam(trdata6 t, MoveRandomizer move, LearnsetRandom } } } - private static void InitializeTrainerTeamInfo(trdata6 t, bool important) + private static void SetMinMaxPKM(trdata6 t) { - // skip the first rival battles + int lastPKM = Math.Max(t.NumPokemon - 1, 0); // 0,1-6 => 0-5 (never is 0) + var avgBST = (int)t.Team.Average(pk => Main.SpeciesStat[pk.Species].BST); + int avgLevel = (int)t.Team.Average(pk => pk.Level); + var pinfo = Main.SpeciesStat.OrderBy(pk => Math.Abs(avgBST - pk.BST)).First(); + int avgSpec = Array.IndexOf(Main.SpeciesStat, pinfo); + + // set minimum pkm, don't modify hordes + if (t.NumPokemon < rMinPKM && t.BattleType != 4) + { + t.NumPokemon = (byte)rMinPKM; + for (int f = lastPKM + 1; f < t.NumPokemon; f++) + { + Array.Resize(ref t.Team, (int)rMinPKM); + t.Team[f] = // clone last pkm, keeping an average level for all new pkm + new trdata6.Pokemon(t.Team[lastPKM].Write(t.Item, t.Moves), t.Item, t.Moves) + { + Species = (ushort)rSpeciesRand.GetRandomSpecies(avgSpec), + Level = (ushort)avgLevel, + }; + } + } + + // set maximum pkm, don't modify hordes + if (t.NumPokemon > rMaxPKM && t.BattleType != 4) + { + Array.Resize(ref t.Team, (int)rMaxPKM); + t.NumPokemon = (byte)rMaxPKM; + } + } + private static void SetFullParties(trdata6 t, bool important) + { + int lastPKM = Math.Max(t.NumPokemon - 1, 0); // 0,1-6 => 0-5 (never is 0) + var avgBST = (int)t.Team.Average(pk => Main.SpeciesStat[pk.Species].BST); + int avgLevel = (int)t.Team.Average(pk => pk.Level); + var pinfo = Main.SpeciesStat.OrderBy(pk => Math.Abs(avgBST - pk.BST)).First(); + int avgSpec = Array.IndexOf(Main.SpeciesStat, pinfo); + + // 6 pkm for important trainers, skip the first rival battles if (!r6PKM || important) return; - - // Copy the last slot to random pokemon - int lastPKM = Math.Max(t.NumPokemon - 1, 0); // 0,1-6 => 0-5 (never is 0) + t.NumPokemon = 6; - Array.Resize(ref t.Team, t.NumPokemon); for (int f = lastPKM + 1; f < t.NumPokemon; f++) { - t.Team[f] = // clone last pkm, keeping an average level for all 6 + Array.Resize(ref t.Team, t.NumPokemon); + t.Team[f] = // clone last pkm, keeping an average level for all new pkm new trdata6.Pokemon(t.Team[lastPKM].Write(t.Item, t.Moves), t.Item, t.Moves) { - Level = t.Team[f - 1].Level + Species = (ushort)rSpeciesRand.GetRandomSpecies(avgSpec), + Level = (ushort)avgLevel, }; } } diff --git a/pk3DS/Subforms/Gen6/TrainerRand.Designer.cs b/pk3DS/Subforms/Gen6/TrainerRand.Designer.cs index 81fc48d..365c385 100644 --- a/pk3DS/Subforms/Gen6/TrainerRand.Designer.cs +++ b/pk3DS/Subforms/Gen6/TrainerRand.Designer.cs @@ -70,6 +70,10 @@ private void InitializeComponent() this.CHK_NoFixedDamage = new System.Windows.Forms.CheckBox(); this.CHK_ForceHighPower = new System.Windows.Forms.CheckBox(); this.NUD_ForceHighPower = new System.Windows.Forms.NumericUpDown(); + this.L_MinPKM = new System.Windows.Forms.Label(); + this.L_MaxPKM = new System.Windows.Forms.Label(); + this.NUD_RMin = new System.Windows.Forms.NumericUpDown(); + this.NUD_RMax = new System.Windows.Forms.NumericUpDown(); ((System.ComponentModel.ISupportInitialize)(this.NUD_GiftPercent)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_Level)).BeginInit(); this.GB_Tweak.SuspendLayout(); @@ -77,6 +81,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_Damage)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_STAB)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_ForceHighPower)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_RMin)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_RMax)).BeginInit(); this.SuspendLayout(); // // CHK_RandomPKM @@ -98,7 +104,7 @@ private void InitializeComponent() this.CHK_RandomItems.AutoSize = true; this.CHK_RandomItems.Checked = true; this.CHK_RandomItems.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_RandomItems.Location = new System.Drawing.Point(21, 324); + this.CHK_RandomItems.Location = new System.Drawing.Point(21, 372); this.CHK_RandomItems.Name = "CHK_RandomItems"; this.CHK_RandomItems.Size = new System.Drawing.Size(119, 17); this.CHK_RandomItems.TabIndex = 6; @@ -111,7 +117,7 @@ private void InitializeComponent() this.CHK_RandomAbilities.AutoSize = true; this.CHK_RandomAbilities.Checked = true; this.CHK_RandomAbilities.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_RandomAbilities.Location = new System.Drawing.Point(21, 339); + this.CHK_RandomAbilities.Location = new System.Drawing.Point(21, 387); this.CHK_RandomAbilities.Name = "CHK_RandomAbilities"; this.CHK_RandomAbilities.Size = new System.Drawing.Size(183, 17); this.CHK_RandomAbilities.TabIndex = 7; @@ -124,7 +130,7 @@ private void InitializeComponent() this.CHK_RandomGift.AutoSize = true; this.CHK_RandomGift.Checked = true; this.CHK_RandomGift.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_RandomGift.Location = new System.Drawing.Point(21, 418); + this.CHK_RandomGift.Location = new System.Drawing.Point(21, 466); this.CHK_RandomGift.Name = "CHK_RandomGift"; this.CHK_RandomGift.Size = new System.Drawing.Size(145, 17); this.CHK_RandomGift.TabIndex = 10; @@ -138,7 +144,7 @@ private void InitializeComponent() this.CHK_RandomClass.AutoSize = true; this.CHK_RandomClass.Checked = true; this.CHK_RandomClass.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_RandomClass.Location = new System.Drawing.Point(21, 371); + this.CHK_RandomClass.Location = new System.Drawing.Point(21, 419); this.CHK_RandomClass.Name = "CHK_RandomClass"; this.CHK_RandomClass.Size = new System.Drawing.Size(141, 17); this.CHK_RandomClass.TabIndex = 9; @@ -152,7 +158,7 @@ private void InitializeComponent() this.CHK_MaxDiffAI.AutoSize = true; this.CHK_MaxDiffAI.Checked = true; this.CHK_MaxDiffAI.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_MaxDiffAI.Location = new System.Drawing.Point(21, 433); + this.CHK_MaxDiffAI.Location = new System.Drawing.Point(21, 481); this.CHK_MaxDiffAI.Name = "CHK_MaxDiffAI"; this.CHK_MaxDiffAI.Size = new System.Drawing.Size(95, 17); this.CHK_MaxDiffAI.TabIndex = 13; @@ -165,7 +171,7 @@ private void InitializeComponent() this.CHK_MaxDiffPKM.AutoSize = true; this.CHK_MaxDiffPKM.Checked = true; this.CHK_MaxDiffPKM.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_MaxDiffPKM.Location = new System.Drawing.Point(21, 354); + this.CHK_MaxDiffPKM.Location = new System.Drawing.Point(21, 402); this.CHK_MaxDiffPKM.Name = "CHK_MaxDiffPKM"; this.CHK_MaxDiffPKM.Size = new System.Drawing.Size(64, 17); this.CHK_MaxDiffPKM.TabIndex = 8; @@ -175,7 +181,7 @@ private void InitializeComponent() // B_OK // this.B_OK.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.B_OK.Location = new System.Drawing.Point(247, 409); + this.B_OK.Location = new System.Drawing.Point(247, 457); this.B_OK.Name = "B_OK"; this.B_OK.Size = new System.Drawing.Size(50, 23); this.B_OK.TabIndex = 14; @@ -186,7 +192,7 @@ private void InitializeComponent() // B_Cancel // this.B_Cancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.B_Cancel.Location = new System.Drawing.Point(247, 431); + this.B_Cancel.Location = new System.Drawing.Point(247, 479); this.B_Cancel.Name = "B_Cancel"; this.B_Cancel.Size = new System.Drawing.Size(50, 23); this.B_Cancel.TabIndex = 15; @@ -197,7 +203,7 @@ private void InitializeComponent() // NUD_GiftPercent // this.NUD_GiftPercent.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.NUD_GiftPercent.Location = new System.Drawing.Point(166, 415); + this.NUD_GiftPercent.Location = new System.Drawing.Point(166, 463); this.NUD_GiftPercent.Name = "NUD_GiftPercent"; this.NUD_GiftPercent.Size = new System.Drawing.Size(43, 20); this.NUD_GiftPercent.TabIndex = 11; @@ -212,7 +218,7 @@ private void InitializeComponent() // this.label1.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(211, 417); + this.label1.Location = new System.Drawing.Point(211, 465); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(15, 13); this.label1.TabIndex = 12; @@ -281,7 +287,7 @@ private void InitializeComponent() this.GB_Tweak.Controls.Add(this.CHK_G1); this.GB_Tweak.Location = new System.Drawing.Point(12, 49); this.GB_Tweak.Name = "GB_Tweak"; - this.GB_Tweak.Size = new System.Drawing.Size(270, 155); + this.GB_Tweak.Size = new System.Drawing.Size(270, 154); this.GB_Tweak.TabIndex = 323; this.GB_Tweak.TabStop = false; this.GB_Tweak.Text = "Options"; @@ -289,7 +295,7 @@ private void InitializeComponent() // NUD_ForceFullyEvolved // this.NUD_ForceFullyEvolved.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.NUD_ForceFullyEvolved.Location = new System.Drawing.Point(168, 98); + this.NUD_ForceFullyEvolved.Location = new System.Drawing.Point(168, 97); this.NUD_ForceFullyEvolved.Name = "NUD_ForceFullyEvolved"; this.NUD_ForceFullyEvolved.Size = new System.Drawing.Size(43, 20); this.NUD_ForceFullyEvolved.TabIndex = 334; @@ -304,7 +310,7 @@ private void InitializeComponent() this.CHK_GymE4Only.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.CHK_GymE4Only.AutoSize = true; this.CHK_GymE4Only.Enabled = false; - this.CHK_GymE4Only.Location = new System.Drawing.Point(141, 133); + this.CHK_GymE4Only.Location = new System.Drawing.Point(141, 132); this.CHK_GymE4Only.Name = "CHK_GymE4Only"; this.CHK_GymE4Only.Size = new System.Drawing.Size(125, 17); this.CHK_GymE4Only.TabIndex = 295; @@ -315,7 +321,7 @@ private void InitializeComponent() // this.CHK_ForceFullyEvolved.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.CHK_ForceFullyEvolved.AutoSize = true; - this.CHK_ForceFullyEvolved.Location = new System.Drawing.Point(9, 100); + this.CHK_ForceFullyEvolved.Location = new System.Drawing.Point(9, 99); this.CHK_ForceFullyEvolved.Name = "CHK_ForceFullyEvolved"; this.CHK_ForceFullyEvolved.Size = new System.Drawing.Size(160, 17); this.CHK_ForceFullyEvolved.TabIndex = 333; @@ -327,7 +333,7 @@ private void InitializeComponent() this.CHK_GymTrainers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.CHK_GymTrainers.AutoSize = true; this.CHK_GymTrainers.Enabled = false; - this.CHK_GymTrainers.Location = new System.Drawing.Point(9, 133); + this.CHK_GymTrainers.Location = new System.Drawing.Point(9, 132); this.CHK_GymTrainers.Name = "CHK_GymTrainers"; this.CHK_GymTrainers.Size = new System.Drawing.Size(124, 17); this.CHK_GymTrainers.TabIndex = 292; @@ -340,7 +346,7 @@ private void InitializeComponent() this.CHK_StoryMEvos.AutoSize = true; this.CHK_StoryMEvos.Checked = true; this.CHK_StoryMEvos.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_StoryMEvos.Location = new System.Drawing.Point(9, 64); + this.CHK_StoryMEvos.Location = new System.Drawing.Point(9, 63); this.CHK_StoryMEvos.Name = "CHK_StoryMEvos"; this.CHK_StoryMEvos.Size = new System.Drawing.Size(168, 17); this.CHK_StoryMEvos.TabIndex = 291; @@ -351,7 +357,7 @@ private void InitializeComponent() // this.CHK_RandomMegaForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.CHK_RandomMegaForm.AutoSize = true; - this.CHK_RandomMegaForm.Location = new System.Drawing.Point(9, 82); + this.CHK_RandomMegaForm.Location = new System.Drawing.Point(9, 81); this.CHK_RandomMegaForm.Name = "CHK_RandomMegaForm"; this.CHK_RandomMegaForm.Size = new System.Drawing.Size(127, 17); this.CHK_RandomMegaForm.TabIndex = 294; @@ -362,7 +368,7 @@ private void InitializeComponent() // this.CHK_TypeTheme.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.CHK_TypeTheme.AutoSize = true; - this.CHK_TypeTheme.Location = new System.Drawing.Point(9, 117); + this.CHK_TypeTheme.Location = new System.Drawing.Point(9, 116); this.CHK_TypeTheme.Name = "CHK_TypeTheme"; this.CHK_TypeTheme.Size = new System.Drawing.Size(127, 17); this.CHK_TypeTheme.TabIndex = 289; @@ -480,7 +486,7 @@ private void InitializeComponent() // this.CHK_6PKM.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.CHK_6PKM.AutoSize = true; - this.CHK_6PKM.Location = new System.Drawing.Point(21, 205); + this.CHK_6PKM.Location = new System.Drawing.Point(21, 207); this.CHK_6PKM.Name = "CHK_6PKM"; this.CHK_6PKM.Size = new System.Drawing.Size(183, 17); this.CHK_6PKM.TabIndex = 293; @@ -494,7 +500,7 @@ private void InitializeComponent() this.CHK_IgnoreSpecialClass.AutoSize = true; this.CHK_IgnoreSpecialClass.Checked = true; this.CHK_IgnoreSpecialClass.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_IgnoreSpecialClass.Location = new System.Drawing.Point(40, 387); + this.CHK_IgnoreSpecialClass.Location = new System.Drawing.Point(40, 435); this.CHK_IgnoreSpecialClass.Name = "CHK_IgnoreSpecialClass"; this.CHK_IgnoreSpecialClass.Size = new System.Drawing.Size(133, 17); this.CHK_IgnoreSpecialClass.TabIndex = 324; @@ -507,7 +513,7 @@ private void InitializeComponent() this.CHK_OnlySingles.AutoSize = true; this.CHK_OnlySingles.Checked = true; this.CHK_OnlySingles.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_OnlySingles.Location = new System.Drawing.Point(40, 401); + this.CHK_OnlySingles.Location = new System.Drawing.Point(40, 449); this.CHK_OnlySingles.Name = "CHK_OnlySingles"; this.CHK_OnlySingles.Size = new System.Drawing.Size(114, 17); this.CHK_OnlySingles.TabIndex = 325; @@ -517,7 +523,7 @@ private void InitializeComponent() // NUD_Damage // this.NUD_Damage.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.NUD_Damage.Location = new System.Drawing.Point(226, 264); + this.NUD_Damage.Location = new System.Drawing.Point(226, 332); this.NUD_Damage.Maximum = new decimal(new int[] { 4, 0, @@ -538,7 +544,7 @@ private void InitializeComponent() this.CHK_Damage.AutoSize = true; this.CHK_Damage.Checked = true; this.CHK_Damage.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_Damage.Location = new System.Drawing.Point(21, 265); + this.CHK_Damage.Location = new System.Drawing.Point(21, 333); this.CHK_Damage.Name = "CHK_Damage"; this.CHK_Damage.Size = new System.Drawing.Size(192, 17); this.CHK_Damage.TabIndex = 327; @@ -551,7 +557,7 @@ private void InitializeComponent() this.CHK_STAB.AutoSize = true; this.CHK_STAB.Checked = true; this.CHK_STAB.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_STAB.Location = new System.Drawing.Point(21, 286); + this.CHK_STAB.Location = new System.Drawing.Point(21, 354); this.CHK_STAB.Name = "CHK_STAB"; this.CHK_STAB.Size = new System.Drawing.Size(172, 17); this.CHK_STAB.TabIndex = 328; @@ -561,7 +567,7 @@ private void InitializeComponent() // NUD_STAB // this.NUD_STAB.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.NUD_STAB.Location = new System.Drawing.Point(226, 285); + this.NUD_STAB.Location = new System.Drawing.Point(226, 353); this.NUD_STAB.Maximum = new decimal(new int[] { 4, 0, @@ -586,7 +592,7 @@ private void InitializeComponent() "Randomize All", "Use Levelup Only", "Metronome Mode"}); - this.CB_Moves.Location = new System.Drawing.Point(67, 223); + this.CB_Moves.Location = new System.Drawing.Point(67, 269); this.CB_Moves.Name = "CB_Moves"; this.CB_Moves.Size = new System.Drawing.Size(135, 21); this.CB_Moves.TabIndex = 330; @@ -596,7 +602,7 @@ private void InitializeComponent() // this.L_Moves.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.L_Moves.AutoSize = true; - this.L_Moves.Location = new System.Drawing.Point(19, 226); + this.L_Moves.Location = new System.Drawing.Point(19, 272); this.L_Moves.Name = "L_Moves"; this.L_Moves.Size = new System.Drawing.Size(42, 13); this.L_Moves.TabIndex = 331; @@ -607,7 +613,7 @@ private void InitializeComponent() this.CHK_NoFixedDamage.AutoSize = true; this.CHK_NoFixedDamage.Checked = true; this.CHK_NoFixedDamage.CheckState = System.Windows.Forms.CheckState.Checked; - this.CHK_NoFixedDamage.Location = new System.Drawing.Point(21, 305); + this.CHK_NoFixedDamage.Location = new System.Drawing.Point(21, 313); this.CHK_NoFixedDamage.Name = "CHK_NoFixedDamage"; this.CHK_NoFixedDamage.Size = new System.Drawing.Size(281, 17); this.CHK_NoFixedDamage.TabIndex = 332; @@ -618,7 +624,7 @@ private void InitializeComponent() // this.CHK_ForceHighPower.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.CHK_ForceHighPower.AutoSize = true; - this.CHK_ForceHighPower.Location = new System.Drawing.Point(21, 245); + this.CHK_ForceHighPower.Location = new System.Drawing.Point(21, 293); this.CHK_ForceHighPower.Name = "CHK_ForceHighPower"; this.CHK_ForceHighPower.Size = new System.Drawing.Size(203, 17); this.CHK_ForceHighPower.TabIndex = 344; @@ -628,7 +634,7 @@ private void InitializeComponent() // NUD_ForceHighPower // this.NUD_ForceHighPower.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.NUD_ForceHighPower.Location = new System.Drawing.Point(226, 243); + this.NUD_ForceHighPower.Location = new System.Drawing.Point(226, 291); this.NUD_ForceHighPower.Minimum = new decimal(new int[] { 1, 0, @@ -643,11 +649,77 @@ private void InitializeComponent() 0, 0}); // + // L_MinPKM + // + this.L_MinPKM.Location = new System.Drawing.Point(5, 224); + this.L_MinPKM.Name = "L_MinPKM"; + this.L_MinPKM.Size = new System.Drawing.Size(60, 20); + this.L_MinPKM.TabIndex = 348; + this.L_MinPKM.Text = "Min PKM:"; + this.L_MinPKM.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_MaxPKM + // + this.L_MaxPKM.Location = new System.Drawing.Point(5, 244); + this.L_MaxPKM.Name = "L_MaxPKM"; + this.L_MaxPKM.Size = new System.Drawing.Size(60, 20); + this.L_MaxPKM.TabIndex = 347; + this.L_MaxPKM.Text = "Max PKM:"; + this.L_MaxPKM.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // NUD_RMin + // + this.NUD_RMin.Location = new System.Drawing.Point(67, 224); + this.NUD_RMin.Maximum = new decimal(new int[] { + 6, + 0, + 0, + 0}); + this.NUD_RMin.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUD_RMin.Name = "NUD_RMin"; + this.NUD_RMin.Size = new System.Drawing.Size(40, 20); + this.NUD_RMin.TabIndex = 346; + this.NUD_RMin.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // NUD_RMax + // + this.NUD_RMax.Location = new System.Drawing.Point(67, 246); + this.NUD_RMax.Maximum = new decimal(new int[] { + 6, + 0, + 0, + 0}); + this.NUD_RMax.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUD_RMax.Name = "NUD_RMax"; + this.NUD_RMax.Size = new System.Drawing.Size(40, 20); + this.NUD_RMax.TabIndex = 345; + this.NUD_RMax.Value = new decimal(new int[] { + 6, + 0, + 0, + 0}); + // // TrainerRand // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(304, 465); + this.ClientSize = new System.Drawing.Size(304, 513); + this.Controls.Add(this.L_MinPKM); + this.Controls.Add(this.L_MaxPKM); + this.Controls.Add(this.NUD_RMin); + this.Controls.Add(this.NUD_RMax); this.Controls.Add(this.CHK_ForceHighPower); this.Controls.Add(this.NUD_ForceHighPower); this.Controls.Add(this.CHK_NoFixedDamage); @@ -689,6 +761,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_Damage)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_STAB)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_ForceHighPower)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_RMin)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_RMax)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -738,5 +812,9 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox CHK_ForceFullyEvolved; private System.Windows.Forms.CheckBox CHK_ForceHighPower; private System.Windows.Forms.NumericUpDown NUD_ForceHighPower; + private System.Windows.Forms.Label L_MinPKM; + private System.Windows.Forms.Label L_MaxPKM; + private System.Windows.Forms.NumericUpDown NUD_RMin; + private System.Windows.Forms.NumericUpDown NUD_RMax; } } \ No newline at end of file diff --git a/pk3DS/Subforms/Gen6/TrainerRand.cs b/pk3DS/Subforms/Gen6/TrainerRand.cs index f02a0de..04096d9 100644 --- a/pk3DS/Subforms/Gen6/TrainerRand.cs +++ b/pk3DS/Subforms/Gen6/TrainerRand.cs @@ -71,6 +71,8 @@ private void B_Save_Click(object sender, EventArgs e) RSTE.rTypeTheme = CHK_TypeTheme.Checked; RSTE.rTypeGymTrainers = CHK_GymTrainers.Checked; RSTE.rGymE4Only = CHK_GymE4Only.Checked; + RSTE.rMinPKM = NUD_RMin.Value; + RSTE.rMaxPKM = NUD_RMax.Value; RSTE.r6PKM = CHK_6PKM.Checked; RSTE.rRandomMegas = CHK_RandomMegaForm.Checked; RSTE.rForceFullyEvolved = CHK_ForceFullyEvolved.Checked;