From f53de6ae8702a405486d17b06e1e90be26877ff4 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 8 Mar 2022 15:16:17 -0500 Subject: [PATCH] fix toxic/flame orb. use CanBeX'ed functions --- src/battle_util.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 7143c4864a..763a910ac2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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;