diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e7e20e8f8f..07cb240c7e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6062,9 +6062,7 @@ static void Cmd_moveend(void) if (!IsProtectivePadsProtected(gBattlerAttacker, GetBattlerHoldEffect(gBattlerAttacker))) { gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; - i = gBattlerAttacker; - gBattlerAttacker = gBattlerTarget; - gBattlerTarget = i; // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable + SWAP(gBattlerAttacker, gBattlerTarget, i); // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable if (B_KINGS_SHIELD_LOWER_ATK >= GEN_8) gBattleScripting.moveEffect = MOVE_EFFECT_ATK_MINUS_1; else @@ -6079,7 +6077,6 @@ static void Cmd_moveend(void) { gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; gBattleScripting.moveEffect = MOVE_EFFECT_POISON; - PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_BANEFUL_BUNKER); BattleScriptCall(BattleScript_BanefulBunkerEffect); effect = 1; } @@ -6088,10 +6085,8 @@ static void Cmd_moveend(void) if (!IsProtectivePadsProtected(gBattlerAttacker, GetBattlerHoldEffect(gBattlerAttacker)) && CanBeBurned(gBattlerTarget, gBattlerAttacker, GetBattlerAbility(gBattlerAttacker))) { - gEffectBattler = gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; gBattleScripting.moveEffect = MOVE_EFFECT_BURN; - PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_BURNING_BULWARK); BattleScriptCall(BattleScript_BanefulBunkerEffect); effect = 1; } @@ -6100,9 +6095,7 @@ static void Cmd_moveend(void) if (!IsProtectivePadsProtected(gBattlerAttacker, GetBattlerHoldEffect(gBattlerAttacker))) { gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; - i = gBattlerAttacker; - gBattlerAttacker = gBattlerTarget; - gBattlerTarget = i; // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable + SWAP(gBattlerAttacker, gBattlerTarget, i); // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable gBattleScripting.moveEffect = MOVE_EFFECT_DEF_MINUS_2; BattleScriptCall(BattleScript_KingsShieldEffect); effect = 1; @@ -6112,9 +6105,7 @@ static void Cmd_moveend(void) if (!IsProtectivePadsProtected(gBattlerAttacker, GetBattlerHoldEffect(gBattlerAttacker))) { gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE; - i = gBattlerAttacker; - gBattlerAttacker = gBattlerTarget; - gBattlerTarget = i; // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable + SWAP(gBattlerAttacker, gBattlerTarget, i); // gBattlerTarget and gBattlerAttacker are swapped in order to activate Defiant, if applicable gBattleScripting.moveEffect = MOVE_EFFECT_SPD_MINUS_1; BattleScriptCall(BattleScript_KingsShieldEffect); effect = 1;