Shadow Warrior + Manaphy Egg

-Also update Skuntank & Drapion Hidden Abilities
This commit is contained in:
Skeli
2020-10-05 20:42:19 -04:00
parent c81a0fb08f
commit eafaebbd14
26 changed files with 316 additions and 32 deletions

View File

@@ -7,9 +7,13 @@ __umodsi3 = 0x081E4684|1;
memcpy_ = 0x081E5E78|1;
memset_ = 0x081E5ED8|1;
gPlayerParty = 0x2024284;
gPokedexScreenDataPtr = 0x203ACF0;
gMain = 0x30030F0;
sEggHatchData = 0x3000E74;
LoadSpriteSheet = 0x80086DC | 1;
LoadSpritePalette = 0x8008928 | 1;
GetGenderFromSpeciesAndPersonality = 0x803F78C | 1;
GetMonData = 0x803FBE8 | 1;
SpeciesToNationalPokedexNum = 0x8043298 | 1;

View File

@@ -0,0 +1,200 @@
.thumb
.align 2
.pool
@0x8122214 with r0
PartyMenuManaphyEggHook:
lsl r4, #0x10
lsr r4, #0x10
mov r0, r5 @Mon
mov r1, r4 @Species
bl TryReplaceSpeciesWithManaphyEgg
mov r4, r0
mov r0, r5
mov r1, #0x0
ldr r2, =0x812221C | 1
bxr2:
bx r2
.pool
@0x8139978 with r1
SummaryScreenManaphyEggHook:
lsl r0, r0, #0x10
lsr r7, r0, #0x10
ldr r0, [r5]
add r0, r4 @Mon
mov r1, r7 @Species
bl TryReplaceSpeciesWithManaphyEgg
mov r7, r0
ldr r0, [r5]
add r0, r4
ldr r1, =0x8139980 | 1
bxr1:
bx r1
.pool
@0x80471A8 with r0
EggHatchManaphyEggHook:
ldr r0, =sEggHatchData
ldr r0, [r0]
ldrb r0, [r0, #0x4] @partyId
bl IsPartyMonManaphy
cmp r0, #0x0
bne EggHatchLoadManaphyEggSprite
ldr r0, =0x826011C @EggHatch_Sheet
ldr r1, =LoadSpriteSheet
bl bxr1
ldr r0, =0x8260124 @EggShards_Sheet
ldr r1, =0x080471B0 | 1
bx r1
EggHatchLoadManaphyEggSprite:
ldr r0, =sManaphyEgg_Sheet
ldr r1, =LoadSpriteSheet
bl bxr1
ldr r0, =sManaphyEggShards_Sheet
ldr r1, =LoadSpriteSheet
bl bxr1
ldr r0, =sManaphyEgg_SpritePalette
ldr r1, =LoadSpritePalette
bl bxr1
ldr r0, =0x804724A | 1
bxr0:
bx r0
.align 2
sManaphyEgg_Sheet:
.word ManaphyEggHatchTiles
.hword 2048, 12345
sManaphyEggShards_Sheet:
.word ManaphyEggShardsTiles
.hword 128, 23456
sManaphyEgg_SpritePalette:
.word ManaphyEggHatchPal
.hword 54321, 0
.pool
@0x809008E with r1
PokemonStorageSystemManaphyEggHook1:
mov r1, r0 @Species
mov r0, r4 @Mon
bl TryReplaceSpeciesWithManaphyEgg
mov r4, r0
ldr r0, =0x8090058 | 1
bl bxr0
ldr r1, =0x8090098 | 1
bx r1
.pool
@0x80900F4 with r0
PokemonStorageSystemManaphyEggHook2:
mov r0, r9 @Box Id
mov r1, r6 @Box Position
bl GetBoxMonSpeciesAt_HandleManaphyEgg
ldr r1, =0x80900FE | 1
bx r1
.pool
@0x80901F8 with r0
PokemonStorageSystemManaphyEggHook3:
mov r0, r7 @Box Position
bl GetCurrentBoxMonSpeciesAt_HandleManaphyEgg
ldr r1, =0x8090200 | 1
bx r1
.pool
@0x80907B2 with r0
PokemonStorageSystemManaphyEggHook4:
mov r0, r6 @Box Id
mov r1, r4 @Box Position
bl GetBoxMonSpeciesAt_HandleManaphyEgg
ldr r1, =0x80907BC | 1
bx r1
.pool
@0x80908A4 with r1
PokemonStorageSystemManaphyEggHook5:
mov r1, r0 @Species
mov r0, r4 @Mon
bl TryReplaceSpeciesWithManaphyEgg
mov r5, r0
mov r0, r4
mov r1, #0x0
ldr r2, =0x80908AC | 1
bx r2
.pool
@0x80908E0 with r2
PokemonStorageSystemManaphyEggHook6:
ldr r2, =GetMonData
bl bxr2
mov r1, r0 @Species
mov r0, r4 @Mon
bl TryReplaceSpeciesWithManaphyEgg
mov r5, r0
ldr r0, =0x80908E8 | 1
bx r0
.pool
@0x80956BC with r0
PokemonStorageSystemManaphyEggHook7:
mov r0, r4 @Box Position
bl GetCurrentBoxMonSpeciesAt_HandleManaphyEgg
ldr r1, =0x80956C4 | 1
bx r1
.pool
@0x80440C8 with r1
PokemonStorageSystemManaphyEggHook8: @Mon Pic Palette in Party
mov r1, r0 @Species
mov r0, r5 @Mon
bl TryReplaceSpeciesWithManaphyEgg
mov r4, r0
mov r0, r5
ldr r1, =0x080440D0 | 1
bx r1
.pool
@0x8093C94 with r3
PokemonStorageSystemManaphyEggHook9: @Mon Pic Palette in Box
str r2, [r0]
sub r4, #0xA
add r1, r4
ldrh r0, [r1]
push {r0-r2}
mov r1, r0 @Species
mov r0, r7 @Mon
bl TryReplaceSpeciesWithManaphyEgg
mov r3, r0
pop {r0-r2}
mov r0, r3
ldr r1, =0x8093C9C | 1
bx r1
.pool
@0x808F414 with r1
PokemonStorageSystemManaphyEggHook10: @Mon Pic Gfx
push {r3}
ldr r0, [r6]
ldr r1, =.xCD8
ldr r1, [r1]
add r0, r1
ldr r0, [r0]
mov r1, r2
bl ChangeSpeciesIfManaphyEggPalette
mov r2, r0 @Species
pop {r3}
lsl r0, r2, #0x3
ldr r1, =gMonFrontPicTable
add r0, r1
ldr r5, =.x22BC
ldr r5, [r5]
add r1, r4, r5
ldr r4, =0x808F41C | 1
bx r4
.align 2
.x22BC: .word 0x22BC
.xCD8: .word 0xCD8

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

View File

@@ -0,0 +1 @@
-g -gB4 -fts -p -pe16 -gu8 -fh!

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

17
hooks
View File

@@ -10,6 +10,7 @@ GetFrontSpritePalFromSpeciesAndPersonality 80440F4 3
GetMonSpritePalStructFromOtIdPersonality 8044180 3
GetEggSpecies 8045970 1
GetEggMoves 8045C28 2
EggHatchManaphyEggHook 80471A8 0
CreateMonSprite_PicBoxHook 808398C 1
GetRegionalPokedexCount 8088EDC 1
HasAllRegionalMons 8088F58 0
@@ -22,3 +23,19 @@ DisplayRegionalDexNumHook 8104A66 1
CountSpeciesInDex 8104BBC 2
AlternateDexEntriesHook 8105CBC 0
SummaryScreenIconPalHook 8139DDC 1
##Manaphy Egg Hooks
PokemonStorageSystemManaphyEggHook1 809008E 1
PokemonStorageSystemManaphyEggHook2 80900F4 0
PokemonStorageSystemManaphyEggHook3 80901F8 0
PokemonStorageSystemManaphyEggHook4 80907B2 0
PokemonStorageSystemManaphyEggHook5 80908A4 1
PokemonStorageSystemManaphyEggHook6 80908E0 2
PokemonStorageSystemManaphyEggHook7 80956BC 0
PokemonStorageSystemManaphyEggHook8 80440C8 1
PokemonStorageSystemManaphyEggHook9 8093C94 3
PokemonStorageSystemManaphyEggHook10 808F414 1
PartyMenuManaphyEggHook 8122214 0
SummaryScreenManaphyEggHook 8139978 1

View File

@@ -255,6 +255,7 @@
#define SPECIES_LUGIA 0xF9
#define SPECIES_HO_OH 0xFA
#define SPECIES_CELEBI 0xFB
#define SPECIES_MANAPHY_EGG 0xFC
#define SPECIES_TREECKO 0x115
#define SPECIES_GROVYLE 0x116

View File

@@ -519,6 +519,7 @@ extern const u8 gFrontSprite540GiratinaTiles[];
extern const u8 gFrontSprite541CresseliaTiles[];
extern const u8 gFrontSprite542PhioneTiles[];
extern const u8 gFrontSprite543ManaphyTiles[];
extern const u8 gSpriteManaphyEggTiles[];
extern const u8 gFrontSprite544DarkraiTiles[];
extern const u8 gFrontSprite545ShayminTiles[];
extern const u8 gFrontSprite546ArceusTiles[];
@@ -681,7 +682,7 @@ extern const u8 gFrontSprite702GenesectTiles[];
extern const u8 gFrontSprite703UnfezantFTiles[];
extern const u8 gFrontSprite704FrillishFTiles[];
extern const u8 gFrontSprite705JellicentFTiles[];
extern const u8 gFrontSprite706ShadowWarriorTiles[];
extern const u8 gSpriteShadowWarriorTiles[];
extern const u8 gFrontSprite707BurmySandyTiles[];
extern const u8 gFrontSprite708BurmyTrashTiles[];
extern const u8 gFrontSprite709WormadamSandyTiles[];
@@ -1921,7 +1922,6 @@ extern const u8 gBackShinySprite702GenesectTiles[];
extern const u8 gBackShinySprite703UnfezantFTiles[];
extern const u8 gBackShinySprite704FrillishFTiles[];
extern const u8 gBackShinySprite705JellicentFTiles[];
extern const u8 gBackShinySprite706ShadowWarriorTiles[];
extern const u8 gBackShinySprite707BurmySandyTiles[];
extern const u8 gBackShinySprite708BurmyTrashTiles[];
extern const u8 gBackShinySprite709WormadamSandyTiles[];
@@ -3000,6 +3000,7 @@ extern const u8 gFrontSprite540GiratinaPal[];
extern const u8 gFrontSprite541CresseliaPal[];
extern const u8 gFrontSprite542PhionePal[];
extern const u8 gFrontSprite543ManaphyPal[];
extern const u8 gSpriteManaphyEggPal[];
extern const u8 gFrontSprite544DarkraiPal[];
extern const u8 gFrontSprite545ShayminPal[];
extern const u8 gFrontSprite546ArceusPal[];
@@ -3162,7 +3163,7 @@ extern const u8 gFrontSprite702GenesectPal[];
extern const u8 gFrontSprite703UnfezantFPal[];
extern const u8 gFrontSprite704FrillishFPal[];
extern const u8 gFrontSprite705JellicentFPal[];
extern const u8 gFrontSprite706ShadowWarriorPal[];
extern const u8 gSpriteShadowWarriorPal[];
extern const u8 gFrontSprite707BurmySandyPal[];
extern const u8 gFrontSprite708BurmyTrashPal[];
extern const u8 gFrontSprite709WormadamSandyPal[];
@@ -4401,7 +4402,6 @@ extern const u8 gBackShinySprite702GenesectPal[];
extern const u8 gBackShinySprite703UnfezantFPal[];
extern const u8 gBackShinySprite704FrillishFPal[];
extern const u8 gBackShinySprite705JellicentFPal[];
extern const u8 gBackShinySprite706ShadowWarriorPal[];
extern const u8 gBackShinySprite707BurmySandyPal[];
extern const u8 gBackShinySprite708BurmyTrashPal[];
extern const u8 gBackShinySprite709WormadamSandyPal[];
@@ -5478,6 +5478,7 @@ extern const u8 gIconSprite540GiratinaTiles[];
extern const u8 gIconSprite541CresseliaTiles[];
extern const u8 gIconSprite542PhioneTiles[];
extern const u8 gIconSprite543ManaphyTiles[];
extern const u8 gIconSpriteManaphyEggTiles[];
extern const u8 gIconSprite544DarkraiTiles[];
extern const u8 gIconSprite545ShayminTiles[];
extern const u8 gIconSprite546ArceusTiles[];

View File

@@ -284,16 +284,19 @@ def ProcessSpriteGraphics():
backFlags = GetFlagsFromFlagFile(GRAPHICS + "/backspriteflags.grit")
iconFlags = GetFlagsFromFlagFile(GRAPHICS + "/iconspriteflags.grit")
castformFlags = GetFlagsFromFlagFile(GRAPHICS + "/castform/gritflags.txt")
egghatchFlags = GetFlagsFromFlagFile(GRAPHICS + "/egg_hatch/gritflags.txt")
backsprites = [file for file in glob(GRAPHICS + "/backspr" + "**/*.png", recursive=True)]
frontsprites = [file for file in glob(GRAPHICS + "/frontspr" + "**/*.png", recursive=True)]
iconsprites = [file for file in glob(GRAPHICS + "/pokeicon" + "**/*.png", recursive=True)]
castformsprites = [file for file in glob(GRAPHICS + "/castform" + "**/*.png", recursive=True)]
egghatchsprites = [file for file in glob(GRAPHICS + "/egg_hatch" + "**/*.png", recursive=True)]
ProcessSpriteSet(frontsprites, frontFlags, 'frontsprites.s', "Front Sprites")
ProcessSpriteSet(backsprites, backFlags, 'backsprites.s', "Back Sprites")
ProcessSpriteSet(iconsprites, iconFlags, 'iconsprites.s', "Icon Sprites")
ProcessSpriteSet(castformsprites, castformFlags, 'castformsprites.s', "Castform Sprites")
ProcessSpriteSet(egghatchsprites, egghatchFlags, 'egghatchsprites.s', "Egg Hatch Sprites")
def ProcessAudio(audioFile: str) -> str:

View File

@@ -1263,10 +1263,10 @@ const struct MonCoords gMonBackPicCoords[NUM_SPECIES] =
.size = 0x66,
.y_offset = 0x7,
},
[252] =
[SPECIES_MANAPHY_EGG] =
{
.size = 0x88,
.y_offset = 0x1,
.y_offset = 0x10,
},
[253] =
{
@@ -3536,7 +3536,7 @@ const struct MonCoords gMonBackPicCoords[NUM_SPECIES] =
[SPECIES_SHADOW_WARRIOR] =
{
.size = 0x0,
.y_offset = 0x0,
.y_offset = 0x3,
},
[SPECIES_BURMY_SANDY] =
{

View File

@@ -256,7 +256,7 @@ const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES] =
[SPECIES_LUGIA] = {gBackShinySprite249LugiaTiles, (64 * 64) / 2, SPECIES_LUGIA},
[SPECIES_HO_OH] = {gBackShinySprite250HoOhTiles, (64 * 64) / 2, SPECIES_HO_OH},
[SPECIES_CELEBI] = {gBackShinySprite251CelebiTiles, (64 * 64) / 2, SPECIES_CELEBI},
[252] = {gBackShinySprite252Tiles, (64 * 64) / 2, 0xfc},
[SPECIES_MANAPHY_EGG] = {gSpriteManaphyEggTiles, (64 * 64) / 2, SPECIES_MANAPHY_EGG},
[253] = {gBackShinySprite252Tiles, (64 * 64) / 2, 0xfd},
[254] = {gBackShinySprite252Tiles, (64 * 64) / 2, 0xfe},
[255] = {gBackShinySprite252Tiles, (64 * 64) / 2, 0xff},
@@ -712,7 +712,7 @@ const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES] =
[SPECIES_UNFEZANT_F] = {gBackShinySprite703UnfezantFTiles, (64 * 64) / 2, SPECIES_UNFEZANT_F},
[SPECIES_FRILLISH_F] = {gBackShinySprite704FrillishFTiles, (64 * 64) / 2, SPECIES_FRILLISH_F},
[SPECIES_JELLICENT_F] = {gBackShinySprite705JellicentFTiles, (64 * 64) / 2, SPECIES_JELLICENT_F},
[SPECIES_SHADOW_WARRIOR] = {gBackShinySprite000NoneTiles/*gBackShinySprite706ShadowWarriorTiles*/, (64 * 64) / 2, SPECIES_SHADOW_WARRIOR},
[SPECIES_SHADOW_WARRIOR] = {gSpriteShadowWarriorTiles, (64 * 64) / 2, SPECIES_SHADOW_WARRIOR},
[SPECIES_BURMY_SANDY] = {gBackShinySprite707BurmySandyTiles, (64 * 64) / 2, SPECIES_BURMY_SANDY},
[SPECIES_BURMY_TRASH] = {gBackShinySprite708BurmyTrashTiles, (64 * 64) / 2, SPECIES_BURMY_TRASH},
[SPECIES_WORMADAM_SANDY] = {gBackShinySprite709WormadamSandyTiles, (64 * 64) / 2, SPECIES_WORMADAM_SANDY},

View File

@@ -8294,6 +8294,11 @@ const struct BaseStats gBaseStats[] =
.noFlip = TRUE,
},
[SPECIES_MANAPHY_EGG] =
{
.noFlip = TRUE,
},
[SPECIES_TREECKO] =
{
.baseHP = 40,
@@ -15286,7 +15291,7 @@ const struct BaseStats gBaseStats[] =
.ability1 = ABILITY_STENCH,
.ability2 = ABILITY_AFTERMATH,
.safariZoneFleeRate = 0,
.hiddenAbility = ABILITY_KEENEYE,
.hiddenAbility = ABILITY_POISONTOUCH,
.noFlip = TRUE,
},
@@ -15847,7 +15852,7 @@ const struct BaseStats gBaseStats[] =
.ability1 = ABILITY_BATTLEARMOR,
.ability2 = ABILITY_SNIPER,
.safariZoneFleeRate = 0,
.hiddenAbility = ABILITY_KEENEYE,
.hiddenAbility = ABILITY_SUPERLUCK,
.noFlip = TRUE,
},
@@ -22263,7 +22268,7 @@ const struct BaseStats gBaseStats[] =
.baseSpeed = 108,
.type1 = TYPE_WATER,
.type2 = TYPE_FIGHTING,
.catchRate = 3,
.catchRate = 6,
.expYield = 255,
.evYield_HP = 0,
.evYield_Attack = 0,
@@ -22455,9 +22460,9 @@ const struct BaseStats gBaseStats[] =
{
.baseHP = 60,
.baseAttack = 115,
.baseDefense = 65,
.baseDefense = 85,
.baseSpAttack = 80,
.baseSpDefense = 65,
.baseSpDefense = 85,
.baseSpeed = 115,
.type1 = TYPE_GHOST,
.type2 = TYPE_DARK,
@@ -22479,7 +22484,7 @@ const struct BaseStats gBaseStats[] =
.ability1 = ABILITY_TOUGHCLAWS,
.ability2 = ABILITY_NONE,
.safariZoneFleeRate = 0,
.hiddenAbility = ABILITY_NONE,
.hiddenAbility = ABILITY_WONDERGUARD,
.noFlip = TRUE,
},

View File

@@ -254,7 +254,7 @@ const u8 gEnemyMonElevation[NUM_SPECIES] =
[SPECIES_LUGIA] = 0x7,
[SPECIES_HO_OH] = 0x7,
[SPECIES_CELEBI] = 0xe,
[252] = 0x0,
[SPECIES_MANAPHY_EGG] = 0x0,
[253] = 0x0,
[254] = 0x0,
[255] = 0x0,

View File

@@ -256,7 +256,7 @@ const u32 gMonFootprintTable[NUM_SPECIES] =
[SPECIES_LUGIA] = 0x8740500,
[SPECIES_HO_OH] = 0x8740500,
[SPECIES_CELEBI] = 0x8740500,
[252] = 0x8740500,
[SPECIES_MANAPHY_EGG] = 0x8740500,
[253] = 0x8740500,
[254] = 0x8740500,
[255] = 0x8740500,

View File

@@ -1263,10 +1263,10 @@ const struct MonCoords gMonFrontPicCoords[NUM_SPECIES] =
.size = 0x55,
.y_offset = 0xc,
},
[252] =
[SPECIES_MANAPHY_EGG] =
{
.size = 0x88,
.y_offset = 0x6,
.y_offset = 0x10,
},
[253] =
{
@@ -3536,7 +3536,7 @@ const struct MonCoords gMonFrontPicCoords[NUM_SPECIES] =
[SPECIES_SHADOW_WARRIOR] =
{
.size = 0x0,
.y_offset = 0x0,
.y_offset = 0x3,
},
[SPECIES_BURMY_SANDY] =
{

View File

@@ -256,7 +256,7 @@ const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES] =
[SPECIES_LUGIA] = {gFrontSprite249LugiaTiles, (64 * 64) / 2, SPECIES_LUGIA},
[SPECIES_HO_OH] = {gFrontSprite250HoOhTiles, (64 * 64) / 2, SPECIES_HO_OH},
[SPECIES_CELEBI] = {gFrontSprite251CelebiTiles, (64 * 64) / 2, SPECIES_CELEBI},
[252] = {gFrontSprite252Tiles, (64 * 64) / 2, 0xfc},
[SPECIES_MANAPHY_EGG] = {gSpriteManaphyEggTiles, (64 * 64) / 2, SPECIES_MANAPHY_EGG},
[253] = {gFrontSprite252Tiles, (64 * 64) / 2, 0xfd},
[254] = {gFrontSprite252Tiles, (64 * 64) / 2, 0xfe},
[255] = {gFrontSprite252Tiles, (64 * 64) / 2, 0xff},
@@ -712,7 +712,7 @@ const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES] =
[SPECIES_UNFEZANT_F] = {gFrontSprite703UnfezantFTiles, (64 * 64) / 2, SPECIES_UNFEZANT_F},
[SPECIES_FRILLISH_F] = {gFrontSprite704FrillishFTiles, (64 * 64) / 2, SPECIES_FRILLISH_F},
[SPECIES_JELLICENT_F] = {gFrontSprite705JellicentFTiles, (64 * 64) / 2, SPECIES_JELLICENT_F},
[SPECIES_SHADOW_WARRIOR] = {gFrontSprite000NoneTiles/*gFrontSprite706ShadowWarriorTiles*/, (64 * 64) / 2, SPECIES_SHADOW_WARRIOR},
[SPECIES_SHADOW_WARRIOR] = {gSpriteShadowWarriorTiles, (64 * 64) / 2, SPECIES_SHADOW_WARRIOR},
[SPECIES_BURMY_SANDY] = {gFrontSprite707BurmySandyTiles, (64 * 64) / 2, SPECIES_BURMY_SANDY},
[SPECIES_BURMY_TRASH] = {gFrontSprite708BurmyTrashTiles, (64 * 64) / 2, SPECIES_BURMY_TRASH},
[SPECIES_WORMADAM_SANDY] = {gFrontSprite709WormadamSandyTiles, (64 * 64) / 2, SPECIES_WORMADAM_SANDY},

View File

@@ -254,7 +254,7 @@ const u8 gMonIconPaletteIndices[NUM_SPECIES] =
[SPECIES_LUGIA] = 0x0,
[SPECIES_HO_OH] = 0x1,
[SPECIES_CELEBI] = 0x1,
[252] = 0x0,
[SPECIES_MANAPHY_EGG] = 0x2,
[253] = 0x0,
[254] = 0x0,
[255] = 0x0,

View File

@@ -255,7 +255,7 @@ const u8* const gMonIconTable[NUM_SPECIES] =
[SPECIES_LUGIA] = gIconSprite249LugiaTiles,
[SPECIES_HO_OH] = gIconSprite250HoOhTiles,
[SPECIES_CELEBI] = gIconSprite251CelebiTiles,
[252] = gIconSprite000NoneTiles,
[SPECIES_MANAPHY_EGG] = gIconSpriteManaphyEggTiles,
[253] = gIconSprite000NoneTiles,
[254] = gIconSprite000NoneTiles,
[255] = gIconSprite000NoneTiles,

View File

@@ -263,7 +263,7 @@ const struct ItemAnimation gItemAnimationTable[NUM_SPECIES] =
[SPECIES_LUGIA] = {0xd, 0x25, 0x8, 0xe, 0x34},
[SPECIES_HO_OH] = {0x15, 0x21, 0x8, 0x1a, 0x2b},
[SPECIES_CELEBI] = {0x1f, 0x12, 0x8, 0x1e, 0x1c},
[252] = {0x20, 0x17, 0x8, 0x1f, 0x21},
[SPECIES_MANAPHY_EGG] = {0x20, 0x23, 0x8, 0x20, 0x2d},
[253] = {0x1c, 0x19, 0x8, 0x1b, 0x23},
[254] = {0x21, 0x19, 0x8, 0x20, 0x23},
[255] = {0x1b, 0x13, 0x8, 0x1a, 0x1d},

View File

@@ -256,7 +256,7 @@ const struct CompressedSpritePalette gMonPaletteTable[NUM_SPECIES] =
[SPECIES_LUGIA] = {gFrontSprite249LugiaPal, SPECIES_LUGIA, 0x0},
[SPECIES_HO_OH] = {gFrontSprite250HoOhPal, SPECIES_HO_OH, 0x0},
[SPECIES_CELEBI] = {gFrontSprite251CelebiPal, SPECIES_CELEBI, 0x0},
[252] = {gFrontSprite252Pal, 0xfc, 0x0},
[SPECIES_MANAPHY_EGG] = {gSpriteManaphyEggPal, SPECIES_MANAPHY_EGG, 0x0},
[253] = {gFrontSprite252Pal, 0xfd, 0x0},
[254] = {gFrontSprite252Pal, 0xfe, 0x0},
[255] = {gFrontSprite252Pal, 0xff, 0x0},
@@ -712,7 +712,7 @@ const struct CompressedSpritePalette gMonPaletteTable[NUM_SPECIES] =
[SPECIES_UNFEZANT_F] = {gFrontSprite703UnfezantFPal, SPECIES_UNFEZANT_F, 0x0},
[SPECIES_FRILLISH_F] = {gFrontSprite704FrillishFPal, SPECIES_FRILLISH_F, 0x0},
[SPECIES_JELLICENT_F] = {gFrontSprite705JellicentFPal, SPECIES_JELLICENT_F, 0x0},
[SPECIES_SHADOW_WARRIOR] = {gFrontSprite000NonePal/*gFrontSprite706ShadowWarriorPal*/, SPECIES_SHADOW_WARRIOR, 0x0},
[SPECIES_SHADOW_WARRIOR] = {gSpriteShadowWarriorPal, SPECIES_SHADOW_WARRIOR, 0x0},
[SPECIES_BURMY_SANDY] = {gFrontSprite707BurmySandyPal, SPECIES_BURMY_SANDY, 0x0},
[SPECIES_BURMY_TRASH] = {gFrontSprite708BurmyTrashPal, SPECIES_BURMY_TRASH, 0x0},
[SPECIES_WORMADAM_SANDY] = {gFrontSprite709WormadamSandyPal, SPECIES_WORMADAM_SANDY, 0x0},

View File

@@ -256,7 +256,7 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[NUM_SPECIES] =
[SPECIES_LUGIA] = {gBackShinySprite249LugiaPal, SPECIES_LUGIA + NUM_SPECIES, 0x0},
[SPECIES_HO_OH] = {gBackShinySprite250HoOhPal, SPECIES_HO_OH + NUM_SPECIES, 0x0},
[SPECIES_CELEBI] = {gBackShinySprite251CelebiPal, SPECIES_CELEBI + NUM_SPECIES, 0x0},
[252] = {gBackShinySprite252Pal, 0xfc + NUM_SPECIES, 0x0},
[SPECIES_MANAPHY_EGG] = {gSpriteManaphyEggPal, SPECIES_MANAPHY_EGG + NUM_SPECIES, 0x0},
[253] = {gBackShinySprite252Pal, 0xfd + NUM_SPECIES, 0x0},
[254] = {gBackShinySprite252Pal, 0xfe + NUM_SPECIES, 0x0},
[255] = {gBackShinySprite252Pal, 0xff + NUM_SPECIES, 0x0},
@@ -712,7 +712,7 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[NUM_SPECIES] =
[SPECIES_UNFEZANT_F] = {gBackShinySprite703UnfezantFPal, SPECIES_UNFEZANT_F + NUM_SPECIES, 0x0},
[SPECIES_FRILLISH_F] = {gBackShinySprite704FrillishFPal, SPECIES_FRILLISH_F + NUM_SPECIES, 0x0},
[SPECIES_JELLICENT_F] = {gBackShinySprite705JellicentFPal, SPECIES_JELLICENT_F + NUM_SPECIES, 0x0},
[SPECIES_SHADOW_WARRIOR] = {gBackShinySprite000NonePal/*gBackShinySprite706ShadowWarriorPal*/, SPECIES_SHADOW_WARRIOR + NUM_SPECIES, 0x0},
[SPECIES_SHADOW_WARRIOR] = {gSpriteShadowWarriorPal, SPECIES_SHADOW_WARRIOR + NUM_SPECIES, 0x0},
[SPECIES_BURMY_SANDY] = {gBackShinySprite707BurmySandyPal, SPECIES_BURMY_SANDY + NUM_SPECIES, 0x0},
[SPECIES_BURMY_TRASH] = {gBackShinySprite708BurmyTrashPal, SPECIES_BURMY_TRASH + NUM_SPECIES, 0x0},
[SPECIES_WORMADAM_SANDY] = {gBackShinySprite709WormadamSandyPal, SPECIES_WORMADAM_SANDY + NUM_SPECIES, 0x0},

View File

@@ -254,7 +254,7 @@ const u16 gSpeciesToNationalPokedexNum[NUM_SPECIES - 1] =
[SPECIES_LUGIA - 1] = NATIONAL_DEX_LUGIA,
[SPECIES_HO_OH - 1] = NATIONAL_DEX_HO_OH,
[SPECIES_CELEBI - 1] = NATIONAL_DEX_CELEBI,
[252 - 1] = NATIONAL_DEX_NONE,
[SPECIES_MANAPHY_EGG - 1] = NATIONAL_DEX_NONE,
[253 - 1] = NATIONAL_DEX_NONE,
[254 - 1] = NATIONAL_DEX_NONE,
[255 - 1] = NATIONAL_DEX_NONE,
@@ -708,7 +708,6 @@ const u16 gSpeciesToNationalPokedexNum[NUM_SPECIES - 1] =
[SPECIES_UNFEZANT_F - 1] = NATIONAL_DEX_UNFEZANT,
[SPECIES_FRILLISH_F - 1] = NATIONAL_DEX_FRILLISH,
[SPECIES_JELLICENT_F - 1] = NATIONAL_DEX_JELLICENT,
[SPECIES_SHADOW_WARRIOR - 1] = NATIONAL_DEX_CRESSELIA,
[SPECIES_BURMY_SANDY - 1] = NATIONAL_DEX_BURMY,
[SPECIES_BURMY_TRASH - 1] = NATIONAL_DEX_BURMY,
[SPECIES_WORMADAM_SANDY - 1] = NATIONAL_DEX_WORMADAM,

View File

@@ -6,9 +6,17 @@
//Backsprite battle start
struct Pokemon
{
u8 data[0x20];
u16 species;
u8 data2[0x42];
};
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
extern const u16 gSpeciesIdToCryId[];
extern const u16 gSpeciesToNationalPokedexNum[];
extern struct Pokemon gPlayerParty[6];
extern const u16 gPokedexOrder_Regional[];
extern const u16 gRegionalDexCount;
@@ -30,6 +38,12 @@ extern const struct CompressedSpritePalette gMonShinyPaletteTable[];
const u16 gNumSpecies = NUM_SPECIES;
const u16 gNumDexEntries = FINAL_DEX_ENTRY;
#define MON_DATA_SPECIES 11
#define MON_DATA_SPECIES2 65
typedef u32 (*GetBoxMonDataAt_T) (u8 boxId, u8 boxPosition, s32 request);
#define GetBoxMonDataAt ((GetBoxMonDataAt_T) (0x0808BA18 |1))
u8 __attribute__((long_call)) GetGenderFromSpeciesAndPersonality(u16 species, u32 personality);
u8 __attribute__((long_call)) GetUnownLetterFromPersonality(u32 personality);
bool8 __attribute__((long_call)) GetSetPokedexFlag(u16 nationalNum, u8 caseID);
@@ -221,12 +235,51 @@ u16 GetIconSpecies(u16 species, u32 personality)
return result;
}
u16 TryReplaceSpeciesWithManaphyEgg(struct Pokemon* mon, u16 species)
{
if (species == SPECIES_EGG)
{
if (mon->species == SPECIES_MANAPHY)
return SPECIES_MANAPHY_EGG;
}
return species;
}
bool8 IsPartyMonManaphy(u8 partyId)
{
return gPlayerParty[partyId].species == SPECIES_MANAPHY;
}
u16 GetBoxMonSpeciesAt_HandleManaphyEgg(u8 boxId, u8 boxPosition)
{
u16 species2 = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2);
if (species2 == SPECIES_EGG && GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES) == SPECIES_MANAPHY)
return SPECIES_MANAPHY_EGG;
return species2;
}
#define gCurrentBoxMonId *((u8*) *((u32*) 0x3005010))
u16 GetCurrentBoxMonSpeciesAt_HandleManaphyEgg(u8 boxPosition)
{
return GetBoxMonSpeciesAt_HandleManaphyEgg(gCurrentBoxMonId, boxPosition);
}
u16 ChangeSpeciesIfManaphyEggPalette(const u8* palette, u16 species)
{
if (palette == gMonPaletteTable[SPECIES_MANAPHY_EGG].data)
species = SPECIES_MANAPHY_EGG;
return species;
}
bool8 IsInBattle(void)
{
return gMain.inBattle;
}
u16 CountSpeciesInDex(u8 caseId, bool8 whichDex)
{
u16 count = 0;