diff --git a/pk3DS/Subforms/Gen6/RSWE.cs b/pk3DS/Subforms/Gen6/RSWE.cs index 40c6ec4..93fca68 100644 --- a/pk3DS/Subforms/Gen6/RSWE.cs +++ b/pk3DS/Subforms/Gen6/RSWE.cs @@ -643,9 +643,8 @@ private void B_Randomize_Click(object sender, EventArgs e) int[] RandomList = new int[cons > 18 ? 18 - cons / 8 : cons]; // Fill Location List - for (int s = 0; s < max.Length; s++) - if (spec[s].SelectedIndex > 0) - RandomList[s] = rand.GetRandomSpecies(spec[s].SelectedIndex); + for (int s = 0; s < RandomList.Length; s++) + RandomList[s] = rand.GetRandomSpecies(spec[s].SelectedIndex); // Assign Slots while (used < RandomList.Distinct().Count() || used > 18) // Can just arbitrarily assign slots. @@ -655,7 +654,7 @@ private void B_Randomize_Click(object sender, EventArgs e) { int slot = slotArray[s]; if (spec[slot].SelectedIndex != 0) // If the slot is in use - list[slot] = rand.GetRandomSpecies(spec[s].SelectedIndex); + list[slot] = RandomList[Util.rand.Next(0, RandomList.Length)]; } used = countUnique(list); if (used != RandomList.Length)