diff --git a/PKHeX.Core/Legality/LegalityCheckStrings.cs b/PKHeX.Core/Legality/LegalityCheckStrings.cs index f98276273..04544d597 100644 --- a/PKHeX.Core/Legality/LegalityCheckStrings.cs +++ b/PKHeX.Core/Legality/LegalityCheckStrings.cs @@ -106,10 +106,12 @@ namespace PKHeX.Core public static string LEggLocationTrade { get; set; } = "Able to hatch a traded Egg at Met Location."; public static string LEggLocationTradeFail { get; set; } = "Invalid Egg Location, shouldn't be 'traded' while an Egg."; public static string LEggMetLocationFail { get; set; } = "Can't obtain Egg from Egg Location."; + public static string LEggNature { get; set; } = "Eggs cannot have their Stat Nature changed."; public static string LEggPokeathlon { get; set; } = "Eggs cannot have Pokéathlon stats."; public static string LEggPokerus { get; set; } = "Eggs cannot be infected with Pokérus."; public static string LEggPP { get; set; } = "Eggs cannot have modified move PP counts."; public static string LEggPPUp { get; set; } = "Cannot apply PP Ups to an Egg."; + public static string LEggRelearnFlags { get; set; } = "Expected no Relearn Move Flags."; public static string LEggShinyLeaf { get; set; } = "Eggs cannot have Shiny Leaf/Crown."; public static string LEggShinyPokeStar { get; set; } = "Eggs cannot be a Pokéstar Studios star."; public static string LEggSpecies { get; set; } = "Can't obtain Egg for this species."; diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index e94f67875..735f8468c 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -199,6 +199,14 @@ namespace PKHeX.Core var msg = string.Format(LMoveFExpect_0, moves); data.AddLine(GetInvalid(msg, Egg)); } + + if (pkm is PK8 pk8) + { + if (pk8.HasAnyMoveRecordFlag()) + data.AddLine(GetInvalid(LEggRelearnFlags, Egg)); + if (pk8.StatNature != pk8.Nature) + data.AddLine(GetInvalid(LEggNature, Egg)); + } } private static void VerifyFatefulMysteryGift(LegalityAnalysis data, MysteryGift g) diff --git a/PKHeX.Core/PKM/PK8.cs b/PKHeX.Core/PKM/PK8.cs index e6b49ae48..934b99556 100644 --- a/PKHeX.Core/PKM/PK8.cs +++ b/PKHeX.Core/PKM/PK8.cs @@ -548,6 +548,14 @@ namespace PKHeX.Core FlagUtil.SetFlag(Data, 0x127 + ofs, index & 7, value); } + public bool HasAnyMoveRecordFlag() + { + for (int i = 0x127; i < 0x127 + 14; i++) + if (Data[i] != 0) + return true; + return false; + } + public byte GetFromArrayD1(int index) { if ((uint)index >= 19)