weather ball anim checks utility umbrella

This commit is contained in:
ghoulslash 2021-10-30 09:48:23 -04:00
parent ee7b63e372
commit a461823cbf

View file

@ -22,6 +22,7 @@
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/weather.h"
#include "constants/hold_effects.h"
extern const struct SpriteTemplate gThoughtBubbleSpriteTemplate;
@ -5526,10 +5527,12 @@ static void AnimRecycle_Step(struct Sprite *sprite)
void AnimTask_GetWeather(u8 taskId)
{
bool32 utilityUmbrellaAffected = GetBattlerHoldEffect(gBattleAnimAttacker, TRUE) == HOLD_EFFECT_UTILITY_UMBRELLA;
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_NONE;
if (gWeatherMoveAnim & WEATHER_SUN_ANY)
if (gWeatherMoveAnim & WEATHER_SUN_ANY && !utilityUmbrellaAffected)
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SUN;
else if (gWeatherMoveAnim & WEATHER_RAIN_ANY)
else if (gWeatherMoveAnim & WEATHER_RAIN_ANY && !utilityUmbrellaAffected)
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_RAIN;
else if (gWeatherMoveAnim & WEATHER_SANDSTORM_ANY)
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SANDSTORM;