Skip to content

Commit

Permalink
Allow one-mon double battles (#4007)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
  • Loading branch information
Bassoonian and AlexOn1ine authored Jan 16, 2024
1 parent 778712b commit 9a1f6df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/config/overworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors.

// 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.
#define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times
#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.
#define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times.
#define OW_DOUBLE_APPROACH_WITH_ONE_MON FALSE // If enabled, you can be spotted by two trainers at the same time even if you only have one eligible Pokémon in your party.

// 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.
Expand Down
3 changes: 3 additions & 0 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3080,6 +3080,9 @@ u8 GetMonsStateToDoubles_2(void)
s32 aliveCount = 0;
s32 i;

if (OW_DOUBLE_APPROACH_WITH_ONE_MON)
return PLAYER_HAS_TWO_USABLE_MONS;

for (i = 0; i < PARTY_SIZE; i++)
{
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL);
Expand Down

0 comments on commit 9a1f6df

Please sign in to comment.