diff --git a/PKHeX.Core/Legality/Breeding.cs b/PKHeX.Core/Legality/Breeding.cs index b17dad3fe..60d8d7e25 100644 --- a/PKHeX.Core/Legality/Breeding.cs +++ b/PKHeX.Core/Legality/Breeding.cs @@ -110,14 +110,23 @@ public static bool CanHatchAsEgg(int species, int form, int generation) if (FormInfo.IsTotemForm(species, form, generation)) return false; - if (species == (int)Pichu) - return false; // can't get Spiky Ear Pichu eggs - if (species is (int)Sinistea or (int)Polteageist) - return false; // can't get Antique eggs - return true; + return IsBreedableForm(species, form); } + /// + /// Some species can have forms that cannot exist as egg (event/special forms). Same idea as + /// + /// True if can be bred. + private static bool IsBreedableForm(int species, int form) => species switch + { + (int)Pikachu or (int)Eevee => false, // can't get these forms as egg + (int)Pichu => false, // can't get Spiky Ear Pichu eggs + (int)Floette when form == 5 => false, // can't get Eternal Flower from egg + (int)Sinistea or (int)Polteageist => false, // can't get Antique eggs + _ => true, + }; + /// /// Checks if the - can exist as a hatched egg in the requested . /// @@ -130,6 +139,8 @@ public static bool CanHatchAsEgg(int species, int form, GameVersion game) // Sanity check form for origin var pt = GameData.GetPersonal(game); var entry = pt.GetFormEntry(species, form); + if (entry is PersonalInfoSWSH { IsPresentInGame: false }) + return false; return form < entry.FormCount || (species == (int)Rotom && form <= 5); }