Fix gen3 ability dupe

Thanks @ricksee !
Gen3 second ability for same-ability mons is stored as 0, same deal for
gen4.
MainPK4 alteration is an unneeded-code removal, gen4 only has abil0&1,
not 2 (hidden) like gen5.
Closes #256
This commit is contained in:
Kaphotics
2016-09-10 23:12:22 -07:00
parent 0a1fc199ba
commit a6f688b3ff
2 changed files with 1 additions and 3 deletions

View File

@@ -1460,7 +1460,7 @@ private void setAbilityList()
formnum = CB_Form.SelectedIndex;
int[] abils = SAV.Personal.getAbilities(species, formnum);
if (abils[1] == 0)
if (abils[1] == 0 && SAV.Generation != 3)
abils[1] = abils[0];
string[] abilIdentifier = {" (1)", " (2)", " (H)"};
List<string> ability_list = abils.Where(a => a != 0).Select((t, i) => abilitylist[t] + abilIdentifier[i]).ToList();

View File

@@ -137,8 +137,6 @@ private void populateFieldsPK4()
if (abil < 0)
CB_Ability.SelectedIndex = 0;
else if (abil == 2)
CB_Ability.SelectedIndex = 2;
else if (abils[0] == abils[1] || abils[1] == 0)
CB_Ability.SelectedIndex = pk4.PIDAbility;
else