Add MOD to match mod with powers of 2
This commit is contained in:
@@ -326,7 +326,7 @@ u8 ContestAI_GetActionToUse(void)
|
||||
{
|
||||
// Randomly choose a move index. If it's the move
|
||||
// with the highest (or tied highest) score, return
|
||||
u8 moveIdx = Random() & (MAX_MON_MOVES - 1); // % MAX_MON_MOVES doesn't match
|
||||
u8 moveIdx = MOD(Random(), MAX_MON_MOVES);
|
||||
u8 score = eContestAI.moveScores[moveIdx];
|
||||
int i;
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
|
||||
Reference in New Issue
Block a user