Add missing CanGetFrostbite
This commit is contained in:
parent
6a5947c3dd
commit
39b50d09dd
3 changed files with 16 additions and 1 deletions
|
@ -228,6 +228,7 @@ bool32 CanBePoisoned(u8 battlerAttacker, u8 battlerTarget);
|
|||
bool32 CanBeBurned(u8 battlerId);
|
||||
bool32 CanBeParalyzed(u8 battlerId);
|
||||
bool32 CanBeFrozen(u8 battlerId);
|
||||
bool32 CanGetFrostbite(u8 battlerId);
|
||||
bool32 CanBeConfused(u8 battlerId);
|
||||
bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag);
|
||||
u32 GetBattlerFriendshipScore(u8 battlerId);
|
||||
|
|
|
@ -3212,7 +3212,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
}
|
||||
break;
|
||||
case STATUS1_FROSTBITE:
|
||||
if (!CanBeFrozen(gEffectBattler))
|
||||
if (!CanGetFrostbite(gEffectBattler))
|
||||
break;
|
||||
|
||||
statusChanged = TRUE;
|
||||
|
|
|
@ -6507,6 +6507,20 @@ bool32 CanBeFrozen(u8 battlerId)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 CanGetFrostbite(u8 battlerId)
|
||||
{
|
||||
u16 ability = GetBattlerAbility(battlerId);
|
||||
if (IS_BATTLER_OF_TYPE(battlerId, TYPE_ICE)
|
||||
|| gSideStatuses[GetBattlerSide(battlerId)] & SIDE_STATUS_SAFEGUARD
|
||||
|| ability == ABILITY_MAGMA_ARMOR
|
||||
|| ability == ABILITY_COMATOSE
|
||||
|| gBattleMons[battlerId].status1 & STATUS1_ANY
|
||||
|| IsAbilityStatusProtected(battlerId)
|
||||
|| IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 CanBeConfused(u8 battlerId)
|
||||
{
|
||||
if (GetBattlerAbility(battlerId) == ABILITY_OWN_TEMPO
|
||||
|
|
Loading…
Reference in a new issue