Fix faulty gBaseStats reference

This commit is contained in:
Bassoonian 2022-12-31 02:01:56 +01:00
parent 0e1836d42b
commit 453aa2ffe7

View File

@ -2433,8 +2433,8 @@ static bool32 PartyBattlerShouldAvoidHazards(u8 currBattler, u8 switchBattler)
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u32 flags = gSideStatuses[GetBattlerSide(currBattler)] & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES);
s32 hazardDamage = 0;
u8 type1 = gBaseStats[species].type1;
u8 type2 = gBaseStats[species].type2;
u8 type1 = gSpeciesInfo[species].type1;
u8 type2 = gSpeciesInfo[species].type2;
u32 maxHp = GetMonData(mon, MON_DATA_MAX_HP);
if (flags == 0)