diff --git a/PKHeX/Legality/CheckStrings.cs b/PKHeX/Legality/CheckStrings.cs index 43320f82f..05971f343 100644 --- a/PKHeX/Legality/CheckStrings.cs +++ b/PKHeX/Legality/CheckStrings.cs @@ -241,6 +241,7 @@ public static string[] getLocalization(string[] existingLines = null) public static string V110 {get; set;} = "Ability does not match Mystery Gift."; public static string V111 {get; set;} = "Hidden Ability on non-SOS wild encounter."; public static string V112 {get; set;} = "Hidden Ability not available."; + public static string V217 {get; set;} = "Hidden Grotto captures should have Hidden Ability."; public static string V115 {get; set;} = "Ability matches ability number."; // Valid public static string V113 {get; set;} = "Ability does not match PID."; diff --git a/PKHeX/Legality/Checks.cs b/PKHeX/Legality/Checks.cs index 92501bc8b..63a57c3fd 100644 --- a/PKHeX/Legality/Checks.cs +++ b/PKHeX/Legality/Checks.cs @@ -985,6 +985,17 @@ private void verifyAbility() return; } } + if (pkm.GenNumber == 5) + { + if (EncounterType == typeof(EncounterSlot[]) && !((EncounterSlot[])EncounterMatch).Any(slot => slot.Type != SlotType.HiddenGrotto)) //encounter only at HiddenGrotto + { + if (pkm.AbilityNumber != 4) + { + AddLine(Severity.Invalid, V217, CheckIdentifier.Ability); + return; + } + } + } if (pkm.GenNumber == 6) { if (EncounterIsMysteryGift) diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index d69418a5a..1a58199f9 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -247,10 +247,7 @@ private static void MarkB2W2SwarmSlots(ref EncounterArea[] Areas) private static void MarkG5HiddenGrottoSlots(ref EncounterArea[] Areas) { foreach (EncounterSlot s in Areas[0].Slots) //Only 1 area - { s.Type = SlotType.HiddenGrotto; - //todo: Ability marking and checking - } } private static void MarkG5Slots(ref EncounterArea[] Areas) { diff --git a/PKHeX/Resources/text/en/legality_en.txt b/PKHeX/Resources/text/en/legality_en.txt index 95f4363c4..352f34b57 100644 Binary files a/PKHeX/Resources/text/en/legality_en.txt and b/PKHeX/Resources/text/en/legality_en.txt differ diff --git a/PKHeX/Resources/text/zh/legality_zh.txt b/PKHeX/Resources/text/zh/legality_zh.txt index 8edb97543..d41cb0bbf 100644 --- a/PKHeX/Resources/text/zh/legality_zh.txt +++ b/PKHeX/Resources/text/zh/legality_zh.txt @@ -143,6 +143,7 @@ V109 = 特性被特性胶囊改变。 V110 = 特性与神秘礼物不一致。 V111 = 非帮手宝可梦拥有隐藏特性。 V112 = 隐藏特性不可获得。 +v217 = 隐藏洞穴捕获的宝可梦必定为隐藏特性。 V115 = 特性与特性值一致。 V113 = 特性与PID不一致。 V114 = 特性与特性值不一致。