Updated time-of-day-based evolution methods.

This commit is contained in:
Ariel Antonitis 2021-04-24 01:35:19 -04:00
parent 4454a6397b
commit 68e43a8f04

View file

@ -5437,13 +5437,13 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem)
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
case EVO_FRIENDSHIP_DAY:
RtcCalcLocalTime();
if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && friendship >= 220)
UpdateTimeOfDay();
if (gTimeOfDay != TIME_OF_DAY_NIGHT && friendship >= 220)
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
case EVO_FRIENDSHIP_NIGHT:
RtcCalcLocalTime();
if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && friendship >= 220)
UpdateTimeOfDay();
if (gTimeOfDay == TIME_OF_DAY_NIGHT && friendship >= 220)
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
case EVO_LEVEL: