fix: MSG_COND_TIME_OF_DAY now checks whether map is outdoors and not raining

This commit is contained in:
Ariel A 2024-06-25 01:38:52 -04:00
parent d410ca6999
commit e899218dfb

View File

@ -2158,7 +2158,9 @@ bool32 CheckMsgCondition(const struct MsgCondition *cond, struct Pokemon *mon, u
case MSG_COND_MUSIC:
return (cond->data.raw == GetCurrentMapMusic());
case MSG_COND_TIME_OF_DAY:
return (cond->data.raw == gTimeOfDay);
// Must match time of day, have natural light on the map,
// and not have weather that obscures the sky
return (cond->data.raw == gTimeOfDay && MapHasNaturalLight(gMapHeader.mapType) && GetCurrentWeather() < WEATHER_RAIN);
case MSG_COND_NEAR_MB:
multi = FindMetatileBehaviorWithinRange(
obj->currentCoords.x, obj->currentCoords.y,