Add egg cycle length config (#4596)
This commit is contained in:
parent
1d83ce430c
commit
d811cd1c4c
2 changed files with 2 additions and 1 deletions
|
@ -45,6 +45,7 @@
|
|||
#define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255.
|
||||
#define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen.
|
||||
#define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets.
|
||||
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before.
|
||||
|
||||
// Learnset helper toggles
|
||||
#define P_LEARNSET_HELPER_TEACHABLE TRUE // If TRUE, teachable_learnsets.h will be populated by tools/learnset_helpers/teachable.py using the included JSON files based on available TMs and tutors.
|
||||
|
|
|
@ -1173,7 +1173,7 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
|
|||
}
|
||||
|
||||
// Try to hatch Egg
|
||||
if (++daycare->stepCounter == 255)
|
||||
if (++daycare->stepCounter == ((P_EGG_CYCLE_LENGTH >= GEN_8) ? 127 : 255))
|
||||
{
|
||||
u32 eggCycles;
|
||||
u8 toSub = GetEggCyclesToSubtract();
|
||||
|
|
Loading…
Reference in a new issue