mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 09:24:19 +01:00
Merge pull request #1397 from ghoulslash/escape
Fix Ghost Types Unable to Escape
This commit is contained in:
commit
9ec04fcce8
@ -5136,10 +5136,16 @@ u32 IsAbilityPreventingEscape(u32 battlerId)
|
|||||||
|
|
||||||
bool32 CanBattlerEscape(u32 battlerId) // no ability check
|
bool32 CanBattlerEscape(u32 battlerId) // no ability check
|
||||||
{
|
{
|
||||||
return (GetBattlerHoldEffect(battlerId, TRUE) == HOLD_EFFECT_SHED_SHELL
|
if (GetBattlerHoldEffect(battlerId, TRUE) == HOLD_EFFECT_SHED_SHELL)
|
||||||
|| !((gBattleMons[battlerId].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED))
|
return TRUE;
|
||||||
|| (gStatuses3[battlerId] & STATUS3_ROOTED)
|
else if ((B_GHOSTS_ESCAPE >= GEN_6 && !IS_BATTLER_OF_TYPE(battlerId, TYPE_GHOST)) && gBattleMons[battlerId].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED))
|
||||||
|| gFieldStatuses & STATUS_FIELD_FAIRY_LOCK));
|
return FALSE;
|
||||||
|
else if (gStatuses3[battlerId] & STATUS3_ROOTED)
|
||||||
|
return FALSE;
|
||||||
|
else if (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleScriptExecute(const u8 *BS_ptr)
|
void BattleScriptExecute(const u8 *BS_ptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user