diff --git a/include/config/battle.h b/include/config/battle.h index 503ce9328e..26cda4e6e2 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -220,6 +220,7 @@ #define B_USE_FROSTBITE FALSE // In PLA, Frostbite replaces Freeze. Enabling this flag does the same here. Moves can still be cherry-picked to either Freeze or Frostbite. Freeze-Dry, Secret Power & Tri Attack depend on this config. #define B_OVERWORLD_SNOW GEN_LATEST // In Gen9+, overworld Snow will summon snow instead of hail. #define B_TOXIC_REVERSAL GEN_LATEST // In Gen5+, bad poison will change to regular poison at the end of battles. +#define B_TRY_CATCH_TRAINER_BALL GEN_LATEST // In Gen4+, trying to catch a Trainer's Pokémon does not consume the Poké Ball. // Animation Settings #define B_NEW_SWORD_PARTICLE TRUE // If set to TRUE, it updates Swords Dance's particle. diff --git a/src/item_use.c b/src/item_use.c index 1b87cc0e36..6abec6498a 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -1234,7 +1234,8 @@ void ItemUseInBattle_BagMenu(u8 taskId) else { PlaySE(SE_SELECT); - RemoveUsedItem(); + if (!(B_TRY_CATCH_TRAINER_BALL >= GEN_4 && (ItemId_GetBattleUsage(gSpecialVar_ItemId) == EFFECT_ITEM_THROW_BALL) && (gBattleTypeFlags & BATTLE_TYPE_TRAINER))) + RemoveUsedItem(); ScheduleBgCopyTilemapToVram(2); if (!InBattlePyramid()) gTasks[taskId].func = Task_FadeAndCloseBagMenu;