From d8cd75908ba79d7aa7c312839167a2d7b0dd9f0a Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 24 May 2020 10:46:08 -0700 Subject: [PATCH] Handle gen2 gift egg collision with low hatch cycle req Closes #2824 ty @KR1dude ! change miscverifier to use OT_Friendship instead of CurrentFriendship. --- .../Legality/Encounters/EncounterStatic/EncounterStatic.cs | 2 ++ PKHeX.Core/Legality/Verifiers/MiscVerifier.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic.cs index 4ef7b5424..0b39e9b98 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic.cs @@ -323,6 +323,8 @@ private bool IsMatchEggLocation(PKM pkm, ref int lvl) { if (pkm.Met_Location != 0 && pkm.Met_Level != 0) return false; + if (pkm.OT_Friendship > EggCycles) // Dizzy Punch eggs start with below-normal hatch counters. + return false; } else { diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index 3a90eaae7..c8c2fd2a4 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -208,7 +208,7 @@ private static void VerifyMiscEggCommon(LegalityAnalysis data) var HatchCycles = EncounterMatch is EncounterStatic s ? s.EggCycles : 0; if (HatchCycles == 0) // no value set HatchCycles = pkm.PersonalInfo.HatchCycles; - if (pkm.CurrentFriendship > HatchCycles) + if (pkm.OT_Friendship > HatchCycles) data.AddLine(GetInvalid(LEggHatchCycles, Egg)); if (pkm.Format >= 6 && EncounterMatch is EncounterEgg && !pkm.Moves.SequenceEqual(pkm.RelearnMoves))