Clean up time of day code (#3585)
This commit is contained in:
commit
34c608724d
@ -14878,8 +14878,7 @@ static void Cmd_handleballthrow(void)
|
||||
ballMultiplier = 400;
|
||||
break;
|
||||
case ITEM_DUSK_BALL:
|
||||
RtcCalcLocalTime();
|
||||
if ((gLocalTime.hours >= 20 && gLocalTime.hours <= 3) || gMapHeader.cave || gMapHeader.mapType == MAP_TYPE_UNDERGROUND)
|
||||
if ((GetTimeOfDay() == TIME_DUSK || GetTimeOfDay() == TIME_NIGHT) || gMapHeader.cave || gMapHeader.mapType == MAP_TYPE_UNDERGROUND)
|
||||
ballMultiplier = (B_DUSK_BALL_MODIFIER >= GEN_7 ? 300 : 350);
|
||||
break;
|
||||
case ITEM_QUICK_BALL:
|
||||
|
||||
@ -9072,13 +9072,11 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32
|
||||
switch (formChanges[i].param1)
|
||||
{
|
||||
case DAY:
|
||||
RtcCalcLocalTime();
|
||||
if (gLocalTime.hours >= DAY_EVO_HOUR_BEGIN && gLocalTime.hours < DAY_EVO_HOUR_END)
|
||||
if (GetTimeOfDay() != TIME_NIGHT)
|
||||
targetSpecies = formChanges[i].targetSpecies;
|
||||
break;
|
||||
case NIGHT:
|
||||
RtcCalcLocalTime();
|
||||
if (gLocalTime.hours >= NIGHT_EVO_HOUR_BEGIN && gLocalTime.hours < NIGHT_EVO_HOUR_END)
|
||||
if (GetTimeOfDay() == TIME_NIGHT)
|
||||
targetSpecies = formChanges[i].targetSpecies;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user