Added B_DOUBLE_WILD_REQUIRE_2_MONS to allow use of B_DOUBLE_WILD_CHANCE even when there is only one Pokémon in the party

This commit is contained in:
pkmnsnfrn 2023-03-29 11:11:07 -07:00
parent dd99cb6da8
commit 6a7466c929
2 changed files with 5 additions and 0 deletions

View File

@ -183,6 +183,7 @@
// Other settings
#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter.
#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, when the player only has one Pokémon in the party, randomly generated wild battles will always be a Single battle, regardless of the number used in B_DOUBLE_WILD_CHANCE.
#define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // In Gen4+, multi battles end when the Player and also their Partner don't have any more Pokémon to fight.
#define B_EVOLUTION_AFTER_WHITEOUT GEN_LATEST // In Gen6+, Pokemon that qualify for evolution after battle will evolve even if the player loses.
#define B_WILD_NATURAL_ENEMIES TRUE // If set to TRUE, certain wild mon species will attack other species when partnered in double wild battles (eg. Zangoose vs Seviper)

View File

@ -1097,7 +1097,11 @@ static void ApplyCleanseTagEncounterRateMod(u32 *encRate)
bool8 TryDoDoubleWildBattle(void)
{
#if B_DOUBLE_WILD_REQUIRE_2_MONS == TRUE
if (GetSafariZoneFlag() || GetMonsStateToDoubles() != PLAYER_HAS_TWO_USABLE_MONS)
#else
if (GetSafariZoneFlag())
#endif
return FALSE;
#if B_FLAG_FORCE_DOUBLE_WILD != 0
else if (FlagGet(B_FLAG_FORCE_DOUBLE_WILD))