diff --git a/pk3DS/Subforms/Evolution.cs b/pk3DS/Subforms/Evolution.cs index 92ca8cb..a05d258 100644 --- a/pk3DS/Subforms/Evolution.cs +++ b/pk3DS/Subforms/Evolution.cs @@ -169,13 +169,14 @@ private void B_RandAll_Click(object sender, EventArgs e) { // Get a new random species int oldSpecies = rb[j].SelectedIndex; + int currentSpecies = Array.IndexOf(specieslist, CB_Species.Text); int loopctr = 0; // altering calculatiosn to prevent infinite loops defspecies: int newSpecies = Randomizer.getRandomSpecies(ref sL, ref ctr); loopctr++; // Verify it meets specifications - if (newSpecies == CB_Species.SelectedIndex // no A->A evolutions + if (newSpecies == currentSpecies // no A->A evolutions || (newSpecies == oldSpecies && loopctr < 722 * 5)) // prevent runaway calcs { goto defspecies; } if (rEXP) // Experience Growth Rate matches