diff --git a/include/strings.h b/include/strings.h index 72109ed94..4019dee0b 100644 --- a/include/strings.h +++ b/include/strings.h @@ -475,6 +475,7 @@ extern const u8 gText_EscapeFromHere[]; extern const u8 gText_PkmnCuredOfPoison[]; extern const u8 gText_PkmnWokeUp2[]; extern const u8 gText_PkmnBurnHealed[]; +extern const u8 gText_PkmnFrostbiteHealed[]; extern const u8 gText_PkmnThawedOut[]; extern const u8 gText_PkmnCuredOfParalysis[]; extern const u8 gText_PkmnGotOverInfatuation[]; diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 29911d798..d7fd062ba 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -1079,7 +1079,7 @@ static bool8 ShouldUseItem(void) shouldUse = TRUE; if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN) 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; if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS) shouldUse = TRUE; diff --git a/src/item.c b/src/item.c index b2b19480a..d07e93782 100644 --- a/src/item.c +++ b/src/item.c @@ -976,7 +976,7 @@ u32 GetItemStatus1Mask(u16 itemId) case ITEM3_PARALYSIS: return STATUS1_PARALYSIS; case ITEM3_FREEZE: - return STATUS1_FREEZE; + return STATUS1_FREEZE | STATUS1_FROSTBITE; case ITEM3_BURN: return STATUS1_BURN; case ITEM3_POISON: diff --git a/src/party_menu.c b/src/party_menu.c index 43ed5818a..1623201b1 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4332,6 +4332,8 @@ static void GetMedicineItemEffectMessage(u16 item) break; case ITEM_EFFECT_CURE_FREEZE: StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut); + // TO DO: if it heals frostbite, use the following instead: + // StringExpandPlaceholders(gStringVar4, gText_PkmnFrostbiteHealed); break; case ITEM_EFFECT_CURE_PARALYSIS: StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis); diff --git a/src/pokemon.c b/src/pokemon.c index e82cb98c3..7fc339905 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5802,7 +5802,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; if ((itemEffect[i] & ITEM3_BURN) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0) 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; if ((itemEffect[i] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0) retVal = FALSE; diff --git a/src/strings.c b/src/strings.c index 75ff2ef99..eb7bb8ba1 100644 --- a/src/strings.c +++ b/src/strings.c @@ -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_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_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_PPWasRestored[] = _("PP was restored.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}"); // Unused