From 6a7466c92982bb63f98554857f0ce48cf1347c2b Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Wed, 29 Mar 2023 11:11:07 -0700 Subject: [PATCH 1/2] =?UTF-8?q?Added=20B=5FDOUBLE=5FWILD=5FREQUIRE=5F2=5FM?= =?UTF-8?q?ONS=20to=20allow=20use=20of=20B=5FDOUBLE=5FWILD=5FCHANCE=20even?= =?UTF-8?q?=20when=20there=20is=20only=20one=20Pok=C3=A9mon=20in=20the=20p?= =?UTF-8?q?arty?= 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)) From 48f90a715556d737948f92916862d14a94620aa8 Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Sat, 1 Apr 2023 14:12:50 -0700 Subject: [PATCH 2/2] Update explanation in include/config/battle.h Changed the comment in include/config/battle.h per PR comment: https://github.com/rh-hideout/pokeemerald-expansion/pull/2878#discussion_r1154322931 Co-authored-by: Eduardo Quezada D'Ottone --- include/config/battle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index 66d4b92aa3..24f4ad4f15 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -183,7 +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_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. #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)