mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-03 18:00:01 +01:00
Refactored ItemUseOutOfBattle_FormChange to not use secondaryId
This commit is contained in:
parent
620e69945d
commit
ff494edb85
@ -3193,7 +3193,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_ITEMS,
|
.pocket = POCKET_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
.flingPower = 10,
|
.flingPower = 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3207,7 +3206,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_ITEMS,
|
.pocket = POCKET_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
.flingPower = 10,
|
.flingPower = 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3221,7 +3219,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_ITEMS,
|
.pocket = POCKET_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
.flingPower = 10,
|
.flingPower = 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3235,7 +3232,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_ITEMS,
|
.pocket = POCKET_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange_ConsumedOnUse,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
.flingPower = 10,
|
.flingPower = 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -9071,7 +9067,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[ITEM_REVEAL_GLASS] =
|
[ITEM_REVEAL_GLASS] =
|
||||||
@ -9083,7 +9078,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[ITEM_DNA_SPLICERS] =
|
[ITEM_DNA_SPLICERS] =
|
||||||
@ -9093,9 +9087,8 @@ const struct Item gItems[] =
|
|||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sDNASplicersDesc,
|
.description = sDNASplicersDesc,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_BAG_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[ITEM_ZYGARDE_CUBE] =
|
[ITEM_ZYGARDE_CUBE] =
|
||||||
@ -9119,7 +9112,6 @@ const struct Item gItems[] =
|
|||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_PARTY_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[ITEM_N_SOLARIZER] =
|
[ITEM_N_SOLARIZER] =
|
||||||
@ -9129,9 +9121,8 @@ const struct Item gItems[] =
|
|||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sNSolarizerDesc,
|
.description = sNSolarizerDesc,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_BAG_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[ITEM_N_LUNARIZER] =
|
[ITEM_N_LUNARIZER] =
|
||||||
@ -9141,9 +9132,8 @@ const struct Item gItems[] =
|
|||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sNLunarizerDesc,
|
.description = sNLunarizerDesc,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_BAG_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[ITEM_REINS_OF_UNITY] =
|
[ITEM_REINS_OF_UNITY] =
|
||||||
@ -9153,9 +9143,8 @@ const struct Item gItems[] =
|
|||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sReinsOfUnityDesc,
|
.description = sReinsOfUnityDesc,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
.type = ITEM_USE_PARTY_MENU,
|
.type = ITEM_USE_BAG_MENU,
|
||||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo: ItemUseOutOfBattle_FormChange_Fusion
|
||||||
.secondaryId = FORM_ITEM_USE,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Battle Mechanic Key Items
|
// Battle Mechanic Key Items
|
||||||
|
@ -5591,7 +5591,7 @@ static void Task_TryItemUseFormChange(u8 taskId)
|
|||||||
bool32 TryItemUseFormChange(u8 taskId, TaskFunc task)
|
bool32 TryItemUseFormChange(u8 taskId, TaskFunc task)
|
||||||
{
|
{
|
||||||
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
|
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
|
||||||
u16 targetSpecies = GetFormChangeTargetSpecies(mon, ItemId_GetSecondaryId(gSpecialVar_ItemId), gSpecialVar_ItemId);
|
u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_USE, gSpecialVar_ItemId);
|
||||||
|
|
||||||
if (targetSpecies != SPECIES_NONE)
|
if (targetSpecies != SPECIES_NONE)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user