From 070f9ce4e1f99812327db1e3a987b6cab1781089 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 17 Jan 2025 20:07:48 -0300 Subject: [PATCH] Made MSG_COND_TIME_OF_DAY clearer --- src/event_object_movement.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 7ea2491ec7..edac91fcf5 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -2391,9 +2391,14 @@ 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: + { // 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); + u32 weather = GetCurrentWeather(); + return (cond->data.raw == gTimeOfDay + && MapHasNaturalLight(gMapHeader.mapType) + && (weather == WEATHER_NONE || weather == WEATHER_SUNNY_CLOUDS || weather == WEATHER_SUNNY)); + } case MSG_COND_NEAR_MB: multi = FindMetatileBehaviorWithinRange(obj->currentCoords.x, obj->currentCoords.y,