AI_CalcPartyMonDamage set saved flag for SetBattlerData (#4586)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
parent
faf61e62fb
commit
dd3de40f4d
1 changed files with 4 additions and 0 deletions
|
@ -3288,12 +3288,16 @@ s32 AI_CalcPartyMonDamage(u32 move, u32 battlerAtk, u32 battlerDef, struct Battl
|
|||
if (isPartyMonAttacker)
|
||||
{
|
||||
gBattleMons[battlerAtk] = switchinCandidate;
|
||||
AI_THINKING_STRUCT->saved[battlerDef].saved = TRUE;
|
||||
SetBattlerData(battlerDef); // set known opposing battler data
|
||||
AI_THINKING_STRUCT->saved[battlerDef].saved = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleMons[battlerDef] = switchinCandidate;
|
||||
AI_THINKING_STRUCT->saved[battlerAtk].saved = TRUE;
|
||||
SetBattlerData(battlerAtk); // set known opposing battler data
|
||||
AI_THINKING_STRUCT->saved[battlerAtk].saved = FALSE;
|
||||
}
|
||||
|
||||
dmg = AI_CalcDamage(move, battlerAtk, battlerDef, &effectiveness, FALSE, AI_GetWeather(AI_DATA));
|
||||
|
|
Loading…
Reference in a new issue