mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Thawing out for frostbite
This commit is contained in:
parent
0b8d148c26
commit
f13c39d784
@ -8151,12 +8151,24 @@ BattleScript_MoveUsedUnfroze::
|
||||
updatestatusicon BS_ATTACKER
|
||||
return
|
||||
|
||||
BattleScript_MoveUsedUnfrostbite::
|
||||
printfromtable gFrostbiteHealedStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_ATTACKER
|
||||
return
|
||||
|
||||
BattleScript_DefrostedViaFireMove::
|
||||
printstring STRINGID_PKMNWASDEFROSTED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_TARGET
|
||||
return
|
||||
|
||||
BattleScript_FrostbiteHealedViaFireMove::
|
||||
printstring STRINGID_PKMNFROSTBITEHEALED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_TARGET
|
||||
return
|
||||
|
||||
BattleScript_MoveUsedIsParalyzed::
|
||||
printstring STRINGID_PKMNISPARALYZED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
|
@ -111,7 +111,9 @@ extern const u8 BattleScript_BurnTurnDmg[];
|
||||
extern const u8 BattleScript_FrostbiteTurnDmg[];
|
||||
extern const u8 BattleScript_MoveUsedIsFrozen[];
|
||||
extern const u8 BattleScript_MoveUsedUnfroze[];
|
||||
extern const u8 BattleScript_MoveUsedUnfrostbite[];
|
||||
extern const u8 BattleScript_DefrostedViaFireMove[];
|
||||
extern const u8 BattleScript_FrostbiteHealedViaFireMove[];
|
||||
extern const u8 BattleScript_MoveUsedIsParalyzed[];
|
||||
extern const u8 BattleScript_MoveUsedFlinched[];
|
||||
extern const u8 BattleScript_PrintUproarOverTurns[];
|
||||
|
@ -655,8 +655,11 @@
|
||||
#define STRINGID_PKMNGOTFROSTBITE 653
|
||||
#define STRINGID_PKMNSITEMHEALEDFROSTBITE 654
|
||||
#define STRINGID_ATTACKERHEALEDITSFROSTBITE 655
|
||||
#define STRINGID_PKMNFROSTBITEHEALED 656
|
||||
#define STRINGID_PKMNFROSTBITEHEALED2 657
|
||||
#define STRINGID_PKMNFROSTBITEHEALEDBY 658
|
||||
|
||||
#define BATTLESTRINGS_COUNT 656
|
||||
#define BATTLESTRINGS_COUNT 659
|
||||
|
||||
// This is the string id that gBattleStringsTable starts with.
|
||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||
@ -864,6 +867,10 @@
|
||||
#define B_MSG_DEFROSTED 0
|
||||
#define B_MSG_DEFROSTED_BY_MOVE 1
|
||||
|
||||
// gFrostbiteHealedStringIds
|
||||
#define B_MSG_FROSTBITE_HEALED 0
|
||||
#define B_MSG_FROSTBITE_HEALED_BY_MOVE 1
|
||||
|
||||
// gBattlePalaceFlavorTextTable
|
||||
#define B_MSG_GLINT_IN_EYE 0
|
||||
#define B_MSG_GETTING_IN_POS 1
|
||||
|
@ -112,6 +112,9 @@ static const u8 sText_PkmnIsFrozen[] = _("{B_ATK_NAME_WITH_PREFIX} is\nfrozen so
|
||||
static const u8 sText_PkmnWasDefrosted[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndefrosted!");
|
||||
static const u8 sText_PkmnWasDefrosted2[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted!");
|
||||
static const u8 sText_PkmnWasDefrostedBy[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted by {B_CURRENT_MOVE}!");
|
||||
static const u8 sText_PkmnFrostbiteHealed[] = _("{B_DEF_NAME_WITH_PREFIX}'s\nfrostbite was healed!");
|
||||
static const u8 sText_PkmnFrostbiteHealed2[] = _("{B_ATK_NAME_WITH_PREFIX}'s\nfrostbite was healed!");
|
||||
static const u8 sText_PkmnFrostbiteHealedBy[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_CURRENT_MOVE}\nhealed its frostbite!");
|
||||
static const u8 sText_PkmnWasParalyzed[] = _("{B_EFF_NAME_WITH_PREFIX} is paralyzed!\nIt may be unable to move!");
|
||||
static const u8 sText_PkmnWasParalyzedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nparalyzed {B_EFF_NAME_WITH_PREFIX}!\lIt may be unable to move!");
|
||||
static const u8 sText_PkmnIsParalyzed[] = _("{B_ATK_NAME_WITH_PREFIX} is paralyzed!\nIt can't move!");
|
||||
@ -1436,6 +1439,9 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_PKMNGOTFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotFrostbite,
|
||||
[STRINGID_PKMNSITEMHEALEDFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemHealedFrostbite,
|
||||
[STRINGID_ATTACKERHEALEDITSFROSTBITE - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsFrostbite,
|
||||
[STRINGID_PKMNFROSTBITEHEALED - BATTLESTRINGS_TABLE_START] = sText_PkmnFrostbiteHealed,
|
||||
[STRINGID_PKMNFROSTBITEHEALED2 - BATTLESTRINGS_TABLE_START] = sText_PkmnFrostbiteHealed2,
|
||||
[STRINGID_PKMNFROSTBITEHEALEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnFrostbiteHealedBy,
|
||||
};
|
||||
|
||||
const u16 gTrainerUsedItemStringIds[] =
|
||||
@ -1742,6 +1748,12 @@ const u16 gGotFrostbiteStringIds[] =
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNGOTFROSTBITE
|
||||
};
|
||||
|
||||
const u16 gFrostbiteHealedStringIds[] =
|
||||
{
|
||||
[B_MSG_FROSTBITE_HEALED] = STRINGID_PKMNFROSTBITEHEALED2,
|
||||
[B_MSG_FROSTBITE_HEALED_BY_MOVE] = STRINGID_PKMNFROSTBITEHEALEDBY
|
||||
};
|
||||
|
||||
const u16 gGotFrozenStringIds[] =
|
||||
{
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNWASFROZEN,
|
||||
|
@ -5565,6 +5565,25 @@ static void Cmd_moveend(void)
|
||||
gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove;
|
||||
effect = TRUE;
|
||||
}
|
||||
if (gBattleMons[gBattlerTarget].status1 & STATUS1_FROSTBITE
|
||||
&& gBattleMons[gBattlerTarget].hp != 0
|
||||
&& gBattlerAttacker != gBattlerTarget
|
||||
&& gSpecialStatuses[gBattlerTarget].specialDmg
|
||||
&& (moveType == TYPE_FIRE
|
||||
#if B_BURN_HIT_THAW >= GEN_6
|
||||
|| gBattleMoves[gCurrentMove].effect == EFFECT_BURN_HIT
|
||||
#endif
|
||||
)
|
||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
||||
{
|
||||
gBattleMons[gBattlerTarget].status1 &= ~STATUS1_FROSTBITE;
|
||||
gActiveBattler = gBattlerTarget;
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gBattlerTarget].status1), &gBattleMons[gBattlerTarget].status1);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_FrostbiteHealedViaFireMove;
|
||||
effect = TRUE;
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_RECOIL:
|
||||
|
@ -3644,6 +3644,17 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
}
|
||||
effect = 2;
|
||||
}
|
||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FROSTBITE)
|
||||
{
|
||||
if (!(gBattleMoves[gCurrentMove].effect == EFFECT_BURN_UP && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE)))
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_FROSTBITE;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedUnfrostbite;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FROSTBITE_HEALED_BY_MOVE;
|
||||
}
|
||||
effect = 2;
|
||||
}
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_POWDER_MOVE:
|
||||
|
Loading…
Reference in New Issue
Block a user