private int[] GetRandomMoves(int[] Types, int movecount = 4) { int i = 0; int[] moves = new int[movecount]; if (rSTAB) { for (; i < rSTABCount; i++) { moves[i] = GetRandomSTABMove(Types); } } for (; i < moves.Length; i++) // remainder of moves { moves[i] = RandMove.Next(); } return(moves); }
public int GetRandomFirstMove(int[] types) { first.Reset(); int ctr = 0; int move; do { move = first.Next(); if (++ctr == firstMoves.Length) { return(move); } } while (!types.Contains(MoveData[move].Type)); return(move); }
private bool GetNewSpecies(int currentSpecies, PersonalInfo oldpkm, out int newSpecies) { newSpecies = RandSpec.Next(); PersonalInfo pkm = SpeciesStat[newSpecies]; // Verify it meets specifications if (IsSpeciesReplacementBad(newSpecies, currentSpecies)) // no A->A randomization { return(false); } if (IsSpeciesEXPRateBad(oldpkm, pkm)) { return(false); } if (IsSpeciesTypeBad(oldpkm, pkm)) { return(false); } if (IsSpeciesBSTBad(oldpkm, pkm)) { return(false); } return(true); }
public int GetRandomFirstMoveAny() { first.Reset(); return(first.Next()); }