diff --git a/headers/data/arm9.h b/headers/data/arm9.h index 6fe662c7..d3ab1a7b 100644 --- a/headers/data/arm9.h +++ b/headers/data/arm9.h @@ -187,6 +187,7 @@ extern struct rankup_table_entry RANK_UP_TABLE[13]; extern struct monster_id_16 DS_DOWNLOAD_TEAMS[56]; extern enum monster_id UNOWN_SPECIES_ADDITIONAL_CHARS[28]; extern struct monster_sprite_data_entry MONSTER_SPRITE_DATA[600]; +extern struct starter_egg_move STARTER_MOVES_ARRAY[9]; extern int16_t MISSION_MENU_STRING_IDS_1[8]; extern int16_t MISSION_MENU_STRING_IDS_2[8]; extern struct dungeon_unlock_entry MISSION_DUNGEON_UNLOCK_TABLE[3]; diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index bf030462..041f3871 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -1214,7 +1214,7 @@ void SetBaseStatsMovesGroundMonster(struct ground_monster* ground_monster); bool StrcmpMonsterName(char* string, enum monster_id monster_id); void InitializeTeamMemberFromMentry(struct team_member* team_member, struct ground_monster* ground_monster, int32_t slot_index); -void AddUniqueStarterMoveTo(struct ground_monster* ground_monster); +void AddStarterEggMove(struct ground_monster* ground_monster); void GetLvlUpEntry(struct level_up_entry* level_up_entry, enum monster_id monster_id, int level); uint8_t* GetEncodedHalfword(uint8_t* data_ptr, uint16_t* result); int GetEvoFamily(undefined* monster, undefined* evo_family); diff --git a/headers/types/common/common.h b/headers/types/common/common.h index 023156ff..6e0a3140 100644 --- a/headers/types/common/common.h +++ b/headers/types/common/common.h @@ -1758,4 +1758,14 @@ struct effect_control { }; ASSERT_SIZE(struct effect_control, 10148); +// Stores a pair of monster_id_16 to move_id_16. +// Used for granting specific starter pokemon an egg move from their line. +struct starter_egg_move { + // 0x0: The starter whom will learn this move + struct monster_id_16 starter_id; + // 0x2: The move to be learned + struct move_id_16 egg_move_to_grant; +}; +ASSERT_SIZE(struct starter_egg_move, 4); + #endif diff --git a/symbols/arm9.yml b/symbols/arm9.yml index b4b44ef2..717bf4db 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -11556,25 +11556,20 @@ arm9: r0: team_member pointer r1: ground_monster pointer r2: team_member index - - name: AddUniqueStarterMoveTo + - name: AddStarterEggMove + aliases: + - AddUniqueStarterMoveTo address: NA: 0x2053568 description: |- - Grants certain starter Pokemon a unique move that they cannot normally learn. + Grants certain starter Pokemon an egg move from their line at the beginning of the game, adding it to the first available slot. - Only called during InitMainTeamAfterQuiz, for both the hero and the partner. + Only called during the InitMainTeamAfterQuiz special process, for both the hero and the partner. Will skip granting any move if the target somehow already has four moves. - Gives the following: - - Vulpix: Faint Attack - - Eevee: Flail - - Phanphy: Ancient Power - - Shinx: Quick Attack - - Riolu: Bite - - Meowth: Hypnosis - - Munchlax: Zen Headbutt - - Skitty: Zen Headbutt - r0: pointer to the ground_monster to attempt to grant a move to, as either the hero or the partner. + See pointer to STARTER_MOVES_ARRAY near the end of this function for a full list of the Pokemon-move pairs that are used by it. + + r0: pointer to the ground_monster to attempt to grant a move to. Will always be either the hero or the partner. - name: GetLvlUpEntry address: EU: 0x2053B18 @@ -15725,6 +15720,32 @@ arm9: NA: 0x4B0 JP: 0x4B0 description: Contains information about the sprite size and sprite file size of each monster + - name: STARTER_MOVES_ARRAY + address: + NA: 0x20A3258 + length: + NA: 0x24 + description: |- + An array of eight egg-moves manually granted to a small handful starter pokemon, used by the function AddStarterEggMove. + + The ninth element is a terminator, containing a blank monster and move ID. + + The moves are as follows: + - Vulpix: Faint Attack + - Eevee: Flail + - Phanpy: AncientPower + - Shinx: Quick Attack + - Riolu: Bite + - Meowth: Hypnosis + - Munchlax: Zen Headbutt + - Skitty: Zen Headbutt + + Notably, all of the listed Pokémon are starters whom have recieved changes in some way in Explorers of Sky. + According to Bulbapedia: Phanphy, Vulpix, Riolu, Eevee, and Shinx are all new hero choices in EoS specifically, + Skitty was modified to be unavalible as a male, + and Meowth and Munchlax were removed from the hero pool altogether, only being partner choices in EoS. + + MORE RESEARCH REQUIRED: Are these pokemon able to re-learn the egg move they're given if it's forgotten in any way? - name: REMOTE_STRINGS address: EU: 0x20A4140