From d270892a6bc079358b49a354657b6812f4919f8a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 25 Aug 2021 01:56:16 -0300 Subject: [PATCH 1/2] Corrected `CanEvolve` function --- src/battle_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 7deebd25e3..0de91fc362 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7688,7 +7688,8 @@ static bool32 CanEvolve(u32 species) for (i = 0; i < EVOS_PER_MON; i++) { - if (gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION) + if (gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION + && gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MOVE_MEGA_EVOLUTION) return TRUE; } return FALSE; From e42d329fc695a7e1077740b456d121f02ba0b0d3 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 25 Aug 2021 02:16:38 -0300 Subject: [PATCH 2/2] Small tweak --- src/battle_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 0de91fc362..163af9673c 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7688,8 +7688,9 @@ static bool32 CanEvolve(u32 species) for (i = 0; i < EVOS_PER_MON; i++) { - if (gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION - && gEvolutionTable[species][i].method && gEvolutionTable[species][i].method != EVO_MOVE_MEGA_EVOLUTION) + if (gEvolutionTable[species][i].method + && gEvolutionTable[species][i].method != EVO_MEGA_EVOLUTION + && gEvolutionTable[species][i].method != EVO_MOVE_MEGA_EVOLUTION) return TRUE; } return FALSE;