Add on release item config (#4577)

This commit is contained in:
Bassoonian 2024-05-15 23:46:25 +02:00 committed by GitHub
parent 9c6dfb7c0c
commit 7d84cd62ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View file

@ -19,6 +19,7 @@
#define OW_PC_JAPAN_WALDA_ICONS TRUE // In the US release of Emerald, the Cross, Bolt, and Plusle icons for Walda's wallpapers were left blank from the Japan release. Setting this to TRUE will restore them. #define OW_PC_JAPAN_WALDA_ICONS TRUE // In the US release of Emerald, the Cross, Bolt, and Plusle icons for Walda's wallpapers were left blank from the Japan release. Setting this to TRUE will restore them.
#define OW_PC_HEAL GEN_LATEST // In Gen8+, Pokémon are not healed when deposited in the PC. #define OW_PC_HEAL GEN_LATEST // In Gen8+, Pokémon are not healed when deposited in the PC.
#define OW_PC_MOVE_ORDER GEN_LATEST // Starting in Gen4, the order of options in the PC menu change. #define OW_PC_MOVE_ORDER GEN_LATEST // Starting in Gen4, the order of options in the PC menu change.
#define OW_PC_RELEASE_ITEM GEN_LATEST // In Gen8+, Pokémon that get released with a held item return it to the bag.
#define OW_BERRY_MUTATIONS FALSE // If enabled, Berry plants can mutate based on berries planted next to them. #define OW_BERRY_MUTATIONS FALSE // If enabled, Berry plants can mutate based on berries planted next to them.
#define OW_BERRY_MUTATION_CHANCE 25 // Determines the % chance of a mutation. #define OW_BERRY_MUTATION_CHANCE 25 // Determines the % chance of a mutation.

View file

@ -6435,12 +6435,25 @@ static void SetPlacedMonData(u8 boxId, u8 position)
static void PurgeMonOrBoxMon(u8 boxId, u8 position) static void PurgeMonOrBoxMon(u8 boxId, u8 position)
{ {
u16 item = ITEM_NONE;
if (boxId == TOTAL_BOXES_COUNT) if (boxId == TOTAL_BOXES_COUNT)
{
if (OW_PC_RELEASE_ITEM >= GEN_8)
item = GetMonData(&gPlayerParty[position], MON_DATA_HELD_ITEM);
ZeroMonData(&gPlayerParty[position]); ZeroMonData(&gPlayerParty[position]);
}
else else
{
if (OW_PC_RELEASE_ITEM >= GEN_8)
item = GetBoxMonDataAt(boxId, position, MON_DATA_HELD_ITEM);
ZeroBoxMonAt(boxId, position); ZeroBoxMonAt(boxId, position);
} }
if (item != ITEM_NONE)
AddBagItem(item, 1);
}
static void SetShiftedMonData(u8 boxId, u8 position) static void SetShiftedMonData(u8 boxId, u8 position)
{ {
if (boxId == TOTAL_BOXES_COUNT) if (boxId == TOTAL_BOXES_COUNT)