From 6a7466c92982bb63f98554857f0ce48cf1347c2b Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Wed, 29 Mar 2023 11:11:07 -0700 Subject: [PATCH] =?UTF-8?q?Added=20B=5FDOUBLE=5FWILD=5FREQUIRE=5F2=5FMONS?= =?UTF-8?q?=20to=20allow=20use=20of=20B=5FDOUBLE=5FWILD=5FCHANCE=20even=20?= =?UTF-8?q?when=20there=20is=20only=20one=20Pok=C3=A9mon=20in=20the=20part?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/config/battle.h | 1 + src/wild_encounter.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/config/battle.h b/include/config/battle.h index 4a3d6382fb..66d4b92aa3 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -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) diff --git a/src/wild_encounter.c b/src/wild_encounter.c index d228b87a14..ef668c3a1c 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -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))