mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-01 05:16:35 -05:00
Merge branch 'master' of https://github.com/sora10pls/pk3DS
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -98,6 +98,7 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
Shedinja = true,
|
||||
|
||||
rBST = CHK_BST.Checked,
|
||||
rEXP = false,
|
||||
};
|
||||
RSTE.rSpeciesRand.Initialize();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user