[LEAK-INFORMED] fix CreateShedinja fakematch
This commit is contained in:
@@ -319,7 +319,6 @@ extern u8 gEnemyPartyCount;
|
|||||||
extern struct Pokemon gEnemyParty[PARTY_SIZE];
|
extern struct Pokemon gEnemyParty[PARTY_SIZE];
|
||||||
extern const struct BaseStats gBaseStats[];
|
extern const struct BaseStats gBaseStats[];
|
||||||
extern const u8 *const gItemEffectTable[];
|
extern const u8 *const gItemEffectTable[];
|
||||||
extern const struct Evolution gEvolutionTable[][EVOS_PER_MON];
|
|
||||||
extern const u8 gStatStageRatios[][2];
|
extern const u8 gStatStageRatios[][2];
|
||||||
extern struct SpriteTemplate gMultiuseSpriteTemplate;
|
extern struct SpriteTemplate gMultiuseSpriteTemplate;
|
||||||
extern struct PokemonStorage* gPokemonStoragePtr;
|
extern struct PokemonStorage* gPokemonStoragePtr;
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
// Combination of RSE's Day-Care (re-used on Four Island), FRLG's Day-Care, and egg_hatch.c
|
// Combination of RSE's Day-Care (re-used on Four Island), FRLG's Day-Care, and egg_hatch.c
|
||||||
|
|
||||||
|
extern struct Evolution gEvolutionTable[][EVOS_PER_MON];
|
||||||
|
|
||||||
struct EggHatchData
|
struct EggHatchData
|
||||||
{
|
{
|
||||||
u8 eggSpriteID;
|
u8 eggSpriteID;
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
#include "constants/songs.h"
|
#include "constants/songs.h"
|
||||||
#include "constants/pokemon.h"
|
#include "constants/pokemon.h"
|
||||||
|
|
||||||
|
extern struct Evolution gEvolutionTable[][EVOS_PER_MON];
|
||||||
|
|
||||||
struct EvoInfo
|
struct EvoInfo
|
||||||
{
|
{
|
||||||
u8 preEvoSpriteId;
|
u8 preEvoSpriteId;
|
||||||
@@ -545,8 +547,6 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
|||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount];
|
struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount];
|
||||||
const struct Evolution *evos;
|
|
||||||
const struct Evolution *evos2;
|
|
||||||
|
|
||||||
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies][1].targetSpecies));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies][1].targetSpecies));
|
||||||
@@ -567,12 +567,8 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
|||||||
CalculateMonStats(&gPlayerParty[gPlayerPartyCount]);
|
CalculateMonStats(&gPlayerParty[gPlayerPartyCount]);
|
||||||
CalculatePlayerPartyCount();
|
CalculatePlayerPartyCount();
|
||||||
|
|
||||||
// can't match it otherwise, ehh
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_SEEN);
|
||||||
evos2 = gEvolutionTable[0];
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_CAUGHT);
|
||||||
evos = evos2 + EVOS_PER_MON * preEvoSpecies;
|
|
||||||
|
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_SEEN);
|
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_CAUGHT);
|
|
||||||
|
|
||||||
if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
||||||
&& GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
|
&& GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
|
||||||
|
|||||||
Reference in New Issue
Block a user