Various BUGFIXes and UBFIXes
This commit is contained in:
@@ -1877,9 +1877,14 @@ static void Cmd_if_has_move_with_effect(void)
|
||||
case AI_TARGET_PARTNER:
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
// UB: checks sBattler_AI instead of gBattlerTarget.
|
||||
// BUG: checks sBattler_AI instead of gBattlerTarget.
|
||||
#ifndef BUGFIX
|
||||
if (gBattleMons[sBattler_AI].moves[i] != 0 && gBattleMoves[BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i]].effect == gAIScriptPtr[2])
|
||||
break;
|
||||
#else
|
||||
if (gBattleMons[gBattlerTarget].moves[i] != 0 && gBattleMoves[BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i]].effect == gAIScriptPtr[2])
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (i == MAX_MON_MOVES)
|
||||
gAIScriptPtr += 7;
|
||||
|
||||
Reference in New Issue
Block a user