mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Revert "Removed Unown hack"
This commit is contained in:
parent
34d27eca0e
commit
7622d84a4f
@ -202,7 +202,7 @@
|
|||||||
#define SPECIES_MURKROW 198
|
#define SPECIES_MURKROW 198
|
||||||
#define SPECIES_SLOWKING 199
|
#define SPECIES_SLOWKING 199
|
||||||
#define SPECIES_MISDREAVUS 200
|
#define SPECIES_MISDREAVUS 200
|
||||||
#define SPECIES_UNOWN_A 201
|
#define SPECIES_UNOWN 201
|
||||||
#define SPECIES_WOBBUFFET 202
|
#define SPECIES_WOBBUFFET 202
|
||||||
#define SPECIES_GIRAFARIG 203
|
#define SPECIES_GIRAFARIG 203
|
||||||
#define SPECIES_PINECO 204
|
#define SPECIES_PINECO 204
|
||||||
@ -1373,6 +1373,4 @@
|
|||||||
|
|
||||||
#define NUM_SPECIES SPECIES_EGG
|
#define NUM_SPECIES SPECIES_EGG
|
||||||
|
|
||||||
#define SPECIES_UNOWN NUM_SPECIES + 1 // Used for random Unown form based on personality.
|
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_SPECIES_H
|
#endif // GUARD_CONSTANTS_SPECIES_H
|
||||||
|
@ -338,6 +338,7 @@ void SetContestants(u8 contestType, u8 rank);
|
|||||||
void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame);
|
void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame);
|
||||||
u8 GetContestEntryEligibility(struct Pokemon *pkmn);
|
u8 GetContestEntryEligibility(struct Pokemon *pkmn);
|
||||||
void CalculateRound1Points(u8 contestCategory);
|
void CalculateRound1Points(u8 contestCategory);
|
||||||
|
bool8 IsSpeciesNotUnown(u16 species);
|
||||||
bool8 Contest_IsMonsTurnDisabled(u8 contestant);
|
bool8 Contest_IsMonsTurnDisabled(u8 contestant);
|
||||||
void SaveLinkContestResults(void);
|
void SaveLinkContestResults(void);
|
||||||
void SortContestants(bool8 useRanking);
|
void SortContestants(bool8 useRanking);
|
||||||
|
@ -22,6 +22,8 @@ void ClearAllMail(void);
|
|||||||
void ClearMail(struct Mail *mail);
|
void ClearMail(struct Mail *mail);
|
||||||
bool8 MonHasMail(struct Pokemon *mon);
|
bool8 MonHasMail(struct Pokemon *mon);
|
||||||
u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId);
|
u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId);
|
||||||
|
u16 SpeciesToMailSpecies(u16 species, u32 personality);
|
||||||
|
u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer);
|
||||||
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
|
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
|
||||||
void TakeMailFromMon(struct Pokemon *mon);
|
void TakeMailFromMon(struct Pokemon *mon);
|
||||||
void ClearMailItemId(u8 mailId);
|
void ClearMailItemId(u8 mailId);
|
||||||
|
@ -739,7 +739,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
|||||||
battlerSpriteId = gBattlerSpriteIds[battlerId];
|
battlerSpriteId = gBattlerSpriteIds[battlerId];
|
||||||
|
|
||||||
gBattle_BG1_X = -(gSprites[battlerSpriteId].x + gSprites[battlerSpriteId].x2) + 0x20;
|
gBattle_BG1_X = -(gSprites[battlerSpriteId].x + gSprites[battlerSpriteId].x2) + 0x20;
|
||||||
if (IsContest())
|
if (IsContest() && IsSpeciesNotUnown(gContestResources->moveAnim->species))
|
||||||
gBattle_BG1_X--;
|
gBattle_BG1_X--;
|
||||||
|
|
||||||
gBattle_BG1_Y = -(gSprites[battlerSpriteId].y + gSprites[battlerSpriteId].y2) + 0x20;
|
gBattle_BG1_Y = -(gSprites[battlerSpriteId].y + gSprites[battlerSpriteId].y2) + 0x20;
|
||||||
@ -797,6 +797,8 @@ static void FlipBattlerBgTiles(void)
|
|||||||
struct BattleAnimBgData animBg;
|
struct BattleAnimBgData animBg;
|
||||||
u16 *ptr;
|
u16 *ptr;
|
||||||
|
|
||||||
|
if (IsSpeciesNotUnown(gContestResources->moveAnim->species))
|
||||||
|
{
|
||||||
GetBattleAnimBg1Data(&animBg);
|
GetBattleAnimBg1Data(&animBg);
|
||||||
ptr = animBg.bgTilemap;
|
ptr = animBg.bgTilemap;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
@ -812,6 +814,7 @@ static void FlipBattlerBgTiles(void)
|
|||||||
for (j = 0; j < 8; j++)
|
for (j = 0; j < 8; j++)
|
||||||
ptr[j + i * 32] ^= 0x400;
|
ptr[j + i * 32] ^= 0x400;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RelocateBattleBgPal(u16 paletteNum, u16 *dest, u32 offset, bool8 largeScreen)
|
void RelocateBattleBgPal(u16 paletteNum, u16 *dest, u32 offset, bool8 largeScreen)
|
||||||
|
@ -2378,7 +2378,33 @@ void AnimTask_TransformMon(u8 taskId)
|
|||||||
LoadBgTiles(1, animBg.bgTiles, 0x800, animBg.tilesOffset);
|
LoadBgTiles(1, animBg.bgTiles, 0x800, animBg.tilesOffset);
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
|
if (IsSpeciesNotUnown(gContestResources->moveAnim->species) != IsSpeciesNotUnown(gContestResources->moveAnim->targetSpecies))
|
||||||
|
{
|
||||||
|
bgTilemap = (u16 *)animBg.bgTilemap;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
for (j = 0; j < 4; j++)
|
||||||
|
{
|
||||||
|
u16 temp = bgTilemap[j + i * 0x20];
|
||||||
|
bgTilemap[j + i * 0x20] = bgTilemap[(7 - j) + i * 0x20];
|
||||||
|
bgTilemap[(7 - j) + i * 0x20] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
for (j = 0; j < 8; j++)
|
||||||
|
{
|
||||||
|
bgTilemap[j + i * 0x20] ^= 0x400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsSpeciesNotUnown(gContestResources->moveAnim->targetSpecies))
|
||||||
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteContest;
|
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteContest;
|
||||||
|
else
|
||||||
|
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteOpponentSide;
|
||||||
|
|
||||||
StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimAttacker]], BATTLER_AFFINE_NORMAL);
|
StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimAttacker]], BATTLER_AFFINE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,22 +177,65 @@ u8 GetBattlerYDelta(u8 battlerId, u16 species)
|
|||||||
|
|
||||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER || IsContest())
|
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER || IsContest())
|
||||||
{
|
{
|
||||||
if (species == SPECIES_CASTFORM)
|
if (species == SPECIES_UNOWN)
|
||||||
ret = sCastformBackSpriteYCoords[gBattleMonForms[battlerId]];
|
{
|
||||||
else if (species > NUM_SPECIES)
|
if (IsContest())
|
||||||
ret = gMonBackPicCoords[0].y_offset;
|
{
|
||||||
|
if (gContestResources->moveAnim->hasTargetAnim)
|
||||||
|
personality = gContestResources->moveAnim->targetPersonality;
|
||||||
else
|
else
|
||||||
ret = gMonBackPicCoords[species].y_offset;
|
personality = gContestResources->moveAnim->personality;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (species == SPECIES_CASTFORM)
|
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||||
ret = gCastformFrontSpriteCoords[gBattleMonForms[battlerId]].y_offset;
|
if (!spriteInfo[battlerId].transformSpecies)
|
||||||
else if (species > NUM_SPECIES)
|
personality = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY);
|
||||||
ret = gMonFrontPicCoords[0].y_offset;
|
|
||||||
else
|
else
|
||||||
|
personality = gTransformedPersonalities[battlerId];
|
||||||
|
}
|
||||||
|
coordSpecies = GetUnownSpeciesId(personality);
|
||||||
|
ret = gMonBackPicCoords[coordSpecies].y_offset;
|
||||||
|
}
|
||||||
|
else if (species == SPECIES_CASTFORM)
|
||||||
|
{
|
||||||
|
ret = sCastformBackSpriteYCoords[gBattleMonForms[battlerId]];
|
||||||
|
}
|
||||||
|
else if (species > NUM_SPECIES)
|
||||||
|
{
|
||||||
|
ret = gMonBackPicCoords[0].y_offset;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = gMonBackPicCoords[species].y_offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (species == SPECIES_UNOWN)
|
||||||
|
{
|
||||||
|
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||||
|
if (!spriteInfo[battlerId].transformSpecies)
|
||||||
|
personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY);
|
||||||
|
else
|
||||||
|
personality = gTransformedPersonalities[battlerId];
|
||||||
|
|
||||||
|
coordSpecies = GetUnownSpeciesId(personality);
|
||||||
|
ret = gMonFrontPicCoords[coordSpecies].y_offset;
|
||||||
|
}
|
||||||
|
else if (species == SPECIES_CASTFORM)
|
||||||
|
{
|
||||||
|
ret = gCastformFrontSpriteCoords[gBattleMonForms[battlerId]].y_offset;
|
||||||
|
}
|
||||||
|
else if (species > NUM_SPECIES)
|
||||||
|
{
|
||||||
|
ret = gMonFrontPicCoords[0].y_offset;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ret = gMonFrontPicCoords[species].y_offset;
|
ret = gMonFrontPicCoords[species].y_offset;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1274,7 +1317,17 @@ void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation)
|
|||||||
// Pokémon in Contests (except Unown) should be flipped.
|
// Pokémon in Contests (except Unown) should be flipped.
|
||||||
static bool8 ShouldRotScaleSpeciesBeFlipped(void)
|
static bool8 ShouldRotScaleSpeciesBeFlipped(void)
|
||||||
{
|
{
|
||||||
return IsContest();
|
if (IsContest())
|
||||||
|
{
|
||||||
|
if (gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].data[2] == SPECIES_UNOWN)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 objMode)
|
void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 objMode)
|
||||||
@ -2144,8 +2197,12 @@ s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 attr)
|
|||||||
species = gContestResources->moveAnim->species;
|
species = gContestResources->moveAnim->species;
|
||||||
personality = gContestResources->moveAnim->personality;
|
personality = gContestResources->moveAnim->personality;
|
||||||
}
|
}
|
||||||
|
if (species == SPECIES_UNOWN)
|
||||||
if (species == SPECIES_CASTFORM)
|
{
|
||||||
|
species = GetUnownSpeciesId(personality);
|
||||||
|
coords = &gMonBackPicCoords[species];
|
||||||
|
}
|
||||||
|
else if (species == SPECIES_CASTFORM)
|
||||||
{
|
{
|
||||||
coords = &gCastformFrontSpriteCoords[gBattleMonForms[battlerId]];
|
coords = &gCastformFrontSpriteCoords[gBattleMonForms[battlerId]];
|
||||||
}
|
}
|
||||||
@ -2174,11 +2231,20 @@ s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 attr)
|
|||||||
personality = gTransformedPersonalities[battlerId];
|
personality = gTransformedPersonalities[battlerId];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (species > NUM_SPECIES)
|
if (species == SPECIES_UNOWN)
|
||||||
coords = &gMonBackPicCoords[0];
|
{
|
||||||
else
|
species = GetUnownSpeciesId(personality);
|
||||||
coords = &gMonBackPicCoords[species];
|
coords = &gMonBackPicCoords[species];
|
||||||
}
|
}
|
||||||
|
else if (species > NUM_SPECIES)
|
||||||
|
{
|
||||||
|
coords = &gMonBackPicCoords[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
coords = &gMonBackPicCoords[species];
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||||
@ -2193,13 +2259,24 @@ s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 attr)
|
|||||||
personality = gTransformedPersonalities[battlerId];
|
personality = gTransformedPersonalities[battlerId];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (species == SPECIES_CASTFORM)
|
if (species == SPECIES_UNOWN)
|
||||||
coords = &gCastformFrontSpriteCoords[gBattleMonForms[battlerId]];
|
{
|
||||||
else if (species > NUM_SPECIES)
|
species = GetUnownSpeciesId(personality);
|
||||||
coords = &gMonFrontPicCoords[0];
|
|
||||||
else
|
|
||||||
coords = &gMonFrontPicCoords[species];
|
coords = &gMonFrontPicCoords[species];
|
||||||
}
|
}
|
||||||
|
else if (species == SPECIES_CASTFORM)
|
||||||
|
{
|
||||||
|
coords = &gCastformFrontSpriteCoords[gBattleMonForms[battlerId]];
|
||||||
|
}
|
||||||
|
else if (species > NUM_SPECIES)
|
||||||
|
{
|
||||||
|
coords = &gMonFrontPicCoords[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
coords = &gMonFrontPicCoords[species];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (attr)
|
switch (attr)
|
||||||
|
@ -334,7 +334,7 @@ static void GenerateOpponentMons(void)
|
|||||||
u16 monId = GetFactoryMonId(lvlMode, challengeNum, FALSE);
|
u16 monId = GetFactoryMonId(lvlMode, challengeNum, FALSE);
|
||||||
|
|
||||||
// Unown (FRONTIER_MON_UNOWN) is forbidden on opponent Factory teams.
|
// Unown (FRONTIER_MON_UNOWN) is forbidden on opponent Factory teams.
|
||||||
if (GET_BASE_SPECIES_ID(gFacilityTrainerMons[monId].species) == SPECIES_UNOWN_A)
|
if (gFacilityTrainerMons[monId].species == SPECIES_UNOWN)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player
|
// Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player
|
||||||
@ -559,7 +559,7 @@ static void GenerateInitialRentalMons(void)
|
|||||||
else
|
else
|
||||||
monId = GetFactoryMonId(factoryLvlMode, challengeNum, FALSE);
|
monId = GetFactoryMonId(factoryLvlMode, challengeNum, FALSE);
|
||||||
|
|
||||||
if (GET_BASE_SPECIES_ID(gFacilityTrainerMons[monId].species) == SPECIES_UNOWN_A)
|
if (gFacilityTrainerMons[monId].species == SPECIES_UNOWN)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Cannot have two pokemon of the same species.
|
// Cannot have two pokemon of the same species.
|
||||||
@ -771,7 +771,7 @@ void FillFactoryBrainParty(void)
|
|||||||
{
|
{
|
||||||
u16 monId = GetFactoryMonId(lvlMode, challengeNum, FALSE);
|
u16 monId = GetFactoryMonId(lvlMode, challengeNum, FALSE);
|
||||||
|
|
||||||
if (GET_BASE_SPECIES_ID(gFacilityTrainerMons[monId].species) == SPECIES_UNOWN_A)
|
if (gFacilityTrainerMons[monId].species == SPECIES_UNOWN)
|
||||||
continue;
|
continue;
|
||||||
if (monLevel == FRONTIER_MAX_LEVEL_50 && monId > FRONTIER_MONS_HIGH_TIER)
|
if (monLevel == FRONTIER_MAX_LEVEL_50 && monId > FRONTIER_MONS_HIGH_TIER)
|
||||||
continue;
|
continue;
|
||||||
|
@ -2662,7 +2662,12 @@ void SpriteCB_FaintOpponentMon(struct Sprite *sprite)
|
|||||||
|
|
||||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_PERSONALITY); // Unused return value.
|
GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_PERSONALITY); // Unused return value.
|
||||||
|
|
||||||
if (species == SPECIES_CASTFORM)
|
if (species == SPECIES_UNOWN)
|
||||||
|
{
|
||||||
|
species = GetUnownSpeciesId(personality);
|
||||||
|
yOffset = gMonFrontPicCoords[species].y_offset;
|
||||||
|
}
|
||||||
|
else if (species == SPECIES_CASTFORM)
|
||||||
{
|
{
|
||||||
yOffset = gCastformFrontSpriteCoords[gBattleMonForms[battler]].y_offset;
|
yOffset = gCastformFrontSpriteCoords[gBattleMonForms[battler]].y_offset;
|
||||||
}
|
}
|
||||||
|
@ -3136,12 +3136,23 @@ static u8 CreateContestantSprite(u16 species, u32 otId, u32 personality, u32 ind
|
|||||||
gSprites[spriteId].callback = SpriteCallbackDummy;
|
gSprites[spriteId].callback = SpriteCallbackDummy;
|
||||||
gSprites[spriteId].data[0] = gSprites[spriteId].oam.paletteNum;
|
gSprites[spriteId].data[0] = gSprites[spriteId].oam.paletteNum;
|
||||||
gSprites[spriteId].data[2] = species;
|
gSprites[spriteId].data[2] = species;
|
||||||
|
if (IsSpeciesNotUnown(species))
|
||||||
gSprites[spriteId].affineAnims = gAffineAnims_BattleSpriteContest;
|
gSprites[spriteId].affineAnims = gAffineAnims_BattleSpriteContest;
|
||||||
|
else
|
||||||
|
gSprites[spriteId].affineAnims = gAffineAnims_BattleSpriteOpponentSide;
|
||||||
StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_NORMAL);
|
StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_NORMAL);
|
||||||
|
|
||||||
return spriteId;
|
return spriteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool8 IsSpeciesNotUnown(u16 species)
|
||||||
|
{
|
||||||
|
if (species == SPECIES_UNOWN)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// The contestant info windows and general-purpose text box are drawn on one half, while
|
// The contestant info windows and general-purpose text box are drawn on one half, while
|
||||||
// the moves and move description windows are drawn on another screen. Only the first 32 * 20
|
// the moves and move description windows are drawn on another screen. Only the first 32 * 20
|
||||||
// tiles are actually drawn on screen.
|
// tiles are actually drawn on screen.
|
||||||
|
@ -1612,7 +1612,7 @@ const struct BardSound gBardSounds_Pokemon[NUM_SPECIES][6] = {
|
|||||||
NULL_BARD_SOUND,
|
NULL_BARD_SOUND,
|
||||||
NULL_BARD_SOUND,
|
NULL_BARD_SOUND,
|
||||||
},
|
},
|
||||||
[SPECIES_UNOWN_A] = {
|
[SPECIES_UNOWN] = {
|
||||||
{ .songLengthId = 42 },
|
{ .songLengthId = 42 },
|
||||||
{ .songLengthId = 26 },
|
{ .songLengthId = 26 },
|
||||||
{ .songLengthId = 51 },
|
{ .songLengthId = 51 },
|
||||||
|
@ -229,7 +229,7 @@ const u16 gEasyChatGroup_Pokemon2[] = {
|
|||||||
SPECIES_TYRANITAR,
|
SPECIES_TYRANITAR,
|
||||||
SPECIES_TYROGUE,
|
SPECIES_TYROGUE,
|
||||||
SPECIES_UMBREON,
|
SPECIES_UMBREON,
|
||||||
SPECIES_UNOWN_A,
|
SPECIES_UNOWN,
|
||||||
SPECIES_URSARING,
|
SPECIES_URSARING,
|
||||||
SPECIES_VAPOREON,
|
SPECIES_VAPOREON,
|
||||||
SPECIES_VENOMOTH,
|
SPECIES_VENOMOTH,
|
||||||
|
@ -1770,7 +1770,7 @@ const u16 gEasyChatWordsByLetter_U[] = {
|
|||||||
EC_WORD_UNDERSTANDS,
|
EC_WORD_UNDERSTANDS,
|
||||||
EC_WORD_UNDERSTOOD,
|
EC_WORD_UNDERSTOOD,
|
||||||
EC_WORD_UNION,
|
EC_WORD_UNION,
|
||||||
EC_POKEMON_NATIONAL(UNOWN_A),
|
EC_POKEMON_NATIONAL(UNOWN),
|
||||||
EC_WORD_UNTIL,
|
EC_WORD_UNTIL,
|
||||||
EC_WORD_UP,
|
EC_WORD_UP,
|
||||||
EC_WORD_UPBEAT,
|
EC_WORD_UPBEAT,
|
||||||
|
@ -51,7 +51,7 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] =
|
|||||||
[SPECIES_SLOWKING] = sSlowkingFormSpeciesIdTable,
|
[SPECIES_SLOWKING] = sSlowkingFormSpeciesIdTable,
|
||||||
[SPECIES_QWILFISH] = sQwilfishFormSpeciesIdTable,
|
[SPECIES_QWILFISH] = sQwilfishFormSpeciesIdTable,
|
||||||
[SPECIES_SNEASEL] = sSneaselFormSpeciesIdTable,
|
[SPECIES_SNEASEL] = sSneaselFormSpeciesIdTable,
|
||||||
[SPECIES_UNOWN_A] = sUnownFormSpeciesIdTable,
|
[SPECIES_UNOWN] = sUnownFormSpeciesIdTable,
|
||||||
[SPECIES_STEELIX] = sSteelixFormSpeciesIdTable,
|
[SPECIES_STEELIX] = sSteelixFormSpeciesIdTable,
|
||||||
[SPECIES_SCIZOR] = sScizorFormSpeciesIdTable,
|
[SPECIES_SCIZOR] = sScizorFormSpeciesIdTable,
|
||||||
[SPECIES_HERACROSS] = sHeracrossFormSpeciesIdTable,
|
[SPECIES_HERACROSS] = sHeracrossFormSpeciesIdTable,
|
||||||
|
@ -322,7 +322,7 @@ static const u16 sSneaselFormSpeciesIdTable[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sUnownFormSpeciesIdTable[] = {
|
static const u16 sUnownFormSpeciesIdTable[] = {
|
||||||
SPECIES_UNOWN_A,
|
SPECIES_UNOWN,
|
||||||
SPECIES_UNOWN_B,
|
SPECIES_UNOWN_B,
|
||||||
SPECIES_UNOWN_C,
|
SPECIES_UNOWN_C,
|
||||||
SPECIES_UNOWN_D,
|
SPECIES_UNOWN_D,
|
||||||
|
@ -201,7 +201,7 @@ const struct LevelUpMove *const gLevelUpLearnsets[NUM_SPECIES] =
|
|||||||
[SPECIES_MURKROW] = sMurkrowLevelUpLearnset,
|
[SPECIES_MURKROW] = sMurkrowLevelUpLearnset,
|
||||||
[SPECIES_SLOWKING] = sSlowkingLevelUpLearnset,
|
[SPECIES_SLOWKING] = sSlowkingLevelUpLearnset,
|
||||||
[SPECIES_MISDREAVUS] = sMisdreavusLevelUpLearnset,
|
[SPECIES_MISDREAVUS] = sMisdreavusLevelUpLearnset,
|
||||||
[SPECIES_UNOWN_A] = sUnownLevelUpLearnset,
|
[SPECIES_UNOWN] = sUnownLevelUpLearnset,
|
||||||
[SPECIES_WOBBUFFET] = sWobbuffetLevelUpLearnset,
|
[SPECIES_WOBBUFFET] = sWobbuffetLevelUpLearnset,
|
||||||
[SPECIES_GIRAFARIG] = sGirafarigLevelUpLearnset,
|
[SPECIES_GIRAFARIG] = sGirafarigLevelUpLearnset,
|
||||||
[SPECIES_PINECO] = sPinecoLevelUpLearnset,
|
[SPECIES_PINECO] = sPinecoLevelUpLearnset,
|
||||||
|
@ -5941,7 +5941,7 @@ const struct SpeciesInfo gSpeciesInfo[] =
|
|||||||
.noFlip = FALSE,
|
.noFlip = FALSE,
|
||||||
},
|
},
|
||||||
|
|
||||||
[SPECIES_UNOWN_A] = UNOWN_SPECIES_INFO(FLIP),
|
[SPECIES_UNOWN] = UNOWN_SPECIES_INFO(FLIP),
|
||||||
|
|
||||||
[SPECIES_WOBBUFFET] =
|
[SPECIES_WOBBUFFET] =
|
||||||
{
|
{
|
||||||
|
@ -201,7 +201,7 @@ const u16 *const gTeachableLearnsets[NUM_SPECIES] =
|
|||||||
[SPECIES_MURKROW] = sMurkrowTeachableLearnset,
|
[SPECIES_MURKROW] = sMurkrowTeachableLearnset,
|
||||||
[SPECIES_SLOWKING] = sSlowkingTeachableLearnset,
|
[SPECIES_SLOWKING] = sSlowkingTeachableLearnset,
|
||||||
[SPECIES_MISDREAVUS] = sMisdreavusTeachableLearnset,
|
[SPECIES_MISDREAVUS] = sMisdreavusTeachableLearnset,
|
||||||
[SPECIES_UNOWN_A] = sUnownTeachableLearnset,
|
[SPECIES_UNOWN] = sUnownTeachableLearnset,
|
||||||
[SPECIES_WOBBUFFET] = sWobbuffetTeachableLearnset,
|
[SPECIES_WOBBUFFET] = sWobbuffetTeachableLearnset,
|
||||||
[SPECIES_GIRAFARIG] = sGirafarigTeachableLearnset,
|
[SPECIES_GIRAFARIG] = sGirafarigTeachableLearnset,
|
||||||
[SPECIES_PINECO] = sPinecoTeachableLearnset,
|
[SPECIES_PINECO] = sPinecoTeachableLearnset,
|
||||||
|
@ -224,7 +224,7 @@ const struct MonCoords gMonBackPicCoords[] =
|
|||||||
[SPECIES_MURKROW] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 10 },
|
[SPECIES_MURKROW] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 10 },
|
||||||
[SPECIES_SLOWKING] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 3 },
|
[SPECIES_SLOWKING] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 3 },
|
||||||
[SPECIES_MISDREAVUS] = { .size = MON_COORDS_SIZE(56, 48), .y_offset = 9 },
|
[SPECIES_MISDREAVUS] = { .size = MON_COORDS_SIZE(56, 48), .y_offset = 9 },
|
||||||
[SPECIES_UNOWN_A] = { .size = MON_COORDS_SIZE(24, 48), .y_offset = 8 },
|
[SPECIES_UNOWN] = { .size = MON_COORDS_SIZE(24, 48), .y_offset = 8 },
|
||||||
[SPECIES_WOBBUFFET] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 10 },
|
[SPECIES_WOBBUFFET] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 10 },
|
||||||
[SPECIES_GIRAFARIG] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 1 },
|
[SPECIES_GIRAFARIG] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 1 },
|
||||||
[SPECIES_PINECO] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 13 },
|
[SPECIES_PINECO] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 13 },
|
||||||
|
@ -201,7 +201,7 @@ const struct CompressedSpriteSheet gMonBackPicTable[] =
|
|||||||
SPECIES_SPRITE(MURKROW, gMonBackPic_Murkrow),
|
SPECIES_SPRITE(MURKROW, gMonBackPic_Murkrow),
|
||||||
SPECIES_SPRITE(SLOWKING, gMonBackPic_Slowking),
|
SPECIES_SPRITE(SLOWKING, gMonBackPic_Slowking),
|
||||||
SPECIES_SPRITE(MISDREAVUS, gMonBackPic_Misdreavus),
|
SPECIES_SPRITE(MISDREAVUS, gMonBackPic_Misdreavus),
|
||||||
SPECIES_SPRITE(UNOWN_A, gMonBackPic_Unown),
|
SPECIES_SPRITE(UNOWN, gMonBackPic_Unown),
|
||||||
SPECIES_SPRITE(WOBBUFFET, gMonBackPic_Wobbuffet),
|
SPECIES_SPRITE(WOBBUFFET, gMonBackPic_Wobbuffet),
|
||||||
SPECIES_SPRITE(GIRAFARIG, gMonBackPic_Girafarig),
|
SPECIES_SPRITE(GIRAFARIG, gMonBackPic_Girafarig),
|
||||||
SPECIES_SPRITE(PINECO, gMonBackPic_Pineco),
|
SPECIES_SPRITE(PINECO, gMonBackPic_Pineco),
|
||||||
|
@ -27,7 +27,7 @@ const u8 gEnemyMonElevation[NUM_SPECIES] =
|
|||||||
[SPECIES_YANMA] = 13,
|
[SPECIES_YANMA] = 13,
|
||||||
[SPECIES_MURKROW] = 12,
|
[SPECIES_MURKROW] = 12,
|
||||||
[SPECIES_MISDREAVUS] = 12,
|
[SPECIES_MISDREAVUS] = 12,
|
||||||
[SPECIES_UNOWN_A] = 8,
|
[SPECIES_UNOWN] = 8,
|
||||||
[SPECIES_GLIGAR] = 8,
|
[SPECIES_GLIGAR] = 8,
|
||||||
[SPECIES_MANTINE] = 6,
|
[SPECIES_MANTINE] = 6,
|
||||||
[SPECIES_PORYGON2] = 9,
|
[SPECIES_PORYGON2] = 9,
|
||||||
|
@ -201,7 +201,7 @@ const u8 *const gMonFootprintTable[] =
|
|||||||
[SPECIES_MURKROW] = gMonFootprint_Murkrow,
|
[SPECIES_MURKROW] = gMonFootprint_Murkrow,
|
||||||
[SPECIES_SLOWKING] = gMonFootprint_Slowking,
|
[SPECIES_SLOWKING] = gMonFootprint_Slowking,
|
||||||
[SPECIES_MISDREAVUS] = gMonFootprint_Misdreavus,
|
[SPECIES_MISDREAVUS] = gMonFootprint_Misdreavus,
|
||||||
[SPECIES_UNOWN_A] = gMonFootprint_Unown,
|
[SPECIES_UNOWN] = gMonFootprint_Unown,
|
||||||
[SPECIES_WOBBUFFET] = gMonFootprint_Wobbuffet,
|
[SPECIES_WOBBUFFET] = gMonFootprint_Wobbuffet,
|
||||||
[SPECIES_GIRAFARIG] = gMonFootprint_Girafarig,
|
[SPECIES_GIRAFARIG] = gMonFootprint_Girafarig,
|
||||||
[SPECIES_PINECO] = gMonFootprint_Pineco,
|
[SPECIES_PINECO] = gMonFootprint_Pineco,
|
||||||
|
@ -2342,7 +2342,7 @@ static const union AnimCmd sAnim_Misdreavus_1[] =
|
|||||||
ANIMCMD_END,
|
ANIMCMD_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd sAnim_UnownA_1[] =
|
static const union AnimCmd sAnim_Unown_1[] =
|
||||||
{
|
{
|
||||||
ANIMCMD_FRAME(0, 30),
|
ANIMCMD_FRAME(0, 30),
|
||||||
ANIMCMD_FRAME(1, 30),
|
ANIMCMD_FRAME(1, 30),
|
||||||
@ -10704,7 +10704,7 @@ SINGLE_ANIMATION(Umbreon);
|
|||||||
SINGLE_ANIMATION(Murkrow);
|
SINGLE_ANIMATION(Murkrow);
|
||||||
SINGLE_ANIMATION(Slowking);
|
SINGLE_ANIMATION(Slowking);
|
||||||
SINGLE_ANIMATION(Misdreavus);
|
SINGLE_ANIMATION(Misdreavus);
|
||||||
SINGLE_ANIMATION(UnownA);
|
SINGLE_ANIMATION(Unown);
|
||||||
DOUBLE_ANIMATION(Wobbuffet);
|
DOUBLE_ANIMATION(Wobbuffet);
|
||||||
DOUBLE_ANIMATION(Girafarig);
|
DOUBLE_ANIMATION(Girafarig);
|
||||||
SINGLE_ANIMATION(Pineco);
|
SINGLE_ANIMATION(Pineco);
|
||||||
@ -11840,7 +11840,7 @@ const union AnimCmd *const *const gMonFrontAnimsPtrTable[] =
|
|||||||
[SPECIES_MURKROW] = sAnims_Murkrow,
|
[SPECIES_MURKROW] = sAnims_Murkrow,
|
||||||
[SPECIES_SLOWKING] = sAnims_Slowking,
|
[SPECIES_SLOWKING] = sAnims_Slowking,
|
||||||
[SPECIES_MISDREAVUS] = sAnims_Misdreavus,
|
[SPECIES_MISDREAVUS] = sAnims_Misdreavus,
|
||||||
[SPECIES_UNOWN_A] = sAnims_UnownA,
|
[SPECIES_UNOWN] = sAnims_Unown,
|
||||||
[SPECIES_WOBBUFFET] = sAnims_Wobbuffet,
|
[SPECIES_WOBBUFFET] = sAnims_Wobbuffet,
|
||||||
[SPECIES_GIRAFARIG] = sAnims_Girafarig,
|
[SPECIES_GIRAFARIG] = sAnims_Girafarig,
|
||||||
[SPECIES_PINECO] = sAnims_Pineco,
|
[SPECIES_PINECO] = sAnims_Pineco,
|
||||||
|
@ -205,7 +205,7 @@ const struct MonCoords gMonFrontPicCoords[] =
|
|||||||
[SPECIES_MURKROW] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 15 },
|
[SPECIES_MURKROW] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 15 },
|
||||||
[SPECIES_SLOWKING] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 1 },
|
[SPECIES_SLOWKING] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 1 },
|
||||||
[SPECIES_MISDREAVUS] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 13 },
|
[SPECIES_MISDREAVUS] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 13 },
|
||||||
[SPECIES_UNOWN_A] = { .size = MON_COORDS_SIZE(24, 40), .y_offset = 15 },
|
[SPECIES_UNOWN] = { .size = MON_COORDS_SIZE(24, 40), .y_offset = 15 },
|
||||||
[SPECIES_WOBBUFFET] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 5 },
|
[SPECIES_WOBBUFFET] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 5 },
|
||||||
[SPECIES_GIRAFARIG] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 },
|
[SPECIES_GIRAFARIG] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 },
|
||||||
[SPECIES_PINECO] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 12 },
|
[SPECIES_PINECO] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 12 },
|
||||||
|
@ -201,7 +201,7 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] =
|
|||||||
SPECIES_SPRITE(MURKROW, gMonFrontPic_Murkrow),
|
SPECIES_SPRITE(MURKROW, gMonFrontPic_Murkrow),
|
||||||
SPECIES_SPRITE(SLOWKING, gMonFrontPic_Slowking),
|
SPECIES_SPRITE(SLOWKING, gMonFrontPic_Slowking),
|
||||||
SPECIES_SPRITE(MISDREAVUS, gMonFrontPic_Misdreavus),
|
SPECIES_SPRITE(MISDREAVUS, gMonFrontPic_Misdreavus),
|
||||||
SPECIES_SPRITE(UNOWN_A, gMonFrontPic_Unown),
|
SPECIES_SPRITE(UNOWN, gMonFrontPic_Unown),
|
||||||
SPECIES_SPRITE(WOBBUFFET, gMonFrontPic_Wobbuffet),
|
SPECIES_SPRITE(WOBBUFFET, gMonFrontPic_Wobbuffet),
|
||||||
SPECIES_SPRITE(GIRAFARIG, gMonFrontPic_Girafarig),
|
SPECIES_SPRITE(GIRAFARIG, gMonFrontPic_Girafarig),
|
||||||
SPECIES_SPRITE(PINECO, gMonFrontPic_Pineco),
|
SPECIES_SPRITE(PINECO, gMonFrontPic_Pineco),
|
||||||
|
@ -201,7 +201,7 @@ const struct CompressedSpritePalette gMonPaletteTable[] =
|
|||||||
SPECIES_PAL(MURKROW, gMonPalette_Murkrow),
|
SPECIES_PAL(MURKROW, gMonPalette_Murkrow),
|
||||||
SPECIES_PAL(SLOWKING, gMonPalette_Slowking),
|
SPECIES_PAL(SLOWKING, gMonPalette_Slowking),
|
||||||
SPECIES_PAL(MISDREAVUS, gMonPalette_Misdreavus),
|
SPECIES_PAL(MISDREAVUS, gMonPalette_Misdreavus),
|
||||||
SPECIES_PAL(UNOWN_A, gMonPalette_Unown),
|
SPECIES_PAL(UNOWN, gMonPalette_Unown),
|
||||||
SPECIES_PAL(WOBBUFFET, gMonPalette_Wobbuffet),
|
SPECIES_PAL(WOBBUFFET, gMonPalette_Wobbuffet),
|
||||||
SPECIES_PAL(GIRAFARIG, gMonPalette_Girafarig),
|
SPECIES_PAL(GIRAFARIG, gMonPalette_Girafarig),
|
||||||
SPECIES_PAL(PINECO, gMonPalette_Pineco),
|
SPECIES_PAL(PINECO, gMonPalette_Pineco),
|
||||||
|
@ -201,7 +201,7 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] =
|
|||||||
SPECIES_SHINY_PAL(MURKROW, gMonShinyPalette_Murkrow),
|
SPECIES_SHINY_PAL(MURKROW, gMonShinyPalette_Murkrow),
|
||||||
SPECIES_SHINY_PAL(SLOWKING, gMonShinyPalette_Slowking),
|
SPECIES_SHINY_PAL(SLOWKING, gMonShinyPalette_Slowking),
|
||||||
SPECIES_SHINY_PAL(MISDREAVUS, gMonShinyPalette_Misdreavus),
|
SPECIES_SHINY_PAL(MISDREAVUS, gMonShinyPalette_Misdreavus),
|
||||||
SPECIES_SHINY_PAL(UNOWN_A, gMonShinyPalette_Unown),
|
SPECIES_SHINY_PAL(UNOWN, gMonShinyPalette_Unown),
|
||||||
SPECIES_SHINY_PAL(WOBBUFFET, gMonShinyPalette_Wobbuffet),
|
SPECIES_SHINY_PAL(WOBBUFFET, gMonShinyPalette_Wobbuffet),
|
||||||
SPECIES_SHINY_PAL(GIRAFARIG, gMonShinyPalette_Girafarig),
|
SPECIES_SHINY_PAL(GIRAFARIG, gMonShinyPalette_Girafarig),
|
||||||
SPECIES_SHINY_PAL(PINECO, gMonShinyPalette_Pineco),
|
SPECIES_SHINY_PAL(PINECO, gMonShinyPalette_Pineco),
|
||||||
|
@ -200,7 +200,7 @@ const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1] = {
|
|||||||
[SPECIES_MURKROW] = _("Murkrow"),
|
[SPECIES_MURKROW] = _("Murkrow"),
|
||||||
[SPECIES_SLOWKING] = _("Slowking"),
|
[SPECIES_SLOWKING] = _("Slowking"),
|
||||||
[SPECIES_MISDREAVUS] = _("Misdreavus"),
|
[SPECIES_MISDREAVUS] = _("Misdreavus"),
|
||||||
[SPECIES_UNOWN_A] = _("Unown"),
|
[SPECIES_UNOWN] = _("Unown"),
|
||||||
[SPECIES_WOBBUFFET] = _("Wobbuffet"),
|
[SPECIES_WOBBUFFET] = _("Wobbuffet"),
|
||||||
[SPECIES_GIRAFARIG] = _("Girafarig"),
|
[SPECIES_GIRAFARIG] = _("Girafarig"),
|
||||||
[SPECIES_PINECO] = _("Pineco"),
|
[SPECIES_PINECO] = _("Pineco"),
|
||||||
|
@ -83,7 +83,16 @@ void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 pe
|
|||||||
|
|
||||||
void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic)
|
void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic)
|
||||||
{
|
{
|
||||||
if (species > NUM_SPECIES) // is species unknown? draw the ? icon
|
if (species == SPECIES_UNOWN)
|
||||||
|
{
|
||||||
|
u32 id = GetUnownSpeciesId(personality);
|
||||||
|
|
||||||
|
if (!isFrontPic)
|
||||||
|
LZ77UnCompWram(gMonBackPicTable[id].data, dest);
|
||||||
|
else
|
||||||
|
LZ77UnCompWram(gMonFrontPicTable[id].data, dest);
|
||||||
|
}
|
||||||
|
else if (species > NUM_SPECIES) // is species unknown? draw the ? icon
|
||||||
{
|
{
|
||||||
if (isFrontPic)
|
if (isFrontPic)
|
||||||
LZ77UnCompWram(gMonFrontPicTable[0].data, dest);
|
LZ77UnCompWram(gMonFrontPicTable[0].data, dest);
|
||||||
|
@ -445,6 +445,7 @@ static const struct MailLayout sMailLayouts_Tall[] = {
|
|||||||
|
|
||||||
void ReadMail(struct Mail *mail, void (*exitCallback)(void), bool8 hasText)
|
void ReadMail(struct Mail *mail, void (*exitCallback)(void), bool8 hasText)
|
||||||
{
|
{
|
||||||
|
u16 buffer[2];
|
||||||
u16 species;
|
u16 species;
|
||||||
|
|
||||||
sMailRead = AllocZeroed(sizeof(*sMailRead));
|
sMailRead = AllocZeroed(sizeof(*sMailRead));
|
||||||
@ -472,7 +473,8 @@ void ReadMail(struct Mail *mail, void (*exitCallback)(void), bool8 hasText)
|
|||||||
sMailRead->layout = &sMailLayouts_Tall[sMailRead->mailType];
|
sMailRead->layout = &sMailLayouts_Tall[sMailRead->mailType];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mail->species > SPECIES_NONE && mail->species < NUM_SPECIES)
|
species = MailSpeciesToSpecies(mail->species, buffer);
|
||||||
|
if (species > SPECIES_NONE && species < NUM_SPECIES)
|
||||||
{
|
{
|
||||||
switch (sMailRead->mailType)
|
switch (sMailRead->mailType)
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,9 @@ u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId)
|
|||||||
for (i = 0; i < TRAINER_ID_LENGTH; i++)
|
for (i = 0; i < TRAINER_ID_LENGTH; i++)
|
||||||
gSaveBlock1Ptr->mail[id].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
|
gSaveBlock1Ptr->mail[id].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
|
||||||
|
|
||||||
gSaveBlock1Ptr->mail[id].species = GetBoxMonData(&mon->box, MON_DATA_SPECIES);
|
species = GetBoxMonData(&mon->box, MON_DATA_SPECIES);
|
||||||
|
personality = GetBoxMonData(&mon->box, MON_DATA_PERSONALITY);
|
||||||
|
gSaveBlock1Ptr->mail[id].species = SpeciesToMailSpecies(species, personality);
|
||||||
gSaveBlock1Ptr->mail[id].itemId = itemId;
|
gSaveBlock1Ptr->mail[id].itemId = itemId;
|
||||||
SetMonData(mon, MON_DATA_MAIL, &id);
|
SetMonData(mon, MON_DATA_MAIL, &id);
|
||||||
SetMonData(mon, MON_DATA_HELD_ITEM, heldItem);
|
SetMonData(mon, MON_DATA_HELD_ITEM, heldItem);
|
||||||
@ -78,6 +80,34 @@ u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId)
|
|||||||
return MAIL_NONE;
|
return MAIL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u16 SpeciesToMailSpecies(u16 species, u32 personality)
|
||||||
|
{
|
||||||
|
if (species == SPECIES_UNOWN)
|
||||||
|
{
|
||||||
|
u32 species = GetUnownLetterByPersonality(personality) + UNOWN_OFFSET;
|
||||||
|
return species;
|
||||||
|
}
|
||||||
|
|
||||||
|
return species;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer)
|
||||||
|
{
|
||||||
|
u16 result;
|
||||||
|
|
||||||
|
if (mailSpecies >= UNOWN_OFFSET && mailSpecies < UNOWN_OFFSET + NUM_UNOWN_FORMS)
|
||||||
|
{
|
||||||
|
result = SPECIES_UNOWN;
|
||||||
|
*buffer = mailSpecies - UNOWN_OFFSET;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = mailSpecies;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail)
|
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail)
|
||||||
{
|
{
|
||||||
u8 heldItem[2];
|
u8 heldItem[2];
|
||||||
|
@ -4592,9 +4592,9 @@ static u16 GetNextPosition(u8 direction, u16 position, u16 min, u16 max)
|
|||||||
// All others use personality 0
|
// All others use personality 0
|
||||||
static u32 GetPokedexMonPersonality(u16 species)
|
static u32 GetPokedexMonPersonality(u16 species)
|
||||||
{
|
{
|
||||||
if (species == SPECIES_UNOWN_A || species == SPECIES_SPINDA)
|
if (species == SPECIES_UNOWN || species == SPECIES_SPINDA)
|
||||||
{
|
{
|
||||||
if (species == SPECIES_UNOWN_A)
|
if (species == SPECIES_UNOWN)
|
||||||
return gSaveBlock2Ptr->pokedex.unownPersonality;
|
return gSaveBlock2Ptr->pokedex.unownPersonality;
|
||||||
else
|
else
|
||||||
return gSaveBlock2Ptr->pokedex.spindaPersonality;
|
return gSaveBlock2Ptr->pokedex.spindaPersonality;
|
||||||
|
@ -538,7 +538,7 @@ static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] =
|
|||||||
SPECIES_TO_NATIONAL(MURKROW),
|
SPECIES_TO_NATIONAL(MURKROW),
|
||||||
SPECIES_TO_NATIONAL(SLOWKING),
|
SPECIES_TO_NATIONAL(SLOWKING),
|
||||||
SPECIES_TO_NATIONAL(MISDREAVUS),
|
SPECIES_TO_NATIONAL(MISDREAVUS),
|
||||||
[SPECIES_UNOWN_A - 1] = NATIONAL_DEX_UNOWN,
|
SPECIES_TO_NATIONAL(UNOWN),
|
||||||
SPECIES_TO_NATIONAL(WOBBUFFET),
|
SPECIES_TO_NATIONAL(WOBBUFFET),
|
||||||
SPECIES_TO_NATIONAL(GIRAFARIG),
|
SPECIES_TO_NATIONAL(GIRAFARIG),
|
||||||
SPECIES_TO_NATIONAL(PINECO),
|
SPECIES_TO_NATIONAL(PINECO),
|
||||||
@ -2163,34 +2163,7 @@ const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] =
|
|||||||
[SPECIES_MURKROW - 1] = ANIM_V_SQUISH_AND_BOUNCE,
|
[SPECIES_MURKROW - 1] = ANIM_V_SQUISH_AND_BOUNCE,
|
||||||
[SPECIES_SLOWKING - 1] = ANIM_SHRINK_GROW,
|
[SPECIES_SLOWKING - 1] = ANIM_SHRINK_GROW,
|
||||||
[SPECIES_MISDREAVUS - 1] = ANIM_V_SLIDE_WOBBLE,
|
[SPECIES_MISDREAVUS - 1] = ANIM_V_SLIDE_WOBBLE,
|
||||||
[SPECIES_UNOWN_A - 1] = ANIM_ZIGZAG_FAST,
|
[SPECIES_UNOWN - 1] = ANIM_ZIGZAG_FAST,
|
||||||
[SPECIES_UNOWN_B - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_C - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_D - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_E - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_F - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_G - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_H - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_I - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_J - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_K - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_L - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_M - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_N - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_O - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_P - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_Q - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_R - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_S - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_T - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_U - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_V - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_W - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_X - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_Y - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_Z - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_EMARK - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_UNOWN_QMARK - 1] = ANIM_ZIGZAG_FAST,
|
|
||||||
[SPECIES_WOBBUFFET - 1] = ANIM_GROW_VIBRATE,
|
[SPECIES_WOBBUFFET - 1] = ANIM_GROW_VIBRATE,
|
||||||
[SPECIES_GIRAFARIG - 1] = ANIM_V_SQUISH_AND_BOUNCE,
|
[SPECIES_GIRAFARIG - 1] = ANIM_V_SQUISH_AND_BOUNCE,
|
||||||
[SPECIES_PINECO - 1] = ANIM_SWING_CONCAVE,
|
[SPECIES_PINECO - 1] = ANIM_SWING_CONCAVE,
|
||||||
@ -3465,9 +3438,6 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
|||||||
else
|
else
|
||||||
personality = Random32();
|
personality = Random32();
|
||||||
|
|
||||||
if (species == SPECIES_UNOWN)
|
|
||||||
species = GetUnownSpeciesId(personality);
|
|
||||||
|
|
||||||
// Determine original trainer ID
|
// Determine original trainer ID
|
||||||
if (otIdType == OT_ID_RANDOM_NO_SHINY)
|
if (otIdType == OT_ID_RANDOM_NO_SHINY)
|
||||||
{
|
{
|
||||||
@ -4490,7 +4460,7 @@ u32 GetUnownSpeciesId(u32 personality)
|
|||||||
u16 unownLetter = GetUnownLetterByPersonality(personality);
|
u16 unownLetter = GetUnownLetterByPersonality(personality);
|
||||||
|
|
||||||
if (unownLetter == 0)
|
if (unownLetter == 0)
|
||||||
return SPECIES_UNOWN_A;
|
return SPECIES_UNOWN;
|
||||||
return unownLetter + SPECIES_UNOWN_B - 1;
|
return unownLetter + SPECIES_UNOWN_B - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8254,7 +8224,7 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)
|
|||||||
if (!GetSetPokedexFlag(nationalNum, getFlagCaseId)) // don't set if it's already set
|
if (!GetSetPokedexFlag(nationalNum, getFlagCaseId)) // don't set if it's already set
|
||||||
{
|
{
|
||||||
GetSetPokedexFlag(nationalNum, caseId);
|
GetSetPokedexFlag(nationalNum, caseId);
|
||||||
if (GET_BASE_SPECIES_ID(NationalPokedexNumToSpecies(nationalNum)) == SPECIES_UNOWN_A)
|
if (NationalPokedexNumToSpecies(nationalNum) == SPECIES_UNOWN)
|
||||||
gSaveBlock2Ptr->pokedex.unownPersonality = personality;
|
gSaveBlock2Ptr->pokedex.unownPersonality = personality;
|
||||||
if (NationalPokedexNumToSpecies(nationalNum) == SPECIES_SPINDA)
|
if (NationalPokedexNumToSpecies(nationalNum) == SPECIES_SPINDA)
|
||||||
gSaveBlock2Ptr->pokedex.spindaPersonality = personality;
|
gSaveBlock2Ptr->pokedex.spindaPersonality = personality;
|
||||||
@ -8277,12 +8247,13 @@ const u8 *GetTrainerNameFromId(u16 trainerId)
|
|||||||
|
|
||||||
bool8 HasTwoFramesAnimation(u16 species)
|
bool8 HasTwoFramesAnimation(u16 species)
|
||||||
{
|
{
|
||||||
species = GET_BASE_SPECIES_ID(species);
|
|
||||||
|
|
||||||
return (species != SPECIES_CASTFORM
|
return (species != SPECIES_CASTFORM
|
||||||
&& species != SPECIES_SPINDA
|
&& species != SPECIES_SPINDA
|
||||||
&& species != SPECIES_UNOWN_A
|
&& species != SPECIES_UNOWN
|
||||||
&& species != SPECIES_CHERRIM);
|
&& species != SPECIES_CHERRIM
|
||||||
|
&& species != SPECIES_CASTFORM_SUNNY
|
||||||
|
&& species != SPECIES_CASTFORM_RAINY
|
||||||
|
&& species != SPECIES_CASTFORM_SNOWY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ShouldSkipFriendshipChange(void)
|
static bool8 ShouldSkipFriendshipChange(void)
|
||||||
|
@ -414,34 +414,7 @@ static const u8 sSpeciesToBackAnimSet[NUM_SPECIES] =
|
|||||||
[SPECIES_MURKROW] = BACK_ANIM_CONCAVE_ARC_SMALL,
|
[SPECIES_MURKROW] = BACK_ANIM_CONCAVE_ARC_SMALL,
|
||||||
[SPECIES_SLOWKING] = BACK_ANIM_DIP_RIGHT_SIDE,
|
[SPECIES_SLOWKING] = BACK_ANIM_DIP_RIGHT_SIDE,
|
||||||
[SPECIES_MISDREAVUS] = BACK_ANIM_H_VIBRATE,
|
[SPECIES_MISDREAVUS] = BACK_ANIM_H_VIBRATE,
|
||||||
[SPECIES_UNOWN_A] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
[SPECIES_UNOWN] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
||||||
[SPECIES_UNOWN_B] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_C] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_D] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_E] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_F] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_G] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_H] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_I] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_J] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_K] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_L] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_M] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_N] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_O] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_P] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_Q] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_R] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_S] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_T] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_U] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_V] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_W] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_X] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_Y] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_Z] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_EMARK] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_UNOWN_QMARK] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
|
||||||
[SPECIES_WOBBUFFET] = BACK_ANIM_V_STRETCH,
|
[SPECIES_WOBBUFFET] = BACK_ANIM_V_STRETCH,
|
||||||
[SPECIES_GIRAFARIG] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
[SPECIES_GIRAFARIG] = BACK_ANIM_SHRINK_GROW_VIBRATE,
|
||||||
[SPECIES_PINECO] = BACK_ANIM_H_SHAKE,
|
[SPECIES_PINECO] = BACK_ANIM_H_SHAKE,
|
||||||
|
@ -227,7 +227,7 @@ const u8 *const gMonIconTable[] =
|
|||||||
[SPECIES_MURKROW] = gMonIcon_Murkrow,
|
[SPECIES_MURKROW] = gMonIcon_Murkrow,
|
||||||
[SPECIES_SLOWKING] = gMonIcon_Slowking,
|
[SPECIES_SLOWKING] = gMonIcon_Slowking,
|
||||||
[SPECIES_MISDREAVUS] = gMonIcon_Misdreavus,
|
[SPECIES_MISDREAVUS] = gMonIcon_Misdreavus,
|
||||||
[SPECIES_UNOWN_A] = gMonIcon_Unown,
|
[SPECIES_UNOWN] = gMonIcon_Unown,
|
||||||
[SPECIES_WOBBUFFET] = gMonIcon_Wobbuffet,
|
[SPECIES_WOBBUFFET] = gMonIcon_Wobbuffet,
|
||||||
[SPECIES_GIRAFARIG] = gMonIcon_Girafarig,
|
[SPECIES_GIRAFARIG] = gMonIcon_Girafarig,
|
||||||
[SPECIES_PINECO] = gMonIcon_Pineco,
|
[SPECIES_PINECO] = gMonIcon_Pineco,
|
||||||
@ -1532,7 +1532,7 @@ const u8 gMonIconPaletteIndices[] =
|
|||||||
[SPECIES_MURKROW] = 2,
|
[SPECIES_MURKROW] = 2,
|
||||||
[SPECIES_SLOWKING] = 0,
|
[SPECIES_SLOWKING] = 0,
|
||||||
[SPECIES_MISDREAVUS] = 0,
|
[SPECIES_MISDREAVUS] = 0,
|
||||||
[SPECIES_UNOWN_A] = 0,
|
[SPECIES_UNOWN] = 0,
|
||||||
[SPECIES_WOBBUFFET] = 0,
|
[SPECIES_WOBBUFFET] = 0,
|
||||||
[SPECIES_GIRAFARIG] = 1,
|
[SPECIES_GIRAFARIG] = 1,
|
||||||
[SPECIES_PINECO] = 0,
|
[SPECIES_PINECO] = 0,
|
||||||
@ -2737,10 +2737,17 @@ u16 GetIconSpecies(u16 species, u32 personality)
|
|||||||
{
|
{
|
||||||
u16 result;
|
u16 result;
|
||||||
|
|
||||||
|
if (species == SPECIES_UNOWN)
|
||||||
|
{
|
||||||
|
result = GetUnownSpeciesId(personality);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
result = INVALID_ICON_SPECIES;
|
result = INVALID_ICON_SPECIES;
|
||||||
else
|
else
|
||||||
result = species;
|
result = species;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2757,10 +2764,18 @@ u16 GetIconSpeciesNoPersonality(u16 species)
|
|||||||
{
|
{
|
||||||
u16 value;
|
u16 value;
|
||||||
|
|
||||||
|
if (MailSpeciesToSpecies(species, &value) == SPECIES_UNOWN)
|
||||||
|
{
|
||||||
|
value += SPECIES_UNOWN_B; // TODO
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
species = INVALID_ICON_SPECIES;
|
species = INVALID_ICON_SPECIES;
|
||||||
|
|
||||||
return GetIconSpecies(species, 0);
|
return GetIconSpecies(species, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const u8 *GetMonIconPtr(u16 species, u32 personality)
|
const u8 *GetMonIconPtr(u16 species, u32 personality)
|
||||||
|
Loading…
Reference in New Issue
Block a user