Merge pull request #1479 from BuffelSaft/orb_fix
Fix Toxic Orb and Flame Orb affecting Pokemon they shouldn't
This commit is contained in:
commit
e343090a8b
1 changed files with 7 additions and 2 deletions
|
@ -6270,7 +6270,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
case HOLD_EFFECT_TOXIC_ORB:
|
||||
if (!gBattleMons[battlerId].status1
|
||||
&& CanPoisonType(battlerId, battlerId)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_IMMUNITY)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_IMMUNITY
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_COMATOSE
|
||||
&& IsBattlerAlive)
|
||||
{
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
gBattleMons[battlerId].status1 = STATUS1_TOXIC_POISON;
|
||||
|
@ -6281,7 +6283,10 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
case HOLD_EFFECT_FLAME_ORB:
|
||||
if (!gBattleMons[battlerId].status1
|
||||
&& !IS_BATTLER_OF_TYPE(battlerId, TYPE_FIRE)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_WATER_VEIL)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_WATER_VEIL
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_WATER_BUBBLE
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_COMATOSE
|
||||
&& IsBattlerAlive)
|
||||
{
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
gBattleMons[battlerId].status1 = STATUS1_BURN;
|
||||
|
|
Loading…
Reference in a new issue