Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Meteorite form change functionality #3770

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/data/items.h
Original file line number Diff line number Diff line change
@@ -9048,8 +9048,8 @@ const struct Item gItems[] =
.description = sMeteoriteDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
},

[ITEM_MAGMA_EMBLEM] =
22 changes: 22 additions & 0 deletions src/data/pokemon/form_change_tables.h
Original file line number Diff line number Diff line change
@@ -385,6 +385,28 @@ static const struct FormChange sRayquazaFormChangeTable[] = {
};
#endif //P_FAMILY_RAYQUAZA

#if P_FAMILY_DEOXYS
static const struct FormChange sDeoxysNormalFormChangeTable[] = {
{FORM_CHANGE_ITEM_USE, SPECIES_DEOXYS_ATTACK, ITEM_METEORITE},
{FORM_CHANGE_TERMINATOR},
};

static const struct FormChange sDeoxysAttackFormChangeTable[] = {
{FORM_CHANGE_ITEM_USE, SPECIES_DEOXYS_DEFENSE, ITEM_METEORITE},
{FORM_CHANGE_TERMINATOR},
};

static const struct FormChange sDeoxysDefenseFormChangeTable[] = {
{FORM_CHANGE_ITEM_USE, SPECIES_DEOXYS_SPEED, ITEM_METEORITE},
{FORM_CHANGE_TERMINATOR},
};

static const struct FormChange sDeoxysSpeedFormChangeTable[] = {
{FORM_CHANGE_ITEM_USE, SPECIES_DEOXYS_NORMAL, ITEM_METEORITE},
{FORM_CHANGE_TERMINATOR},
};
#endif //P_FAMILY_DEOXYS

#if P_FAMILY_BURMY
static const struct FormChange sBurmyFormChangeTable[] = {
{FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY_PLANT_CLOAK, BATTLE_TERRAIN_GRASS},
4 changes: 4 additions & 0 deletions src/data/pokemon/species_info/gen_3.h
Original file line number Diff line number Diff line change
@@ -8176,6 +8176,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysNormal),
ICON(DeoxysNormal, 0),
LEARNSETS(DeoxysNormal),
.formChangeTable = sDeoxysNormalFormChangeTable,
},

[SPECIES_DEOXYS_ATTACK] =
@@ -8199,6 +8200,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysAttack),
ICON(DeoxysAttack, 0),
LEARNSETS(DeoxysAttack),
.formChangeTable = sDeoxysAttackFormChangeTable,
},

[SPECIES_DEOXYS_DEFENSE] =
@@ -8222,6 +8224,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysDefense),
ICON(DeoxysDefense, 0),
LEARNSETS(DeoxysDefense),
.formChangeTable = sDeoxysDefenseFormChangeTable,
},

[SPECIES_DEOXYS_SPEED] =
@@ -8245,6 +8248,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysSpeed),
ICON(DeoxysSpeed, 0),
LEARNSETS(DeoxysSpeed),
.formChangeTable = sDeoxysSpeedFormChangeTable,
},
#endif //P_FAMILY_DEOXYS