diff --git a/PKHeX.Core/Legality/Encounters/EncounterSlot/EncounterSlot8a.cs b/PKHeX.Core/Legality/Encounters/EncounterSlot/EncounterSlot8a.cs index dbb0c9c27..1cbba6d22 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterSlot/EncounterSlot8a.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterSlot/EncounterSlot8a.cs @@ -57,16 +57,22 @@ public sealed record EncounterSlot8a : EncounterSlot, IAlpha public override EncounterMatchRating GetMatchRating(PKM pkm) { - if (pkm is IAlpha a && a.IsAlpha != IsAlpha) - return EncounterMatchRating.DeferredErrors; if (Gender is not Gender.Random && pkm.Gender != (int)Gender) + return EncounterMatchRating.PartialMatch; + + var result = GetMatchRatingInternal(pkm); + var orig = base.GetMatchRating(pkm); + return result > orig ? result : orig; + } + + private EncounterMatchRating GetMatchRatingInternal(PKM pkm) + { + if (pkm is IAlpha a && a.IsAlpha != IsAlpha) return EncounterMatchRating.DeferredErrors; if (FlawlessIVCount is not 0 && pkm.FlawlessIVCount < FlawlessIVCount) return EncounterMatchRating.DeferredErrors; - var result = GetAlphaMoveCompatibility(pkm); - var orig = base.GetMatchRating(pkm); - return result > orig ? result : orig; + return GetAlphaMoveCompatibility(pkm); } private EncounterMatchRating GetAlphaMoveCompatibility(PKM pkm) diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic8a.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic8a.cs index 667eb1912..2323bcb3c 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic8a.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic8a.cs @@ -93,15 +93,22 @@ public sealed record EncounterStatic8a(GameVersion Version) : EncounterStatic(Ve } public override EncounterMatchRating GetMatchRating(PKM pkm) + { + if (!IsForcedMasteryCorrect(pkm)) + return EncounterMatchRating.PartialMatch; + + var result = GetMatchRatingInternal(pkm); + var orig = base.GetMatchRating(pkm); + return result > orig ? result : orig; + } + + private EncounterMatchRating GetMatchRatingInternal(PKM pkm) { if (Shiny != Shiny.Random && !Shiny.IsValid(pkm)) return EncounterMatchRating.DeferredErrors; if (Gift && pkm.Ball != Ball) return EncounterMatchRating.DeferredErrors; - if (!IsForcedMasteryCorrect(pkm)) - return EncounterMatchRating.PartialMatch; - var orig = base.GetMatchRating(pkm); if (orig is not EncounterMatchRating.Match) return orig;