Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public int GetRandomFirstMoveAny()
 {
     first.Reset();
     return(first.Next());
 }