mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-25 13:45:29 +01:00
fix eject button
This commit is contained in:
parent
5c5276b04d
commit
79f39a1fd0
@ -8057,7 +8057,6 @@ BattleScript_RedCardSuctionCups:
|
|||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_EjectButtonActivates::
|
BattleScript_EjectButtonActivates::
|
||||||
jumpifcantswitch BS_SCRIPTING, BattleScript_EjectButtonEnd
|
|
||||||
makevisible BS_ATTACKER
|
makevisible BS_ATTACKER
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||||
printstring STRINGID_EJECTBUTTONACTIVATE
|
printstring STRINGID_EJECTBUTTONACTIVATE
|
||||||
|
@ -5070,11 +5070,12 @@ static void Cmd_moveend(void)
|
|||||||
case MOVEEND_EJECT_BUTTON:
|
case MOVEEND_EJECT_BUTTON:
|
||||||
if (gCurrentMove != MOVE_DRAGON_TAIL
|
if (gCurrentMove != MOVE_DRAGON_TAIL
|
||||||
&& gCurrentMove != MOVE_CIRCLE_THROW
|
&& gCurrentMove != MOVE_CIRCLE_THROW
|
||||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
|
||||||
&& IsBattlerAlive(gBattlerAttacker)
|
&& IsBattlerAlive(gBattlerAttacker)
|
||||||
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove)
|
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove)
|
||||||
&& (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER || (gBattleTypeFlags & BATTLE_TYPE_TRAINER)))
|
&& (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER || (gBattleTypeFlags & BATTLE_TYPE_TRAINER)))
|
||||||
{
|
{
|
||||||
|
// Since we check if battler was damaged, we don't need to check move result.
|
||||||
|
// In fact, doing so actually prevents multi-target moves from activating eject button properly
|
||||||
u8 battlers[4] = {0, 1, 2, 3};
|
u8 battlers[4] = {0, 1, 2, 3};
|
||||||
SortBattlersBySpeed(battlers, FALSE);
|
SortBattlersBySpeed(battlers, FALSE);
|
||||||
for (i = 0; i < gBattlersCount; i++)
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
@ -5106,7 +5107,7 @@ static void Cmd_moveend(void)
|
|||||||
&& IsBattlerAlive(gBattlerAttacker)
|
&& IsBattlerAlive(gBattlerAttacker)
|
||||||
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove))
|
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove))
|
||||||
{
|
{
|
||||||
// since we check if battler was damaged, we don't need to check move result.
|
// Since we check if battler was damaged, we don't need to check move result.
|
||||||
// In fact, doing so actually prevents multi-target moves from activating red card properly
|
// In fact, doing so actually prevents multi-target moves from activating red card properly
|
||||||
u8 battlers[4] = {0, 1, 2, 3};
|
u8 battlers[4] = {0, 1, 2, 3};
|
||||||
SortBattlersBySpeed(battlers, FALSE);
|
SortBattlersBySpeed(battlers, FALSE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user