mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 12:14:20 +01:00
Allow for healing with items
This commit is contained in:
parent
f50bfb3770
commit
9c9a1fb831
@ -475,6 +475,7 @@ extern const u8 gText_EscapeFromHere[];
|
|||||||
extern const u8 gText_PkmnCuredOfPoison[];
|
extern const u8 gText_PkmnCuredOfPoison[];
|
||||||
extern const u8 gText_PkmnWokeUp2[];
|
extern const u8 gText_PkmnWokeUp2[];
|
||||||
extern const u8 gText_PkmnBurnHealed[];
|
extern const u8 gText_PkmnBurnHealed[];
|
||||||
|
extern const u8 gText_PkmnFrostbiteHealed[];
|
||||||
extern const u8 gText_PkmnThawedOut[];
|
extern const u8 gText_PkmnThawedOut[];
|
||||||
extern const u8 gText_PkmnCuredOfParalysis[];
|
extern const u8 gText_PkmnCuredOfParalysis[];
|
||||||
extern const u8 gText_PkmnGotOverInfatuation[];
|
extern const u8 gText_PkmnGotOverInfatuation[];
|
||||||
|
@ -1079,7 +1079,7 @@ static bool8 ShouldUseItem(void)
|
|||||||
shouldUse = TRUE;
|
shouldUse = TRUE;
|
||||||
if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN)
|
if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN)
|
||||||
shouldUse = TRUE;
|
shouldUse = TRUE;
|
||||||
if (itemEffects[3] & ITEM3_FREEZE && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE)
|
if (itemEffects[3] & ITEM3_FREEZE && (gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE || gBattleMons[gActiveBattler].status1 & STATUS1_FROSTBITE))
|
||||||
shouldUse = TRUE;
|
shouldUse = TRUE;
|
||||||
if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS)
|
if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS)
|
||||||
shouldUse = TRUE;
|
shouldUse = TRUE;
|
||||||
|
@ -976,7 +976,7 @@ u32 GetItemStatus1Mask(u16 itemId)
|
|||||||
case ITEM3_PARALYSIS:
|
case ITEM3_PARALYSIS:
|
||||||
return STATUS1_PARALYSIS;
|
return STATUS1_PARALYSIS;
|
||||||
case ITEM3_FREEZE:
|
case ITEM3_FREEZE:
|
||||||
return STATUS1_FREEZE;
|
return STATUS1_FREEZE | STATUS1_FROSTBITE;
|
||||||
case ITEM3_BURN:
|
case ITEM3_BURN:
|
||||||
return STATUS1_BURN;
|
return STATUS1_BURN;
|
||||||
case ITEM3_POISON:
|
case ITEM3_POISON:
|
||||||
|
@ -4332,6 +4332,8 @@ static void GetMedicineItemEffectMessage(u16 item)
|
|||||||
break;
|
break;
|
||||||
case ITEM_EFFECT_CURE_FREEZE:
|
case ITEM_EFFECT_CURE_FREEZE:
|
||||||
StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut);
|
StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut);
|
||||||
|
// TO DO: if it heals frostbite, use the following instead:
|
||||||
|
// StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed);
|
||||||
break;
|
break;
|
||||||
case ITEM_EFFECT_CURE_PARALYSIS:
|
case ITEM_EFFECT_CURE_PARALYSIS:
|
||||||
StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis);
|
StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis);
|
||||||
|
@ -5802,7 +5802,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||||||
retVal = FALSE;
|
retVal = FALSE;
|
||||||
if ((itemEffect[i] & ITEM3_BURN) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0)
|
if ((itemEffect[i] & ITEM3_BURN) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0)
|
||||||
retVal = FALSE;
|
retVal = FALSE;
|
||||||
if ((itemEffect[i] & ITEM3_FREEZE) && HealStatusConditions(mon, partyIndex, STATUS1_FREEZE, battlerId) == 0)
|
if ((itemEffect[i] & ITEM3_FREEZE) && HealStatusConditions(mon, partyIndex, STATUS1_FREEZE | STATUS1_FROSTBITE, battlerId) == 0)
|
||||||
retVal = FALSE;
|
retVal = FALSE;
|
||||||
if ((itemEffect[i] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0)
|
if ((itemEffect[i] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0)
|
||||||
retVal = FALSE;
|
retVal = FALSE;
|
||||||
|
@ -414,6 +414,7 @@ const u8 gText_PkmnCuredOfPoison[] = _("{STR_VAR_1} was cured of its\npoisoning.
|
|||||||
const u8 gText_PkmnCuredOfParalysis[] = _("{STR_VAR_1} was cured of\nparalysis.{PAUSE_UNTIL_PRESS}");
|
const u8 gText_PkmnCuredOfParalysis[] = _("{STR_VAR_1} was cured of\nparalysis.{PAUSE_UNTIL_PRESS}");
|
||||||
const u8 gText_PkmnWokeUp2[] = _("{STR_VAR_1} woke up.{PAUSE_UNTIL_PRESS}");
|
const u8 gText_PkmnWokeUp2[] = _("{STR_VAR_1} woke up.{PAUSE_UNTIL_PRESS}");
|
||||||
const u8 gText_PkmnBurnHealed[] = _("{STR_VAR_1}'s burn was healed.{PAUSE_UNTIL_PRESS}");
|
const u8 gText_PkmnBurnHealed[] = _("{STR_VAR_1}'s burn was healed.{PAUSE_UNTIL_PRESS}");
|
||||||
|
const u8 gText_PkmnFrostbiteHealed[] = _("{STR_VAR_1}'s frostbite was healed.{PAUSE_UNTIL_PRESS}");
|
||||||
const u8 gText_PkmnThawedOut[] = _("{STR_VAR_1} was thawed out.{PAUSE_UNTIL_PRESS}");
|
const u8 gText_PkmnThawedOut[] = _("{STR_VAR_1} was thawed out.{PAUSE_UNTIL_PRESS}");
|
||||||
const u8 gText_PPWasRestored[] = _("PP was restored.{PAUSE_UNTIL_PRESS}");
|
const u8 gText_PPWasRestored[] = _("PP was restored.{PAUSE_UNTIL_PRESS}");
|
||||||
const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}"); // Unused
|
const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}"); // Unused
|
||||||
|
Loading…
Reference in New Issue
Block a user