Merge pull request #1080 from AsparagusEduardo/EndBalls

Created constant for easier Ball Expansion.
This commit is contained in:
GriffinR
2020-07-14 19:56:20 -04:00
committed by GitHub
3 changed files with 4 additions and 2 deletions

View File

@@ -17,6 +17,8 @@
#define ITEM_LUXURY_BALL 11
#define ITEM_PREMIER_BALL 12
#define LAST_BALL ITEM_PREMIER_BALL
// Pokemon Items
#define ITEM_POTION 13
#define ITEM_ANTIDOTE 14

View File

@@ -316,7 +316,7 @@ static void HandleInputChooseAction(void)
if (gBattleBufferA[gActiveBattler][1] == B_ACTION_USE_ITEM)
{
// Add item to bag if it is a ball
if (itemId <= ITEM_PREMIER_BALL)
if (itemId <= LAST_BALL)
AddBagItem(itemId, 1);
else
return;

View File

@@ -5547,7 +5547,7 @@ static void HandleAction_UseItem(void)
ClearFuryCutterDestinyBondGrudge(gBattlerAttacker);
gLastUsedItem = gBattleBufferB[gBattlerAttacker][1] | (gBattleBufferB[gBattlerAttacker][2] << 8);
if (gLastUsedItem <= ITEM_PREMIER_BALL) // is ball
if (gLastUsedItem <= LAST_BALL) // is ball
{
gBattlescriptCurrInstr = gBattlescriptsForBallThrow[gLastUsedItem];
}