mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Merge pull request #1804 from AsparagusEduardo/PE_shedinjaball
Config for Shedinja needing a Poké Ball to be created
This commit is contained in:
commit
07d2f73306
@ -16,6 +16,7 @@
|
||||
#define P_UPDATED_STATS GEN_8 // Since Gen 6, Pokémon stats are updated with each passing generation.
|
||||
#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.
|
||||
|
||||
#ifndef ITEM_EXPANSION
|
||||
//Item Definitions for gEvolutionTable
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "evolution_scene.h"
|
||||
#include "evolution_graphics.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "item.h"
|
||||
#include "link.h"
|
||||
#include "link_rfu.h"
|
||||
#include "m4a.h"
|
||||
@ -548,7 +549,9 @@ static void CB2_TradeEvolutionSceneUpdate(void)
|
||||
static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
||||
{
|
||||
u32 data = 0;
|
||||
if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE)
|
||||
u16 ball = ITEM_POKE_BALL;
|
||||
if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE
|
||||
&& (P_SHEDINJA_BALL == GEN_3 || CheckBagHasItem(ball, 1)))
|
||||
{
|
||||
s32 i;
|
||||
struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount];
|
||||
@ -559,6 +562,11 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, &data);
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, &data);
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, &data);
|
||||
|
||||
#if P_SHEDINJA_BALL >= GEN_4
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_POKEBALL, &ball);
|
||||
RemoveBagItem(ball, 1);
|
||||
#endif
|
||||
|
||||
for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + CONTEST_CATEGORIES_COUNT; i++)
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], i, &data);
|
||||
|
Loading…
Reference in New Issue
Block a user