mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Clear up misleading egg step name
This commit is contained in:
parent
79a1127122
commit
e27c3d2abd
@ -4,7 +4,7 @@
|
|||||||
void ScriptHatchMon(void);
|
void ScriptHatchMon(void);
|
||||||
bool8 CheckDaycareMonReceivedMail(void);
|
bool8 CheckDaycareMonReceivedMail(void);
|
||||||
void EggHatch(void);
|
void EggHatch(void);
|
||||||
u8 GetEggStepsToSubtract(void);
|
u8 GetEggCyclesToSubtract(void);
|
||||||
u16 CountPartyAliveNonEggMons(void);
|
u16 CountPartyAliveNonEggMons(void);
|
||||||
|
|
||||||
#endif // GUARD_EGG_HATCH_H
|
#endif // GUARD_EGG_HATCH_H
|
||||||
|
@ -892,11 +892,11 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
|
|||||||
TriggerPendingDaycareEgg();
|
TriggerPendingDaycareEgg();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hatch Egg
|
// Try to hatch Egg
|
||||||
if (++daycare->stepCounter == 255)
|
if (++daycare->stepCounter == 255)
|
||||||
{
|
{
|
||||||
u32 steps;
|
u32 eggCycles;
|
||||||
u8 toSub = GetEggStepsToSubtract();
|
u8 toSub = GetEggCyclesToSubtract();
|
||||||
|
|
||||||
for (i = 0; i < gPlayerPartyCount; i++)
|
for (i = 0; i < gPlayerPartyCount; i++)
|
||||||
{
|
{
|
||||||
@ -905,15 +905,15 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
|
|||||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG))
|
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
steps = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
|
eggCycles = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
|
||||||
if (steps != 0)
|
if (eggCycles != 0)
|
||||||
{
|
{
|
||||||
if (steps >= toSub)
|
if (eggCycles >= toSub)
|
||||||
steps -= toSub;
|
eggCycles -= toSub;
|
||||||
else
|
else
|
||||||
steps -= 1;
|
eggCycles -= 1;
|
||||||
|
|
||||||
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &steps);
|
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &eggCycles);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -865,7 +865,7 @@ static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
|||||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 GetEggStepsToSubtract(void)
|
u8 GetEggCyclesToSubtract(void)
|
||||||
{
|
{
|
||||||
u8 count, i;
|
u8 count, i;
|
||||||
for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++)
|
for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user