Use BUGFIX for some inline fixes
This commit is contained in:
+8
-2
@@ -1734,8 +1734,9 @@ static void ContestAICmd_if_user_doesnt_have_exciting_move(void)
|
||||
// they're checking for an effect. Checking for a specific effect would make more sense,
|
||||
// but given that effects are normally read as a single byte and this reads 2 bytes, it
|
||||
// seems reading a move was intended and the AI script is using it incorrectly.
|
||||
// In any case, to fix it to correctly check for effects replace the u16 move assignment with
|
||||
// u16 move = gContestMoves[gContestMons[eContestAI.contestantId].moves[i]].effect;
|
||||
// The fix below aligns the function with how it's used by the script, rather than the apparent
|
||||
// intention of its usage
|
||||
|
||||
static void ContestAICmd_check_user_has_move(void)
|
||||
{
|
||||
int hasMove = FALSE;
|
||||
@@ -1744,7 +1745,12 @@ static void ContestAICmd_check_user_has_move(void)
|
||||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
#ifdef BUGFIX
|
||||
u16 move = gContestMoves[gContestMons[eContestAI.contestantId].moves[i]].effect;
|
||||
#else
|
||||
u16 move = gContestMons[eContestAI.contestantId].moves[i];
|
||||
#endif
|
||||
|
||||
if (move == targetMove)
|
||||
{
|
||||
hasMove = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user