diff --git a/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs b/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs index b39981964..1946240cd 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs @@ -231,11 +231,15 @@ public sealed record EncounterSlot8GO(int StartDate, int EndDate, ushort Species return EncounterMatchRating.PartialMatch; if (Species is (int)Farfetchd && IsReallySirfetchd(pk)) return EncounterMatchRating.DeferredErrors; + if (pk is ITeraType ro && IsTeraTypeMismatch(ro.TeraTypeOriginal, PersonalTable.SV[Species, Form])) + return EncounterMatchRating.DeferredErrors; if (!this.GetIVsValid(pk)) return EncounterMatchRating.Deferred; return EncounterMatchRating.Match; } + private static bool IsTeraTypeMismatch(MoveType original, PersonalInfo9SV pi) => original != TeraTypeUtil.GetTeraTypeImport(pi.Type1, pi.Type2); + /// /// Checks if a Farfetch'd was originally a Sirfetch'd. /// @@ -250,8 +254,8 @@ public sealed record EncounterSlot8GO(int StartDate, int EndDate, ushort Species return false; // can't tell if it was originally Farfetch'd Span name = stackalloc char[pk.TrashCharCountNickname]; - pk.LoadString(pk.NicknameTrash, name); - return name is "Sirfetch'd"; // only way to get the bad apostrophe is to originate in HOME with it. + int length = pk.LoadString(pk.NicknameTrash, name); + return name[..length] is "Sirfetch'd"; // only way to get the bad apostrophe is to originate in HOME with it. } public byte OriginalTrainerFriendship => Species switch