From 882c5529e02ab50269a206780c385a81a3b22c28 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 11 Dec 2023 19:17:27 -0300 Subject: [PATCH] Removed redundant call to GetTimeOfDay for Dusk Ball effect (#3701) --- src/battle_script_commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 67f1c1355b..de6da180b0 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14841,7 +14841,8 @@ static void Cmd_handleballthrow(void) ballMultiplier = 400; break; case ITEM_DUSK_BALL: - if ((GetTimeOfDay() == TIME_EVENING || GetTimeOfDay() == TIME_NIGHT) || gMapHeader.cave || gMapHeader.mapType == MAP_TYPE_UNDERGROUND) + i = GetTimeOfDay(); + if (i == TIME_EVENING || i == TIME_NIGHT || gMapHeader.cave || gMapHeader.mapType == MAP_TYPE_UNDERGROUND) ballMultiplier = (B_DUSK_BALL_MODIFIER >= GEN_7 ? 300 : 350); break; case ITEM_QUICK_BALL: