mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Update encountertrade ability legality check
check for encountertrade edge case first, then ability capsule Closes #1163
This commit is contained in:
parent
b8a799f7ed
commit
5f94a2e0f4
1 changed files with 3 additions and 4 deletions
|
@ -1458,11 +1458,10 @@ namespace PKHeX.Core
|
|||
if (!(AbilityUnchanged ?? false) || EncounterAbility == 0 || pkm.AbilityNumber == EncounterAbility)
|
||||
return false;
|
||||
|
||||
if (pkm.Format >= 6 && abilities[0] != abilities[1] && pkm.AbilityNumber < 4) // Ability Capsule
|
||||
AddLine(Severity.Valid, V109, CheckIdentifier.Ability);
|
||||
else if (pkm.Gen3 && EncounterMatch is EncounterTrade && EncounterAbility == 1 << abilval)
|
||||
// Edge case (Static PID?)
|
||||
if (EncounterMatch is EncounterTrade z && EncounterAbility == 1 << abilval && z.Species == pkm.Species) // Edge case (Static PID?)
|
||||
AddLine(Severity.Valid, V115, CheckIdentifier.Ability);
|
||||
else if (pkm.Format >= 6 && abilities[0] != abilities[1] && pkm.AbilityNumber < 4) // Ability Capsule
|
||||
AddLine(Severity.Valid, V109, CheckIdentifier.Ability);
|
||||
else
|
||||
AddLine(Severity.Invalid, V223, CheckIdentifier.Ability);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue