diff options
author | camthesaxman <cameronghall@cox.net> | 2017-07-22 18:32:30 -0500 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-07-22 18:49:23 -0500 |
commit | f5e9d5be6051c12558e51d5841afe32034bfe98a (patch) | |
tree | 3bc934a4819c51fef19194c92bf6382d4ad874e8 /src/battle_ai.c | |
parent | 5891cedc1bf4c9c95d60e5118c2809895d6191a5 (diff) |
various fixes before merge
Diffstat (limited to 'src/battle_ai.c')
-rw-r--r-- | src/battle_ai.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/battle_ai.c b/src/battle_ai.c index 4206e8f83..a1cb805d9 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -31,6 +31,14 @@ extern u8 gCritMultiplier; extern u16 gTrainerBattleOpponent; extern u8 *BattleAIs[]; +enum +{ + WEATHER_TYPE_SUN, + WEATHER_TYPE_RAIN, + WEATHER_TYPE_SANDSTORM, + WEATHER_TYPE_HAIL, +}; + /* gAIScriptPtr is a pointer to the next battle AI cmd command to read. when a command finishes processing, gAIScriptPtr is incremented by @@ -1562,14 +1570,14 @@ static void BattleAICmd_if_status_not_in_party(void) static void BattleAICmd_get_weather(void) { - if (gBattleWeather & WEATHER_RAINY) - AI_THINKING_STRUCT->funcResult = WEATHER_RAIN; - if (gBattleWeather & WEATHER_SANDSTORMY) - AI_THINKING_STRUCT->funcResult = WEATHER_SANDSTORM; - if (gBattleWeather & WEATHER_SUNNY) - AI_THINKING_STRUCT->funcResult = WEATHER_SUN; - if (gBattleWeather & weather_hail) - AI_THINKING_STRUCT->funcResult = WEATHER_HAIL; + if (gBattleWeather & WEATHER_RAIN_ANY) + AI_THINKING_STRUCT->funcResult = WEATHER_TYPE_RAIN; + if (gBattleWeather & WEATHER_SANDSTORM_ANY) + AI_THINKING_STRUCT->funcResult = WEATHER_TYPE_SANDSTORM; + if (gBattleWeather & WEATHER_SUN_ANY) + AI_THINKING_STRUCT->funcResult = WEATHER_TYPE_SUN; + if (gBattleWeather & WEATHER_HAIL) + AI_THINKING_STRUCT->funcResult = WEATHER_TYPE_HAIL; gAIScriptPtr += 1; } |