handle battle engine hidden ability change
This commit is contained in:
parent
1898a1c2e5
commit
b903d02c06
2 changed files with 17 additions and 2 deletions
|
@ -200,11 +200,17 @@ struct BaseStats
|
|||
/* 0x13 */ u8 growthRate;
|
||||
/* 0x14 */ u8 eggGroup1;
|
||||
/* 0x15 */ u8 eggGroup2;
|
||||
/* 0x16 */ u8 abilities[2];
|
||||
#ifdef BATTLE_ENGINE
|
||||
/* 0x16 */ u8 abilities[NUM_ABILITY_SLOTS];
|
||||
#else
|
||||
u8 abilities[2];
|
||||
#endif
|
||||
/* 0x18 */ u8 safariZoneFleeRate;
|
||||
/* 0x19 */ u8 bodyColor : 7;
|
||||
u8 noFlip : 1;
|
||||
#ifndef BATTLE_ENGINE
|
||||
/* 0x1A */ u8 abilityHidden;
|
||||
#endif
|
||||
}; /* size = 28 */
|
||||
|
||||
struct BattleMove
|
||||
|
|
11
src/dexnav.c
11
src/dexnav.c
|
@ -1409,7 +1409,11 @@ static u8 DexNavGetAbilityNum(u16 species, u8 searchLevel)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef BATTLE_ENGINE // if using RHH, the base stats abilities field is expanded
|
||||
if (genAbility && gBaseStats[species].abilities[2] != ABILITY_NONE && GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
||||
#else
|
||||
if (genAbility && gBaseStats[species].abilityHidden != ABILITY_NONE && GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
||||
#endif
|
||||
{
|
||||
//Only give hidden ability if Pokemon has been caught before
|
||||
abilityNum = 2;
|
||||
|
@ -2176,8 +2180,13 @@ static void PrintCurrentSpeciesInfo(void)
|
|||
}
|
||||
else if (GetSetPokedexFlag(dexNum, FLAG_GET_CAUGHT))
|
||||
{
|
||||
if (gBaseStats[species].abilityHidden != ABILITY_NONE)
|
||||
#ifdef BATTLE_ENGINE
|
||||
if (gBaseStats[species].abilities[2] != ABILITY_NONE)
|
||||
AddTextPrinterParameterized3(WINDOW_INFO, 0, 0, HA_INFO_Y, sFontColor_Black, 0, gAbilityNames[gBaseStats[species].abilities[2]]);
|
||||
#else
|
||||
if (gBaseStats[species].abilityHidden != ABILITY_NONE)
|
||||
AddTextPrinterParameterized3(WINDOW_INFO, 0, 0, HA_INFO_Y, sFontColor_Black, 0, gAbilityNames[gBaseStats[species].abilityHidden]);
|
||||
#endif
|
||||
else
|
||||
AddTextPrinterParameterized3(WINDOW_INFO, 0, 0, HA_INFO_Y, sFontColor_Black, 0, gText_None);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue