Skip to content

Commit

Permalink
solves architdate#251 fixes ability application
Browse files Browse the repository at this point in the history
  • Loading branch information
santacrab2 committed Jul 30, 2024
1 parent 70e9d8a commit 7be007c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PKHeX.Core.AutoMod/AutoMod/Legalization/ShowdownEdits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void SetAbility(PKM pk, IBattleTemplate set, AbilityPermission pre
{
if (pk.Ability != set.Ability)
pk.RefreshAbility(pk is PK5 { HiddenAbility: true } ? 2 : pk.AbilityNumber >> 1);
if (pk.Ability != set.Ability && pk.Context >= EntityContext.Gen8 && set.Ability != -1)
if (pk.Ability != set.Ability && pk.Context >= EntityContext.Gen6 && set.Ability != -1)
pk.RefreshAbility(pk is PK5 { HiddenAbility: true } ? 2 : pk.PersonalInfo.GetIndexOfAbility(set.Ability));
if (preference <= 0)
return;
Expand Down

0 comments on commit 7be007c

Please sign in to comment.