From 5b4b6e4158b8fab18b146a65cbea165ca21bd617 Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 27 Mar 2018 09:02:56 -0700 Subject: [PATCH] fix ability comparison a==a obviously, need to check against the current ability --- PKHeX.Core/Legality/Checks.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Checks.cs b/PKHeX.Core/Legality/Checks.cs index 50f766f43..7be214816 100644 --- a/PKHeX.Core/Legality/Checks.cs +++ b/PKHeX.Core/Legality/Checks.cs @@ -1117,7 +1117,7 @@ namespace PKHeX.Core if (EncounterMatch is EncounterTrade z && EncounterAbility == 1 << abilval && z.Species == pkm.Species) // Edge case (Static PID?) AddLine(Severity.Valid, V115, CheckIdentifier.Ability); - else if (EncounterMatch is PCD d && d.Species == pkm.Species && d.Gift.PK.Ability == EncounterAbility) // Edge case (PID ability gift mismatch) + else if (EncounterMatch is PCD d && d.Species == pkm.Species && pkm.Ability == EncounterAbility) // Edge case (PID ability gift mismatch) AddLine(Severity.Valid, V115, CheckIdentifier.Ability); else if (pkm.Format >= 6 && abilities[0] != abilities[1] && pkm.AbilityNumber < 4 && EncounterAbility != 4) // Ability Capsule can change between 1/2 AddLine(Severity.Valid, V109, CheckIdentifier.Ability);