mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 19:54:14 +01:00
fix uninitialized ai modifier variable in ai calc damage
This commit is contained in:
parent
63aded9ce8
commit
23272074bf
@ -802,6 +802,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
effectivenessMultiplier = CalcTypeEffectivenessMultiplier(move, moveType, battlerAtk, battlerDef, FALSE);
|
||||||
dmg = 0;
|
dmg = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1166,7 +1167,7 @@ s32 AI_GetAbility(u32 battlerId)
|
|||||||
// We've had ability overwritten by e.g. Worry Seed. It is not part of AI_PARTY in case of switching
|
// We've had ability overwritten by e.g. Worry Seed. It is not part of AI_PARTY in case of switching
|
||||||
if (gBattleStruct->overwrittenAbilities[battlerId])
|
if (gBattleStruct->overwrittenAbilities[battlerId])
|
||||||
return gBattleStruct->overwrittenAbilities[battlerId];
|
return gBattleStruct->overwrittenAbilities[battlerId];
|
||||||
|
|
||||||
// The AI knows its own ability.
|
// The AI knows its own ability.
|
||||||
if (IsBattlerAIControlled(battlerId))
|
if (IsBattlerAIControlled(battlerId))
|
||||||
return knownAbility;
|
return knownAbility;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user