fix throw last used ball action turn order checks

This commit is contained in:
ghoulslash 2021-07-04 09:28:59 -06:00
parent c06029bc72
commit d28ac33b0e

View File

@ -4485,7 +4485,9 @@ static void SetActionsAndBattlersTurnOrder(void)
{
for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++)
{
if (gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_ITEM || gChosenActionByBattler[gActiveBattler] == B_ACTION_SWITCH)
if (gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_ITEM
|| gChosenActionByBattler[gActiveBattler] == B_ACTION_SWITCH
|| gChosenActionByBattler[gActiveBattler] == B_ACTION_THROW_BALL)
{
gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler];
gBattlerByTurnOrder[turnOrderId] = gActiveBattler;
@ -4494,7 +4496,9 @@ static void SetActionsAndBattlersTurnOrder(void)
}
for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++)
{
if (gChosenActionByBattler[gActiveBattler] != B_ACTION_USE_ITEM && gChosenActionByBattler[gActiveBattler] != B_ACTION_SWITCH)
if (gChosenActionByBattler[gActiveBattler] != B_ACTION_USE_ITEM
&& gChosenActionByBattler[gActiveBattler] != B_ACTION_SWITCH
&& gChosenActionByBattler[gActiveBattler] != B_ACTION_THROW_BALL)
{
gActionsByTurnOrder[turnOrderId] = gChosenActionByBattler[gActiveBattler];
gBattlerByTurnOrder[turnOrderId] = gActiveBattler;
@ -4510,7 +4514,9 @@ static void SetActionsAndBattlersTurnOrder(void)
if (gActionsByTurnOrder[i] != B_ACTION_USE_ITEM
&& gActionsByTurnOrder[j] != B_ACTION_USE_ITEM
&& gActionsByTurnOrder[i] != B_ACTION_SWITCH
&& gActionsByTurnOrder[j] != B_ACTION_SWITCH)
&& gActionsByTurnOrder[j] != B_ACTION_SWITCH
&& gActionsByTurnOrder[i] != B_ACTION_THROW_BALL
&& gActionsByTurnOrder[j] != B_ACTION_THROW_BALL)
{
if (GetWhoStrikesFirst(battler1, battler2, FALSE))
SwapTurnOrder(i, j);