diff --git a/PKHeX.Core/Legality/Checks.cs b/PKHeX.Core/Legality/Checks.cs index d5a211cda..58b3672cb 100644 --- a/PKHeX.Core/Legality/Checks.cs +++ b/PKHeX.Core/Legality/Checks.cs @@ -1996,6 +1996,13 @@ namespace PKHeX.Core AddLine(Severity.Invalid, V320, CheckIdentifier.Egg); if (pkm.Format == 2 && (pkm.PKRS_Cured || pkm.PKRS_Infected)) AddLine(Severity.Invalid, V368, CheckIdentifier.Egg); + if (pkm is PK4 pk4) + { + if (pk4.ShinyLeaf != 0) + AddLine(Severity.Invalid, V414, CheckIdentifier.Egg); + if (pk4.PokéathlonStat != 0) + AddLine(Severity.Invalid, V415, CheckIdentifier.Egg); + } var HatchCycles = (EncounterMatch as EncounterStatic)?.EggCycles; if (HatchCycles == 0 || HatchCycles == null) diff --git a/PKHeX.Core/Legality/LegalityCheckStrings.cs b/PKHeX.Core/Legality/LegalityCheckStrings.cs index aee60e0ee..32e8f1b85 100644 --- a/PKHeX.Core/Legality/LegalityCheckStrings.cs +++ b/PKHeX.Core/Legality/LegalityCheckStrings.cs @@ -407,6 +407,8 @@ namespace PKHeX.Core public static string V410 {get; set;} = "Mystery Gift fixed PID mismatch."; public static string V411 {get; set;} = "Encounter Type PID mismatch."; public static string V412 {get; set;} = "Non-tradeback pre evolution move. Incompatible with Generation 1 exclusive moves."; + public static string V414 {get; set;} = "Eggs can not have Shiny Leaf/Crown."; // Invalid + public static string V415 {get; set;} = "Eggs can not have Pokéathlon stats."; // Invalid #endregion } diff --git a/PKHeX.Core/PKM/PK4.cs b/PKHeX.Core/PKM/PK4.cs index ad507f093..d56e40773 100644 --- a/PKHeX.Core/PKM/PK4.cs +++ b/PKHeX.Core/PKM/PK4.cs @@ -311,6 +311,7 @@ namespace PKHeX.Core public override int Met_Level { get => Data[0x84] & ~0x80; set => Data[0x84] = (byte)((Data[0x84] & 0x80) | value); } public override int OT_Gender { get => Data[0x84] >> 7; set => Data[0x84] = (byte)((Data[0x84] & ~0x80) | value << 7); } public override int EncounterType { get => Data[0x85]; set => Data[0x85] = (byte)value; } + public int PokéathlonStat { get => Data[0x87]; set => Data[0x87] = (byte)value; } // Unused 0x87 #endregion diff --git a/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt b/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt index 81ea37865..ee1a48332 100644 --- a/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt +++ b/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt @@ -342,4 +342,7 @@ V408 = Female OT from Generation 1/2 is invalid. V409 = Mystery Gift shiny mismatch. V410 = Mystery Gift fixed PID mismatch. V411 = Encounter Type PID mismatch. -V412 = Non-tradeback pre evolution move. Incompatible with Generation 1 exclusive moves. \ No newline at end of file +V412 = Non-tradeback pre evolution move. Incompatible with Generation 1 exclusive moves. +V413 = Unreleased event. +V414 = Eggs can not have Shiny Leaf/Crown. +V415 = Eggs can not have Pokéathlon stats. diff --git a/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt b/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt index eff3e2564..a5b469c09 100644 --- a/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt +++ b/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt @@ -342,4 +342,7 @@ V408 = 1/2세대에서는 여성 어버이를 사용할 수 없습니다. V409 = 이상한소포의 색이 다른 포켓몬 여부가 일치하지 않습니다. V410 = 이상한소포의 고정된 PID가 일치하지 않습니다. V411 = 인카운터 유형 PID가 일치하지 않습니다. -V412 = 이전 세대로 옮길 수 없는 진화 전 기술입니다. 1세대 전용 기술과 함께 존재할 수 없습니다. \ No newline at end of file +V412 = 이전 세대로 옮길 수 없는 진화 전 기술입니다. 1세대 전용 기술과 함께 존재할 수 없습니다. +V413 = Unreleased event. +V414 = Eggs can not have Shiny Leaf/Crown. +V415 = Eggs can not have Pokéathlon stats. diff --git a/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt b/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt index 65ba5d962..edd5a9326 100644 --- a/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt +++ b/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt @@ -342,4 +342,7 @@ V408 = Female OT from Generation 1/2 is invalid. V409 = Mystery Gift shiny mismatch. V410 = Mystery Gift fixed PID mismatch. V411 = Encounter Type PID mismatch. -V412 = Non-tradeback pre evolution move. Incompatible with generation 1 exclusive moves. \ No newline at end of file +V412 = Non-tradeback pre evolution move. Incompatible with generation 1 exclusive moves. +V413 = Unreleased event. +V414 = Eggs can not have Shiny Leaf/Crown. +V415 = Eggs can not have Pokéathlon stats. diff --git a/PKHeX.WinForms/Controls/PKM Editor/ShinyLeaf.cs b/PKHeX.WinForms/Controls/PKM Editor/ShinyLeaf.cs index 2c1782c19..1eabc6e97 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/ShinyLeaf.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/ShinyLeaf.cs @@ -44,15 +44,17 @@ namespace PKHeX.WinForms.Controls { if (!(sender is CheckBox c)) return; - if (!c.Checked) - CHK_C.Checked = CHK_C.Enabled = false; - else if (Flags.Take(5).All(z => z.Checked) && CHK_C != c) - CHK_C.Enabled = true; if (CHK_C == c) c.Image = c.Checked ? Resources.crown : greyCrown; else + { + if (!c.Checked) + CHK_C.Checked = CHK_C.Enabled = false; + else if (Flags.Take(5).All(z => z.Checked)) + CHK_C.Enabled = true; c.Image = c.Checked ? Resources.leaf : greyLeaf; + } } } }