diff --git a/pk3DS.Core/Randomizers/SpeciesRandomizer.cs b/pk3DS.Core/Randomizers/SpeciesRandomizer.cs index 686819a..20cc884 100644 --- a/pk3DS.Core/Randomizers/SpeciesRandomizer.cs +++ b/pk3DS.Core/Randomizers/SpeciesRandomizer.cs @@ -73,7 +73,7 @@ public int GetRandomSpeciesType(int oldSpecies, int type) loopctr++; return newSpecies; } - private bool GetIsTypeMatch(int newSpecies, int type) => SpeciesStat[newSpecies].Types.Any(z => z == type) || loopctr > 9000; + private bool GetIsTypeMatch(int newSpecies, int type) => type == -1 || SpeciesStat[newSpecies].Types.Any(z => z == type) || loopctr > 9000; public int GetRandomSpecies(int oldSpecies) { @@ -118,11 +118,11 @@ private bool IsSpeciesBSTBad(PersonalInfo oldpkm, PersonalInfo pkm) { if (!rBST) return false; - // Base stat total has to be close + // Base stat total has to be close to original BST int expand = loopctr / MaxSpeciesID; - int lo = pkm.BST * l / (h + expand); - int hi = pkm.BST * (h + expand) / l; - return lo > oldpkm.BST || oldpkm.BST > hi; + int lo = oldpkm.BST * l / (h + expand); + int hi = oldpkm.BST * (h + expand) / l; + return lo > pkm.BST || pkm.BST > hi; } private int[] InitializeSpeciesList() diff --git a/pk3DS/Subforms/Gen6/TrainerRand.cs b/pk3DS/Subforms/Gen6/TrainerRand.cs index 1211017..0222b50 100644 --- a/pk3DS/Subforms/Gen6/TrainerRand.cs +++ b/pk3DS/Subforms/Gen6/TrainerRand.cs @@ -98,6 +98,7 @@ private void B_Save_Click(object sender, EventArgs e) Shedinja = true, rBST = CHK_BST.Checked, + rEXP = false, }; RSTE.rSpeciesRand.Initialize(); diff --git a/pk3DS/Subforms/Gen7/SMTE.cs b/pk3DS/Subforms/Gen7/SMTE.cs index 03f3891..17205c2 100644 --- a/pk3DS/Subforms/Gen7/SMTE.cs +++ b/pk3DS/Subforms/Gen7/SMTE.cs @@ -592,6 +592,7 @@ private void B_Randomize_Click(object sender, EventArgs e) E = CHK_E.Checked, L = CHK_L.Checked, rBST = CHK_BST.Checked, + rEXP = false, }; rnd.Initialize();