Minor syntax tweaks to HandleAction_UseMove
This commit is contained in:
parent
d270dee6bc
commit
63edb34fe2
1 changed files with 12 additions and 14 deletions
|
@ -99,7 +99,7 @@ void HandleAction_UseMove(void)
|
|||
}
|
||||
// encore forces you to use the same move
|
||||
else if (gDisableStructs[gBattlerAttacker].encoredMove != MOVE_NONE
|
||||
&& gDisableStructs[gBattlerAttacker].encoredMove == gBattleMons[gBattlerAttacker].moves[gDisableStructs[gBattlerAttacker].encoredMovePos])
|
||||
&& gDisableStructs[gBattlerAttacker].encoredMove == gBattleMons[gBattlerAttacker].moves[gDisableStructs[gBattlerAttacker].encoredMovePos])
|
||||
{
|
||||
gCurrentMove = gChosenMove = gDisableStructs[gBattlerAttacker].encoredMove;
|
||||
gCurrMovePos = gChosenMovePos = gDisableStructs[gBattlerAttacker].encoredMovePos;
|
||||
|
@ -107,7 +107,7 @@ void HandleAction_UseMove(void)
|
|||
}
|
||||
// check if the encored move wasn't overwritten
|
||||
else if (gDisableStructs[gBattlerAttacker].encoredMove != MOVE_NONE
|
||||
&& gDisableStructs[gBattlerAttacker].encoredMove != gBattleMons[gBattlerAttacker].moves[gDisableStructs[gBattlerAttacker].encoredMovePos])
|
||||
&& gDisableStructs[gBattlerAttacker].encoredMove != gBattleMons[gBattlerAttacker].moves[gDisableStructs[gBattlerAttacker].encoredMovePos])
|
||||
{
|
||||
gCurrMovePos = gChosenMovePos = gDisableStructs[gBattlerAttacker].encoredMovePos;
|
||||
gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos];
|
||||
|
@ -145,17 +145,15 @@ void HandleAction_UseMove(void)
|
|||
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gSideTimers[side].followmeTarget)
|
||||
&& gBattleMons[gSideTimers[side].followmeTarget].hp != 0
|
||||
&& (GetBattlerAbility(gBattlerAttacker) != ABILITY_PROPELLER_TAIL
|
||||
|| GetBattlerAbility(gBattlerAttacker) != ABILITY_STALWART))
|
||||
|| GetBattlerAbility(gBattlerAttacker) != ABILITY_STALWART))
|
||||
{
|
||||
gBattlerTarget = gSideTimers[side].followmeTarget;
|
||||
}
|
||||
else if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
&& gSideTimers[side].followmeTimer == 0
|
||||
&& (gBattleMoves[gCurrentMove].power != 0 || gBattleMoves[gCurrentMove].target != MOVE_TARGET_USER)
|
||||
&& ((gBattleMons[*(gBattleStruct->moveTarget + gBattlerAttacker)].ability != ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC)
|
||||
|| (gBattleMons[*(gBattleStruct->moveTarget + gBattlerAttacker)].ability != ABILITY_STORM_DRAIN && moveType == TYPE_WATER)
|
||||
)
|
||||
)
|
||||
&& gSideTimers[side].followmeTimer == 0
|
||||
&& (gBattleMoves[gCurrentMove].power != 0 || gBattleMoves[gCurrentMove].target != MOVE_TARGET_USER)
|
||||
&& ((gBattleMons[*(gBattleStruct->moveTarget + gBattlerAttacker)].ability != ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC)
|
||||
|| (gBattleMons[*(gBattleStruct->moveTarget + gBattlerAttacker)].ability != ABILITY_STORM_DRAIN && moveType == TYPE_WATER)))
|
||||
{
|
||||
side = GetBattlerSide(gBattlerAttacker);
|
||||
for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++)
|
||||
|
@ -163,10 +161,10 @@ void HandleAction_UseMove(void)
|
|||
if (side != GetBattlerSide(gActiveBattler)
|
||||
&& *(gBattleStruct->moveTarget + gBattlerAttacker) != gActiveBattler
|
||||
&& ((GetBattlerAbility(gActiveBattler) == ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC)
|
||||
|| (GetBattlerAbility(gActiveBattler) == ABILITY_STORM_DRAIN && moveType == TYPE_WATER))
|
||||
|| (GetBattlerAbility(gActiveBattler) == ABILITY_STORM_DRAIN && moveType == TYPE_WATER))
|
||||
&& GetBattlerTurnOrderNum(gActiveBattler) < var
|
||||
&& (GetBattlerAbility(gBattlerAttacker) != ABILITY_PROPELLER_TAIL
|
||||
|| GetBattlerAbility(gBattlerAttacker) != ABILITY_STALWART))
|
||||
|| GetBattlerAbility(gBattlerAttacker) != ABILITY_STALWART))
|
||||
{
|
||||
var = GetBattlerTurnOrderNum(gActiveBattler);
|
||||
}
|
||||
|
@ -231,7 +229,7 @@ void HandleAction_UseMove(void)
|
|||
}
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& gBattleMoves[gChosenMove].target & MOVE_TARGET_RANDOM)
|
||||
&& gBattleMoves[gChosenMove].target & MOVE_TARGET_RANDOM)
|
||||
{
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER)
|
||||
{
|
||||
|
@ -262,7 +260,7 @@ void HandleAction_UseMove(void)
|
|||
gBattlerTarget = gBattlerAttacker;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& gBattleMoves[gChosenMove].target == MOVE_TARGET_FOES_AND_ALLY)
|
||||
&& gBattleMoves[gChosenMove].target == MOVE_TARGET_FOES_AND_ALLY)
|
||||
{
|
||||
for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++)
|
||||
{
|
||||
|
@ -292,7 +290,7 @@ void HandleAction_UseMove(void)
|
|||
|
||||
// Choose battlescript.
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE
|
||||
&& gProtectStructs[gBattlerAttacker].palaceUnableToUseMove)
|
||||
&& gProtectStructs[gBattlerAttacker].palaceUnableToUseMove)
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].hp == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue