Fix Ice Heal message

This commit is contained in:
Bassoonian 2023-04-25 19:38:47 +02:00
parent a2bc21d902
commit 2aa4d2da38
4 changed files with 13 additions and 11 deletions

View File

@ -74,7 +74,7 @@
#define ITEM_EFFECT_CURE_POISON 3
#define ITEM_EFFECT_CURE_SLEEP 4
#define ITEM_EFFECT_CURE_BURN 5
#define ITEM_EFFECT_CURE_FREEZE 6
#define ITEM_EFFECT_CURE_FREEZE_FROSTBITE 6
#define ITEM_EFFECT_CURE_PARALYSIS 7
#define ITEM_EFFECT_CURE_CONFUSION 8
#define ITEM_EFFECT_CURE_INFATUATION 9

View File

@ -941,7 +941,7 @@ u8 ItemId_GetBattleUsage(u16 itemId)
case ITEM_EFFECT_CURE_POISON:
case ITEM_EFFECT_CURE_SLEEP:
case ITEM_EFFECT_CURE_BURN:
case ITEM_EFFECT_CURE_FREEZE:
case ITEM_EFFECT_CURE_FREEZE_FROSTBITE:
case ITEM_EFFECT_CURE_PARALYSIS:
case ITEM_EFFECT_CURE_ALL_STATUS:
case ITEM_EFFECT_CURE_CONFUSION:

View File

@ -1244,7 +1244,7 @@ void ItemUseOutOfBattle_EnigmaBerry(u8 taskId)
case ITEM_EFFECT_CURE_POISON:
case ITEM_EFFECT_CURE_SLEEP:
case ITEM_EFFECT_CURE_BURN:
case ITEM_EFFECT_CURE_FREEZE:
case ITEM_EFFECT_CURE_FREEZE_FROSTBITE:
case ITEM_EFFECT_CURE_PARALYSIS:
case ITEM_EFFECT_CURE_ALL_STATUS:
case ITEM_EFFECT_ATK_EV:

View File

@ -4317,7 +4317,7 @@ static bool8 IsHPRecoveryItem(u16 item)
return FALSE;
}
static void GetMedicineItemEffectMessage(u16 item)
static void GetMedicineItemEffectMessage(u16 item, u32 statusCured)
{
switch (GetItemEffectType(item))
{
@ -4330,10 +4330,11 @@ static void GetMedicineItemEffectMessage(u16 item)
case ITEM_EFFECT_CURE_BURN:
StringExpandPlaceholders(gStringVar4, gText_PkmnBurnHealed);
break;
case ITEM_EFFECT_CURE_FREEZE:
case ITEM_EFFECT_CURE_FREEZE_FROSTBITE:
if (statusCured & STATUS1_FREEZE)
StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut);
// TO DO: if it heals frostbite, use the following instead:
// StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed);
if (statusCured & STATUS1_FROSTBITE)
StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed);
break;
case ITEM_EFFECT_CURE_PARALYSIS:
StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis);
@ -4497,6 +4498,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task)
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
u16 item = gSpecialVar_ItemId;
bool8 canHeal, cannotUse;
u32 oldStatus = GetMonData(mon, MON_DATA_STATUS);
if (NotUsingHPEVItemOnShedinja(mon, item) == FALSE)
{
@ -4549,7 +4551,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task)
else
{
GetMonNickname(mon, gStringVar1);
GetMedicineItemEffectMessage(item);
GetMedicineItemEffectMessage(item, oldStatus);
DisplayPartyMenuMessage(gStringVar4, TRUE);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = task;
@ -4976,7 +4978,7 @@ static void TryUseItemOnMove(u8 taskId)
RemoveBagItem(item, 1);
move = GetMonData(mon, MON_DATA_MOVE1 + *moveSlot);
StringCopy(gStringVar1, gMoveNames[move]);
GetMedicineItemEffectMessage(item);
GetMedicineItemEffectMessage(item, 0);
DisplayPartyMenuMessage(gStringVar4, TRUE);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
@ -5826,7 +5828,7 @@ u8 GetItemEffectType(u16 item)
else if (statusCure == ITEM3_BURN)
return ITEM_EFFECT_CURE_BURN;
else if (statusCure == ITEM3_FREEZE)
return ITEM_EFFECT_CURE_FREEZE;
return ITEM_EFFECT_CURE_FREEZE_FROSTBITE;
else if (statusCure == ITEM3_PARALYSIS)
return ITEM_EFFECT_CURE_PARALYSIS;
else if (statusCure == ITEM3_CONFUSION)