Shuffle learnset STAB with others

closes #217
This commit is contained in:
Kurt
2017-10-15 14:02:58 -07:00
parent 10e202de1a
commit 46c38698c7

View File

@@ -85,7 +85,11 @@ private int[] GetRandomMoves(int count, int index)
if (count == 0)
return moves;
moves[0] = STABFirst ? moverand.GetRandomFirstMove(index) : moverand.GetRandomFirstMoveAny();
moverand.GetRandomLearnset(index, count - 1).CopyTo(moves, 1);
var rand = moverand.GetRandomLearnset(index, count - 1);
// STAB Moves (if requested) come first; randomize the order of moves
Util.Shuffle(rand);
rand.CopyTo(moves, 1);
return moves;
}