diff options
author | SatoMew <SatoMew@users.noreply.github.com> | 2019-08-04 20:35:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-04 20:35:38 +0100 |
commit | 667f0837e2c0fecb03e4198a182cf04624a47fbd (patch) | |
tree | 4f11ff910478fdb34a4c40c465b30be2ac1a22da /src/battle_pike.c | |
parent | 89da828794d036e33ef313ab95868c8be6bb039f (diff) | |
parent | ce941e6f56803b389c20a52c0a5b89f5ade12b7a (diff) |
Merge branch 'master' into master
Diffstat (limited to 'src/battle_pike.c')
-rw-r--r-- | src/battle_pike.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/battle_pike.c b/src/battle_pike.c index cc58b81bb..8846e2d1a 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -53,11 +53,11 @@ struct PikeWildMon }; // IWRAM bss -static IWRAM_DATA u8 sRoomType; -static IWRAM_DATA u8 sStatusMon; -static IWRAM_DATA bool8 sUnknown_0300128E; -static IWRAM_DATA u32 sStatusFlags; -static IWRAM_DATA u8 sNpcId; +static u8 sRoomType; +static u8 sStatusMon; +static bool8 sUnknown_0300128E; +static u32 sStatusFlags; +static u8 sNpcId; // This file's functions. static void SetRoomType(void); @@ -1122,7 +1122,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate) u8 headerId = GetBattlePikeWildMonHeaderId(); u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; const struct PikeWildMon *const *const wildMons = sWildMons[lvlMode]; - u32 abilityBit; + u32 abilityNum; s32 pikeMonId = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); pikeMonId = SpeciesToPikeMonId(pikeMonId); @@ -1152,11 +1152,11 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate) MON_DATA_EXP, &gExperienceTables[gBaseStats[wildMons[headerId][pikeMonId].species].growthRate][monLevel]); - if (gBaseStats[wildMons[headerId][pikeMonId].species].ability2) - abilityBit = Random() % 2; + if (gBaseStats[wildMons[headerId][pikeMonId].species].abilities[1]) + abilityNum = Random() % 2; else - abilityBit = 0; - SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &abilityBit); + abilityNum = 0; + SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &abilityNum); for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(&gEnemyParty[0], wildMons[headerId][pikeMonId].moves[i], i); |