diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 98879430cb..6119494907 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -545,19 +545,13 @@ static void CB2_TradeEvolutionSceneUpdate(void) static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon) { u32 data = 0; - #if P_SHEDINJA_BALL >= GEN_4 - u16 ball = ITEM_POKE_BALL; - #endif + u16 ball = ITEM_POKE_BALL; const struct Evolution *evolutions = GetSpeciesEvolutions(preEvoSpecies); if (evolutions == NULL) return; - if (evolutions[0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE - #if P_SHEDINJA_BALL >= GEN_4 - && (CheckBagHasItem(ball, 1)) - #endif - ) + if (evolutions[0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE && (P_SHEDINJA_BALL < GEN_4 || CheckBagHasItem(ball, 1))) { s32 i; struct Pokemon *shedinja = &gPlayerParty[gPlayerPartyCount]; @@ -567,10 +561,11 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon) SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, GetSpeciesName(evolutions[1].targetSpecies)); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, &data); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, &data); - #if P_SHEDINJA_BALL >= GEN_4 - SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_POKEBALL, &ball); - RemoveBagItem(ball, 1); - #endif + if (P_SHEDINJA_BALL >= GEN_4) + { + SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_POKEBALL, &ball); + RemoveBagItem(ball, 1); + } for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + CONTEST_CATEGORIES_COUNT; i++) SetMonData(&gPlayerParty[gPlayerPartyCount], i, &data);