convert AI_IsabilityOnSide to bool
This commit is contained in:
parent
4466fbd930
commit
6b10801ee8
2 changed files with 5 additions and 5 deletions
|
@ -54,7 +54,7 @@ bool32 IsRecycleEncouragedItem(u16 item);
|
|||
bool32 CanKnockOffItem(u8 battler, u16 item);
|
||||
bool32 IsAbilityOfRating(u16 ability, s8 rating);
|
||||
s8 GetAbilityRating(u16 ability);
|
||||
u32 AI_IsAbilityOnSide(u32 battlerId, u32 ability);
|
||||
bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability);
|
||||
|
||||
// stat stage checks
|
||||
bool32 AnyStatIsRaised(u8 battlerId);
|
||||
|
|
|
@ -1065,14 +1065,14 @@ bool32 CanTargetFaintAiWithMod(u8 battlerDef, u8 battlerAtk, s32 hpMod, s32 dmgM
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
u32 AI_IsAbilityOnSide(u32 battlerId, u32 ability)
|
||||
bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability)
|
||||
{
|
||||
if (IsBattlerAlive(battlerId) && AI_GetAbility(battlerId) == ability)
|
||||
return battlerId + 1;
|
||||
return TRUE;
|
||||
else if (IsBattlerAlive(BATTLE_PARTNER(battlerId)) && AI_GetAbility(BATTLE_PARTNER(battlerId)) == ability)
|
||||
return BATTLE_PARTNER(battlerId) + 1;
|
||||
return TRUE;
|
||||
else
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// does NOT include ability suppression checks
|
||||
|
|
Loading…
Reference in a new issue