Fix 5->6 therian hidden ability migration

Closes #765
This commit is contained in:
Kurt 2017-01-28 10:06:32 -08:00
parent fa9fba464b
commit b1fac83c8e

View file

@ -338,6 +338,8 @@ namespace PKHeX.Core
int[] abilities = PersonalInfo.Abilities;
int abilval = Array.IndexOf(abilities, Ability);
if (abilval >= 0 && abilities[abilval] == abilities[2] && HiddenAbility)
abilval = 2; // hidden ability shared with a regular ability
if (abilval >= 0)
pk6.AbilityNumber = 1 << abilval;
else // Fallback (shouldn't happen)