Merge pull request #1911 from AsparagusEduardo/PE_breedOverrides

Added Egg breeding species overrides.
This commit is contained in:
ghoulslash 2022-07-22 14:05:14 -04:00 committed by GitHub
commit 1260666c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 6 deletions

View File

@ -12,13 +12,14 @@
#define GEN_8 5
#endif
#define P_UPDATED_TYPES GEN_8 // In Gen6+, several Pokémon were changed to be partially or fully Fairy type.
#define P_UPDATED_TYPES GEN_8 // Since Gen 6, several Pokémon were changed to be partially or fully Fairy type.
#define P_UPDATED_STATS GEN_8 // Since Gen 6, Pokémon stats are updated with each passing generation.
#define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. Requires BATTLE_ENGINE for Gen4+ abilities.
#define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups.
#define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball.
#define P_LEGENDARY_PERFECT_IVS GEN_8 // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs.
#define P_KADABRA_EVERSTONE GEN_8 // Since Gen 4, Kadabra can evolve even when holding an Everstone.
#define P_NIDORAN_M_DITTO_BREED GEN_8 // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat.
#define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen.

View File

@ -793,13 +793,25 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
eggSpecies = GetEggSpecies(species[parentSlots[0]]);
if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & EGG_GENDER_MALE)
{
eggSpecies = SPECIES_NIDORAN_M;
}
if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & EGG_GENDER_MALE)
{
else if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & EGG_GENDER_MALE)
eggSpecies = SPECIES_VOLBEAT;
}
#if P_NIDORAN_M_DITTO_BREED >= GEN_5
else if (eggSpecies == SPECIES_NIDORAN_M && !(daycare->offspringPersonality & EGG_GENDER_MALE))
eggSpecies = SPECIES_NIDORAN_F;
else if (eggSpecies == SPECIES_VOLBEAT && !(daycare->offspringPersonality & EGG_GENDER_MALE))
eggSpecies = SPECIES_ILLUMISE;
#endif
else if (eggSpecies == SPECIES_MANAPHY)
eggSpecies = SPECIES_PHIONE;
else if (eggSpecies == SPECIES_SINISTEA_ANTIQUE)
eggSpecies = SPECIES_SINISTEA;
else if (GET_BASE_SPECIES_ID(eggSpecies) == SPECIES_VIVILLON)
eggSpecies = SPECIES_SCATTERBUG;
else if (GET_BASE_SPECIES_ID(eggSpecies) == SPECIES_ROTOM)
eggSpecies = SPECIES_ROTOM;
else if (GET_BASE_SPECIES_ID(eggSpecies) == SPECIES_FURFROU)
eggSpecies = SPECIES_FURFROU;
// Make Ditto the "mother" slot if the other daycare mon is male.
if (species[parentSlots[1]] == SPECIES_DITTO && GetBoxMonGender(&daycare->mons[parentSlots[0]].mon) != MON_FEMALE)