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; targetSpecies = gEvolutionTable[species][i].targetSpecies;
break; break;
case EVO_FRIENDSHIP_DAY: case EVO_FRIENDSHIP_DAY:
RtcCalcLocalTime(); UpdateTimeOfDay();
if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && friendship >= 220) if (gTimeOfDay != TIME_OF_DAY_NIGHT && friendship >= 220)
targetSpecies = gEvolutionTable[species][i].targetSpecies; targetSpecies = gEvolutionTable[species][i].targetSpecies;
break; break;
case EVO_FRIENDSHIP_NIGHT: case EVO_FRIENDSHIP_NIGHT:
RtcCalcLocalTime(); UpdateTimeOfDay();
if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && friendship >= 220) if (gTimeOfDay == TIME_OF_DAY_NIGHT && friendship >= 220)
targetSpecies = gEvolutionTable[species][i].targetSpecies; targetSpecies = gEvolutionTable[species][i].targetSpecies;
break; break;
case EVO_LEVEL: case EVO_LEVEL: