Refactor hidden abilities

This commit is contained in:
ExpoSeed 2021-04-16 23:31:41 -05:00
parent db2b995bc6
commit f922d42988
4 changed files with 1598 additions and 1898 deletions

View file

@ -368,6 +368,6 @@
#define MON_PIC_SIZE (64 * 64 / 2)
#define NUM_ABILITY_SLOTS 2
#define NUM_ABILITY_SLOTS 3
#endif // GUARD_CONSTANTS_POKEMON_H

View file

@ -205,7 +205,6 @@ struct BaseStats
/* 0x14 */ u8 eggGroup1;
/* 0x15 */ u8 eggGroup2;
/* 0x16 */ u8 abilities[NUM_ABILITY_SLOTS];
u8 abilityHidden;
u8 safariZoneFleeRate;
u8 bodyColor : 7;
u8 noFlip : 1;

File diff suppressed because it is too large Load diff

View file

@ -5211,10 +5211,8 @@ u8 GetMonsStateToDoubles_2(void)
u8 GetAbilityBySpecies(u16 species, u8 abilityNum)
{
if (abilityNum == 2)
gLastUsedAbility = gBaseStats[species].abilityHidden;
else if (abilityNum == 1)
gLastUsedAbility = gBaseStats[species].abilities[1];
if (abilityNum < NUM_ABILITY_SLOTS)
gLastUsedAbility = gBaseStats[species].abilities[abilityNum];
else
gLastUsedAbility = gBaseStats[species].abilities[0];