Slight Protect moveend cleanup (#8385)
This commit is contained in:
parent
ce858f51b2
commit
6277541baa
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user