Merge pull request #1464 from ExpoSeed/PE/hidden_ability_refactor
Hidden ability refactor
This commit is contained in:
commit
9e1b885ec1
4 changed files with 1603 additions and 1901 deletions
|
@ -368,4 +368,6 @@
|
||||||
|
|
||||||
#define MON_PIC_SIZE (64 * 64 / 2)
|
#define MON_PIC_SIZE (64 * 64 / 2)
|
||||||
|
|
||||||
|
#define NUM_ABILITY_SLOTS 3
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_POKEMON_H
|
#endif // GUARD_CONSTANTS_POKEMON_H
|
||||||
|
|
|
@ -204,12 +204,11 @@ struct BaseStats
|
||||||
/* 0x13 */ u8 growthRate;
|
/* 0x13 */ u8 growthRate;
|
||||||
/* 0x14 */ u8 eggGroup1;
|
/* 0x14 */ u8 eggGroup1;
|
||||||
/* 0x15 */ u8 eggGroup2;
|
/* 0x15 */ u8 eggGroup2;
|
||||||
/* 0x16 */ u8 abilities[2];
|
/* 0x16 */ u8 abilities[NUM_ABILITY_SLOTS];
|
||||||
/* 0x18 */ u8 abilityHidden;
|
u8 safariZoneFleeRate;
|
||||||
/* 0x19 */ u8 safariZoneFleeRate;
|
u8 bodyColor : 7;
|
||||||
/* 0x1A */ u8 bodyColor : 7;
|
|
||||||
u8 noFlip : 1;
|
u8 noFlip : 1;
|
||||||
/* 0x1B */ u8 flags;
|
u8 flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BattleMove
|
struct BattleMove
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5211,10 +5211,8 @@ u8 GetMonsStateToDoubles_2(void)
|
||||||
|
|
||||||
u8 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
u8 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
||||||
{
|
{
|
||||||
if (abilityNum == 2)
|
if (abilityNum < NUM_ABILITY_SLOTS)
|
||||||
gLastUsedAbility = gBaseStats[species].abilityHidden;
|
gLastUsedAbility = gBaseStats[species].abilities[abilityNum];
|
||||||
else if (abilityNum == 1)
|
|
||||||
gLastUsedAbility = gBaseStats[species].abilities[1];
|
|
||||||
else
|
else
|
||||||
gLastUsedAbility = gBaseStats[species].abilities[0];
|
gLastUsedAbility = gBaseStats[species].abilities[0];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue