diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7bb2390143..5f4ed78aa8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3164,7 +3164,6 @@ void SetMoveEffect(bool32 primary, bool32 certain) } else { - u8 side; switch (gBattleScripting.moveEffect) { case MOVE_EFFECT_CONFUSION: @@ -3178,7 +3177,7 @@ void SetMoveEffect(bool32 primary, bool32 certain) // If the confusion is activating due to being released from Sky Drop, go to "confused due to fatigue" script. // Otherwise, do normal confusion script. - if(gCurrentMove == MOVE_SKY_DROP) + if (gCurrentMove == MOVE_SKY_DROP) { gBattleMons[gEffectBattler].status2 &= ~(STATUS2_LOCK_CONFUSE); gBattlerAttacker = gEffectBattler; @@ -3422,35 +3421,13 @@ void SetMoveEffect(bool32 primary, bool32 certain) break; case MOVE_EFFECT_STEAL_ITEM: { - if (!CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item)) - { - gBattlescriptCurrInstr++; - break; - } - - side = GetBattlerSide(gBattlerAttacker); - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT - && !(gBattleTypeFlags & - (BATTLE_TYPE_EREADER_TRAINER - | BATTLE_TYPE_FRONTIER - | BATTLE_TYPE_LINK - | BATTLE_TYPE_RECORDED_LINK - | BATTLE_TYPE_SECRET_BASE))) + if (!CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item) + || gBattleMons[gBattlerAttacker].item != ITEM_NONE + || gBattleMons[gBattlerTarget].item == ITEM_NONE) { gBattlescriptCurrInstr++; } - else if (!(gBattleTypeFlags & - (BATTLE_TYPE_EREADER_TRAINER - | BATTLE_TYPE_FRONTIER - | BATTLE_TYPE_LINK - | BATTLE_TYPE_RECORDED_LINK - | BATTLE_TYPE_SECRET_BASE)) - && (gWishFutureKnock.knockedOffMons[side] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]])) - { - gBattlescriptCurrInstr++; - } - else if (gBattleMons[gBattlerTarget].item - && GetBattlerAbility(gBattlerTarget) == ABILITY_STICKY_HOLD) + else if (GetBattlerAbility(gBattlerTarget) == ABILITY_STICKY_HOLD) { BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_NoItemSteal; @@ -3458,12 +3435,6 @@ void SetMoveEffect(bool32 primary, bool32 certain) gLastUsedAbility = gBattleMons[gBattlerTarget].ability; RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } - else if (gBattleMons[gBattlerAttacker].item != ITEM_NONE - || gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER - || gBattleMons[gBattlerTarget].item == ITEM_NONE) - { - gBattlescriptCurrInstr++; - } else { StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker steals target item