From 054f667446e2c786ee9ac98b29406151ec07535f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 22:04:24 -0300 Subject: [PATCH] Config for Kadabra ignoring Everstone upon evolving --- include/constants/pokemon_config.h | 1 + src/pokemon.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 257c06b7c..310e6398a 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -17,6 +17,7 @@ #define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. Requires BATTLE_ENGINE for Gen4+ abilities. #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. +#define P_KADABRA_EVERSTONE GEN_8 // Since Gen 4, Kadabra can evolve even when holding an Everstone. #define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. diff --git a/src/pokemon.c b/src/pokemon.c index 73df906c2..8296614b1 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6430,7 +6430,9 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u holdEffect = ItemId_GetHoldEffect(heldItem); // Prevent evolution with Everstone, unless we're just viewing the party menu with an evolution item - if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE && mode != EVO_MODE_ITEM_CHECK) + if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE + && mode != EVO_MODE_ITEM_CHECK + && (P_KADABRA_EVERSTONE < GEN_4 || species != SPECIES_KADABRA)) return SPECIES_NONE; switch (mode)