From 8bf250ff5ae5e4bdc8d925e5a539cfee52b6c8c8 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 31 Dec 2020 17:16:28 -0800 Subject: [PATCH] Update EncounterEggGenerator.cs --- .../Encounters/Generator/EncounterEggGenerator.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/Generator/EncounterEggGenerator.cs b/PKHeX.Core/Legality/Encounters/Generator/EncounterEggGenerator.cs index d6c5d8ecf..0655e12b1 100644 --- a/PKHeX.Core/Legality/Encounters/Generator/EncounterEggGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/Generator/EncounterEggGenerator.cs @@ -22,8 +22,8 @@ public static IEnumerable GenerateEggs(PKM pkm, IReadOnlyList GenerateEggs(PKM pkm, bool all = false) public static IEnumerable GenerateEggs(PKM pkm, IReadOnlyList chain, bool all = false) { + int species = pkm.Species; + if (NoHatchFromEgg.Contains(species)) + yield break; + var canBeEgg = all || GetCanBeEgg(pkm); if (!canBeEgg) yield break; @@ -117,7 +121,9 @@ public static IEnumerable GenerateEggs(PKM pkm, IReadOnlyList MaxSpeciesID_2) + yield break; if (ParseSettings.AllowGen2Crystal(pkm)) yield return new EncounterEgg(species, 0, 5, 2, GameVersion.C); // gen2 egg yield return new EncounterEgg(species, 0, 5, 2, GameVersion.GS); // gen2 egg @@ -125,7 +131,7 @@ public static IEnumerable GenerateEggs(PKM pkm, IReadOnlyList