From ba42b4daf47a4739684295818f9d405c0949b54f Mon Sep 17 00:00:00 2001 From: surskitty Date: Mon, 17 May 2021 17:08:01 -0400 Subject: [PATCH] If a Pokemon's ability is set to ABILITY_NONE, try to set it to the first ability slot. #1490 --- src/pokemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index a4f3c52a7..4f8d984c1 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5374,6 +5374,9 @@ u8 GetAbilityBySpecies(u16 species, u8 abilityNum) else gLastUsedAbility = gBaseStats[species].abilities[0]; + if (gLastUsedAbility == ABILITY_NONE) + gLastUsedAbility = gBaseStats[species].abilities[0]; + return gLastUsedAbility; }