mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-20 19:23:38 +01:00
Merge pull request #2076 from ghoulslash/be/orbfix
fix toxic/flame orb. use CanBeX'ed functions
This commit is contained in:
commit
20da792f90
@ -7332,11 +7332,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
switch (battlerHoldEffect)
|
||||
{
|
||||
case HOLD_EFFECT_TOXIC_ORB:
|
||||
if (!gBattleMons[battlerId].status1
|
||||
&& CanPoisonType(battlerId, battlerId)
|
||||
&& battlerAbility != ABILITY_IMMUNITY
|
||||
&& battlerAbility != ABILITY_COMATOSE
|
||||
&& IsBattlerAlive)
|
||||
if (IsBattlerAlive(battlerId) && CanBePoisoned(battlerId, battlerId))
|
||||
{
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
gBattleMons[battlerId].status1 = STATUS1_TOXIC_POISON;
|
||||
@ -7345,12 +7341,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_FLAME_ORB:
|
||||
if (!gBattleMons[battlerId].status1
|
||||
&& !IS_BATTLER_OF_TYPE(battlerId, TYPE_FIRE)
|
||||
&& battlerAbility != ABILITY_WATER_VEIL
|
||||
&& battlerAbility != ABILITY_WATER_BUBBLE
|
||||
&& battlerAbility != ABILITY_COMATOSE
|
||||
&& IsBattlerAlive)
|
||||
if (IsBattlerAlive(battlerId) && CanBeBurned(battlerId))
|
||||
{
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
gBattleMons[battlerId].status1 = STATUS1_BURN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user