Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for placing Pokémon in the PC with the B button #3329

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/config/overworld.h
Original file line number Diff line number Diff line change
@@ -7,6 +7,9 @@
// Other settings
#define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all.

// PC settings
#define OW_PC_PRESS_B GEN_LATEST // In Gen4, pressing B when holding a Pokémon is equivalent to placing it. In Gen3, it gives the "You're holding a Pokémon!" error.

// Overworld flags
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
5 changes: 5 additions & 0 deletions src/pokemon_storage_system.c
Original file line number Diff line number Diff line change
@@ -3685,9 +3685,14 @@ static void Task_OnBPressed(u8 taskId)
case 0:
if (IsMonBeingMoved())
{
#if OW_PC_PRESS_B < GEN_4
PlaySE(SE_FAILURE);
PrintMessage(MSG_HOLDING_POKE);
sStorage->state = 1;
#else
PlaySE(SE_SELECT);
SetPokeStorageTask(Task_PlaceMon);
#endif
}
else if (IsMovingItem())
{