Allow Lv100 'mons to access level based evos
This commit is contained in:
parent
b48f057fe7
commit
53110a0ff6
1 changed files with 13 additions and 5 deletions
|
@ -5161,8 +5161,9 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task)
|
|||
u16 *itemPtr = &gSpecialVar_ItemId;
|
||||
bool8 cannotUseEffect;
|
||||
u8 holdEffectParam = ItemId_GetHoldEffectParam(*itemPtr);
|
||||
sInitialLevel = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL);
|
||||
|
||||
sInitialLevel = GetMonData(mon, MON_DATA_LEVEL);
|
||||
if (sInitialLevel != MAX_LEVEL)
|
||||
{
|
||||
BufferMonStatsToTaskData(mon, arrayPtr);
|
||||
|
@ -5176,10 +5177,17 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task)
|
|||
PlaySE(SE_SELECT);
|
||||
if (cannotUseEffect)
|
||||
{
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
if (targetSpecies != SPECIES_NONE)
|
||||
{
|
||||
PartyMenuTryEvolution(taskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue