Merge pull request #2545 from Bassoonian/gen9moves

Fix faulty gBaseStats reference
This commit is contained in:
Eduardo Quezada D'Ottone 2022-12-30 22:58:50 -03:00 committed by GitHub
commit a3411d0771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)