diff --git a/PKHeX/Legality/Checks.cs b/PKHeX/Legality/Checks.cs index 89e1ac174..6324c045a 100644 --- a/PKHeX/Legality/Checks.cs +++ b/PKHeX/Legality/Checks.cs @@ -312,9 +312,23 @@ private void verifyNickname() } private void verifyNicknameEgg() { - if (!pkm.IsNicknamed && (pkm.Format != 7)) - AddLine(Severity.Invalid, V12, CheckIdentifier.Egg); - else if (PKX.getSpeciesNameGeneration(0, pkm.Language, pkm.GenNumber) != pkm.Nickname) + switch (pkm.Format) + { + case 4: + if (pkm.IsNicknamed) // gen4 doesn't use the nickname flag for eggs + AddLine(Severity.Invalid, V224, CheckIdentifier.Egg); + break; + case 7: + if (EncounterMatch is EncounterStatic ^ !pkm.IsNicknamed) // gen7 doesn't use for ingame gifts + AddLine(Severity.Invalid, pkm.IsNicknamed ? V224 : V12, CheckIdentifier.Egg); + break; + default: + if (!pkm.IsNicknamed) + AddLine(Severity.Invalid, V12, CheckIdentifier.Egg); + break; + } + + if (PKX.getSpeciesNameGeneration(0, pkm.Language, pkm.GenNumber) != pkm.Nickname) AddLine(Severity.Invalid, V13, CheckIdentifier.Egg); else AddLine(Severity.Valid, V14, CheckIdentifier.Egg); diff --git a/PKHeX/Legality/LegalityCheckStrings.cs b/PKHeX/Legality/LegalityCheckStrings.cs index 1e3dbe49f..52fa64f68 100644 --- a/PKHeX/Legality/LegalityCheckStrings.cs +++ b/PKHeX/Legality/LegalityCheckStrings.cs @@ -114,7 +114,8 @@ public static class LegalityCheckStrings public static string V3 {get; set;} = "Species index invalid for Nickname comparison."; // Invalid public static string V20 {get; set;} = "Nickname does not match species name."; // Invalid public static string V13 {get; set;} = "Egg name does not match language Egg name."; // Invalid - public static string V12 {get; set;} = "Eggs must be nicknamed."; // Invalid + public static string V12 {get; set;} = "Egg must be nicknamed."; // Invalid + public static string V224 {get; set;} = "Egg must be not nicknamed."; // Invalid public static string V7 {get; set;} = "Ingame Trade invalid version?"; // Invalid public static string V8 {get; set;} = "Ingame Trade invalid index?"; // Invalid public static string V10 {get; set;} = "Ingame Trade OT has been altered."; // Invalid diff --git a/PKHeX/PKM/PKX.cs b/PKHeX/PKM/PKX.cs index 20402fdda..1fd3063d6 100644 --- a/PKHeX/PKM/PKX.cs +++ b/PKHeX/PKM/PKX.cs @@ -211,7 +211,7 @@ public static string getSpeciesNameGeneration(int species, int lang, int generat { string nick = getSpeciesName(species, lang); - if (generation < 5) // All caps GenIV and previous + if (generation < 5 && (generation != 4 || species != 0)) // All caps GenIV and previous, except GenIV eggs. nick = nick.ToUpper(); if (generation < 3) nick = nick.Replace(" ", ""); diff --git a/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt b/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt index 5f57a86ac..ea0faf8af 100644 --- a/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt +++ b/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt @@ -75,7 +75,8 @@ V222 = Cannot be given this Nickname. V3 = Species index invalid for Nickname comparison. V20 = Nickname does not match species name. V13 = Egg name does not match language Egg name. -V12 = Eggs must be nicknamed. +V12 = Egg must be nicknamed. +V224 = Egg must be not nicknamed. V7 = Ingame Trade invalid version? V8 = Ingame Trade invalid index? V10 = Ingame Trade OT has been altered. diff --git a/PKHeX/Resources/text/ko/LegalityCheckStrings_ko.txt b/PKHeX/Resources/text/ko/LegalityCheckStrings_ko.txt index 92f65f636..51c767771 100644 --- a/PKHeX/Resources/text/ko/LegalityCheckStrings_ko.txt +++ b/PKHeX/Resources/text/ko/LegalityCheckStrings_ko.txt @@ -77,6 +77,7 @@ V3 = 이름 비교에 사용할 포켓몬 종류 인덱스가 잘못되었습니 V20 = 이름이 포켓몬 종류와 일치하지 않습니다. V13 = 알 이름이 언어별 알 이름과 일치하지 않습니다. V12 = 알은 반드시 이름 플래그가 켜져 있어야 합니다. +V224 = Egg must be not nicknamed. V7 = 게임 내 교환의 버전이 잘못되었을 수 있습니다. V8 = 게임 내 교환의 인덱스가 잘못되었을 수 있습니다. V10 = 게임 내 교환의 어버이가 달라졌습니다. diff --git a/PKHeX/Resources/text/zh/LegalityCheckStrings_zh.txt b/PKHeX/Resources/text/zh/LegalityCheckStrings_zh.txt index 51f88f03b..6ed2c6566 100644 --- a/PKHeX/Resources/text/zh/LegalityCheckStrings_zh.txt +++ b/PKHeX/Resources/text/zh/LegalityCheckStrings_zh.txt @@ -77,6 +77,7 @@ V3 = 宝可梦种类无法用于昵称对比 V20 = 昵称与种类名不一致。 V13 = 蛋名称与语言不一致。 V12 = 蛋必须有昵称。 +V224 = Egg must be not nicknamed. V7 = 游戏内连接交换版本不合法? V8 = 游戏内连接交换序号不合法? V10 = 游戏内连接交换的初训家被修改。