fix AI_WeatherHasEffect

This commit is contained in:
Evan 2021-01-15 21:29:39 -07:00
parent 44a124acb7
commit 24b19eb9a4

View file

@ -1130,16 +1130,16 @@ bool32 AI_WeatherHasEffect(void)
{ {
u32 i; u32 i;
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_NEGATE_UNAWARE) if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_NEGATE_UNAWARE)
return FALSE; // AI doesn't understand weather supression (handicap) return TRUE; // AI doesn't understand weather supression (handicap)
// need to manually check since we don't necessarily know opponent ability // need to manually check since we don't necessarily know opponent ability
for (i = 0; i < gBattlersCount; i++) for (i = 0; i < gBattlersCount; i++)
{ {
if (IsBattlerAlive(i) if (IsBattlerAlive(i)
&& (AI_GetAbility(i) == ABILITY_AIR_LOCK || AI_GetAbility(i) == ABILITY_CLOUD_NINE)) && (AI_GetAbility(i) == ABILITY_AIR_LOCK || AI_GetAbility(i) == ABILITY_CLOUD_NINE))
return TRUE;
}
return FALSE; return FALSE;
}
return TRUE;
} }
bool32 IsAromaVeilProtectedMove(u16 move) bool32 IsAromaVeilProtectedMove(u16 move)