From 709f583390f2889eba2f3ccd0df3a820c6b7fbeb Mon Sep 17 00:00:00 2001 From: sneed Date: Tue, 10 May 2022 02:58:24 +0300 Subject: [PATCH 1/2] Initial commit --- include/constants/battle_config.h | 1 + src/battle_main.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index baecae018..d968dbd2f 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -252,6 +252,7 @@ // Other settings #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. #define B_MULTI_BATTLE_WHITEOUT GEN_8 // 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 TRUE // If set to TRUE, 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) // Animation Settings diff --git a/src/battle_main.c b/src/battle_main.c index c376b227e..b2b205cbe 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5174,7 +5174,11 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void) | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_WALLY_TUTORIAL)) +#if !B_EVOLUTION_AFTER_WHITEOUT && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) +#else + ) +#endif { gBattleMainFunc = TrySpecialEvolution; } From bceccf54747f36aaba7a81637285af553e79943a Mon Sep 17 00:00:00 2001 From: sneed Date: Tue, 10 May 2022 08:17:31 +0300 Subject: [PATCH 2/2] changes --- include/constants/battle_config.h | 2 +- src/battle_main.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index d968dbd2f..74ac9e129 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -252,7 +252,7 @@ // Other settings #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. #define B_MULTI_BATTLE_WHITEOUT GEN_8 // 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 TRUE // If set to TRUE, Pokemon that qualify for evolution after battle will evolve even if the player loses. +#define B_EVOLUTION_AFTER_WHITEOUT GEN_6 // 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) // Animation Settings diff --git a/src/battle_main.c b/src/battle_main.c index b2b205cbe..bf2853a7b 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5174,11 +5174,7 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void) | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_WALLY_TUTORIAL)) -#if !B_EVOLUTION_AFTER_WHITEOUT - && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) -#else - ) -#endif + && (B_EVOLUTION_AFTER_WHITEOUT >= GEN_6 || gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) { gBattleMainFunc = TrySpecialEvolution; }