mirror of
https://github.com/pret/pokefirered.git
synced 2026-05-23 06:06:12 -05:00
fix dire hit
This commit is contained in:
parent
ec66b4fe22
commit
aa6a42ef41
|
|
@ -855,8 +855,9 @@
|
|||
.byte 0x99
|
||||
.endm
|
||||
|
||||
.macro setfocusenergy
|
||||
.macro setfocusenergy battler:req
|
||||
.byte 0x9a
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro transformdataexecution
|
||||
|
|
|
|||
|
|
@ -3652,7 +3652,7 @@ BattleScript_EffectFocusEnergy::
|
|||
attackstring
|
||||
ppreduce
|
||||
jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY_ANY, BattleScript_ButItFailed
|
||||
setfocusenergy
|
||||
setfocusenergy BS_TARGET
|
||||
attackanimation
|
||||
waitanimation
|
||||
printfromtable gFocusEnergyUsedStringIds
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ BattleScript_ItemSetMist::
|
|||
BattleScript_ItemSetFocusEnergy::
|
||||
call BattleScript_UseItemMessage
|
||||
jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY_ANY, BattleScript_ButItFailed
|
||||
setfocusenergy
|
||||
setfocusenergy BS_ATTACKER
|
||||
playmoveanimation BS_ATTACKER, MOVE_FOCUS_ENERGY
|
||||
waitanimation
|
||||
copybyte sBATTLER, gBattlerAttacker
|
||||
|
|
|
|||
|
|
@ -12392,22 +12392,23 @@ static void Cmd_setmist(void)
|
|||
|
||||
static void Cmd_setfocusenergy(void)
|
||||
{
|
||||
CMD_ARGS();
|
||||
CMD_ARGS(u8 battler);
|
||||
u8 battler = GetBattlerForBattleScript(cmd->battler);
|
||||
|
||||
if ((gMovesInfo[gCurrentMove].effect == EFFECT_DRAGON_CHEER && (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || (gAbsentBattlerFlags & gBitTable[gBattlerTarget])))
|
||||
|| gBattleMons[gBattlerTarget].status2 & STATUS2_FOCUS_ENERGY_ANY)
|
||||
if ((gMovesInfo[gCurrentMove].effect == EFFECT_DRAGON_CHEER && (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || (gAbsentBattlerFlags & gBitTable[battler])))
|
||||
|| gBattleMons[battler].status2 & STATUS2_FOCUS_ENERGY_ANY)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_FAILED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FOCUS_ENERGY_FAILED;
|
||||
}
|
||||
else if (gMovesInfo[gCurrentMove].effect == EFFECT_DRAGON_CHEER && !IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_DRAGON))
|
||||
else if (gMovesInfo[gCurrentMove].effect == EFFECT_DRAGON_CHEER && !IS_BATTLER_OF_TYPE(battler, TYPE_DRAGON))
|
||||
{
|
||||
gBattleMons[gBattlerTarget].status2 |= STATUS2_DRAGON_CHEER;
|
||||
gBattleMons[battler].status2 |= STATUS2_DRAGON_CHEER;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_GETTING_PUMPED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleMons[gBattlerTarget].status2 |= STATUS2_FOCUS_ENERGY;
|
||||
gBattleMons[battler].status2 |= STATUS2_FOCUS_ENERGY;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_GETTING_PUMPED;
|
||||
}
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user