From e899218dfb0be7168f1d3ca31bddea3af5d5384f Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Tue, 25 Jun 2024 01:38:52 -0400 Subject: [PATCH] fix: MSG_COND_TIME_OF_DAY now checks whether map is outdoors and not raining --- src/event_object_movement.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 39f81f4681..878aeac807 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -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,