B_LAST_USED_BALL and .importance (#5834)

This commit is contained in:
AERDU 2024-12-20 08:46:58 +00:00 committed by GitHub
parent b22a867e11
commit a797e901b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -569,6 +569,7 @@ void HandleAction_ThrowBall(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gLastUsedItem = gBallToDisplay;
if (!ItemId_GetImportance(gLastUsedItem))
RemoveBagItem(gLastUsedItem, 1);
gBattlescriptCurrInstr = BattleScript_BallThrow;
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;