fixed player not being able to cancel partner action after item

This commit is contained in:
AgustinGDLV 2023-05-23 15:41:25 -07:00
parent 34382fcece
commit a9a32651ac

View File

@ -312,13 +312,10 @@ static void HandleInputChooseAction(void)
&& !(gAbsentBattlerFlags & gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]) && !(gAbsentBattlerFlags & gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)])
&& !(gBattleTypeFlags & BATTLE_TYPE_MULTI)) && !(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{ {
// Return item to bag if partner had selected one.
if (gBattleResources->bufferA[gActiveBattler][1] == B_ACTION_USE_ITEM) if (gBattleResources->bufferA[gActiveBattler][1] == B_ACTION_USE_ITEM)
{ {
// Add item to bag if it is a ball AddBagItem(itemId, 1);
if (itemId <= LAST_BALL)
AddBagItem(itemId, 1);
else
return;
} }
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0); BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0);