mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Created constant for easier Ball Expansion.
This commit is contained in:
parent
46f4a4bbf7
commit
7244b80fc6
@ -17,6 +17,8 @@
|
|||||||
#define ITEM_LUXURY_BALL 11
|
#define ITEM_LUXURY_BALL 11
|
||||||
#define ITEM_PREMIER_BALL 12
|
#define ITEM_PREMIER_BALL 12
|
||||||
|
|
||||||
|
#define END_BALLS ITEM_PREMIER_BALL
|
||||||
|
|
||||||
// Pokemon Items
|
// Pokemon Items
|
||||||
#define ITEM_POTION 13
|
#define ITEM_POTION 13
|
||||||
#define ITEM_ANTIDOTE 14
|
#define ITEM_ANTIDOTE 14
|
||||||
|
@ -316,7 +316,7 @@ static void HandleInputChooseAction(void)
|
|||||||
if (gBattleBufferA[gActiveBattler][1] == B_ACTION_USE_ITEM)
|
if (gBattleBufferA[gActiveBattler][1] == B_ACTION_USE_ITEM)
|
||||||
{
|
{
|
||||||
// Add item to bag if it is a ball
|
// Add item to bag if it is a ball
|
||||||
if (itemId <= ITEM_PREMIER_BALL)
|
if (itemId <= END_BALLS)
|
||||||
AddBagItem(itemId, 1);
|
AddBagItem(itemId, 1);
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
@ -5547,7 +5547,7 @@ static void HandleAction_UseItem(void)
|
|||||||
ClearFuryCutterDestinyBondGrudge(gBattlerAttacker);
|
ClearFuryCutterDestinyBondGrudge(gBattlerAttacker);
|
||||||
gLastUsedItem = gBattleBufferB[gBattlerAttacker][1] | (gBattleBufferB[gBattlerAttacker][2] << 8);
|
gLastUsedItem = gBattleBufferB[gBattlerAttacker][1] | (gBattleBufferB[gBattlerAttacker][2] << 8);
|
||||||
|
|
||||||
if (gLastUsedItem <= ITEM_PREMIER_BALL) // is ball
|
if (gLastUsedItem <= END_BALLS) // is ball
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = gBattlescriptsForBallThrow[gLastUsedItem];
|
gBattlescriptCurrInstr = gBattlescriptsForBallThrow[gLastUsedItem];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user