Add Meteorite form change functionality (#3770)

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
kittenchilly 2023-12-20 03:33:08 -06:00 committed by GitHub
parent 442620cf6b
commit bb94d302ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 2 deletions

View file

@ -9048,8 +9048,8 @@ const struct Item gItems[] =
.description = sMeteoriteDesc, .description = sMeteoriteDesc,
.importance = 1, .importance = 1,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_FormChange,
}, },
[ITEM_MAGMA_EMBLEM] = [ITEM_MAGMA_EMBLEM] =

View file

@ -385,6 +385,28 @@ static const struct FormChange sRayquazaFormChangeTable[] = {
}; };
#endif //P_FAMILY_RAYQUAZA #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 #if P_FAMILY_BURMY
static const struct FormChange sBurmyFormChangeTable[] = { static const struct FormChange sBurmyFormChangeTable[] = {
{FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY_PLANT_CLOAK, BATTLE_TERRAIN_GRASS}, {FORM_CHANGE_END_BATTLE_TERRAIN, SPECIES_BURMY_PLANT_CLOAK, BATTLE_TERRAIN_GRASS},

View file

@ -8176,6 +8176,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysNormal), PALETTES(DeoxysNormal),
ICON(DeoxysNormal, 0), ICON(DeoxysNormal, 0),
LEARNSETS(DeoxysNormal), LEARNSETS(DeoxysNormal),
.formChangeTable = sDeoxysNormalFormChangeTable,
}, },
[SPECIES_DEOXYS_ATTACK] = [SPECIES_DEOXYS_ATTACK] =
@ -8199,6 +8200,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysAttack), PALETTES(DeoxysAttack),
ICON(DeoxysAttack, 0), ICON(DeoxysAttack, 0),
LEARNSETS(DeoxysAttack), LEARNSETS(DeoxysAttack),
.formChangeTable = sDeoxysAttackFormChangeTable,
}, },
[SPECIES_DEOXYS_DEFENSE] = [SPECIES_DEOXYS_DEFENSE] =
@ -8222,6 +8224,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysDefense), PALETTES(DeoxysDefense),
ICON(DeoxysDefense, 0), ICON(DeoxysDefense, 0),
LEARNSETS(DeoxysDefense), LEARNSETS(DeoxysDefense),
.formChangeTable = sDeoxysDefenseFormChangeTable,
}, },
[SPECIES_DEOXYS_SPEED] = [SPECIES_DEOXYS_SPEED] =
@ -8245,6 +8248,7 @@ const struct SpeciesInfo gSpeciesInfoGen3[] =
PALETTES(DeoxysSpeed), PALETTES(DeoxysSpeed),
ICON(DeoxysSpeed, 0), ICON(DeoxysSpeed, 0),
LEARNSETS(DeoxysSpeed), LEARNSETS(DeoxysSpeed),
.formChangeTable = sDeoxysSpeedFormChangeTable,
}, },
#endif //P_FAMILY_DEOXYS #endif //P_FAMILY_DEOXYS