From 3755155e9d64bef9804b9a4c829449ad9a1d2e25 Mon Sep 17 00:00:00 2001 From: kittenchilly Date: Sun, 22 Oct 2023 16:05:54 -0500 Subject: [PATCH] Update friendship evo threshold to gen 8+ with config (#3376) --- include/config/pokemon.h | 3 +++ src/pokemon.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index a65eddb73c..271a77add4 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -7,6 +7,9 @@ #define P_UPDATED_ABILITIES GEN_LATEST // Since Gen 6, certain Pokémon have their abilities changed. #define P_UPDATED_EGG_GROUPS GEN_LATEST // Since Gen 8, certain Pokémon have gained new egg groups. +// Evolution settings +#define P_FRIENDSHIP_EVO_THRESHOLD GEN_LATEST // Since Gen 8, Pokémon that evolve by friendship evolve at or above 160 friendship instead of 220. + // Breeding settings #define P_NIDORAN_M_DITTO_BREED GEN_LATEST // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat. #define P_INCENSE_BREEDING GEN_LATEST // Since Gen 9, cross-generation Baby Pokémon don't require Incense being held by the parents to be obtained via breeding. diff --git a/src/pokemon.c b/src/pokemon.c index c932979d4f..877bc55a48 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -62,7 +62,11 @@ #define NIGHT_EVO_HOUR_BEGIN 0 #define NIGHT_EVO_HOUR_END 12 +#if P_FRIENDSHIP_EVO_THRESHOLD >= GEN_9 +#define FRIENDSHIP_EVO_THRESHOLD 160 +#else #define FRIENDSHIP_EVO_THRESHOLD 220 +#endif struct SpeciesItem {