From 6bb076aecf05ec6298d28cbeca0ebbac08628f78 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 9 Jul 2018 17:08:26 -0700 Subject: [PATCH] Fix mysterygift hidden ability comparison Closes #2047 --- PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs b/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs index 8e5552cbd..2f48447ee 100644 --- a/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs @@ -174,11 +174,14 @@ private CheckResult VerifyAbilityMG(LegalityAnalysis data, IReadOnlyList ab if (cardtype == 3) // 1/2 return abilNumber == 4 ? GetInvalid(V110) : VALID; + // Only remaining matches are fixed index abilities int cardAbilIndex = 1 << cardtype; if (abilNumber == cardAbilIndex) return VALID; - if (abilNumber == 2 || cardtype == 2) + // Can still match if the ability was changed via ability capsule... + // However, it can't change to/from Hidden Abilities. + if (abilNumber == 4 || cardtype == 2) return GetInvalid(V108); // Ability can be flipped 0/1 if Ability Capsule is available, is not Hidden Ability, and Abilities are different.