diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index dba914924d..bc2f4dea3c 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9634,13 +9634,6 @@ BattleScript_EjectPackActivates:: jumpifcantswitch BS_SCRIPTING, BattleScript_EjectButtonEnd goto BattleScript_EjectPackActivate_Ret -BattleScript_EjectPackMissesTiming:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT - printstring STRINGID_EJECTBUTTONACTIVATE - waitmessage B_WAIT_TIME_LONG - removeitem BS_SCRIPTING - return - BattleScript_DarkTypePreventsPrankster:: attackstring ppreduce diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 158dfb5dc3..1404a40718 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -421,7 +421,6 @@ extern const u8 BattleScript_EjectButtonActivates[]; extern const u8 BattleScript_EjectPackActivate_Ret[]; extern const u8 BattleScript_EjectPackActivate_End2[]; extern const u8 BattleScript_EjectPackActivates[]; -extern const u8 BattleScript_EjectPackMissesTiming[]; extern const u8 BattleScript_MentalHerbCureRet[]; extern const u8 BattleScript_MentalHerbCureEnd2[]; extern const u8 BattleScript_TerrainPreventsEnd2[]; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3c719049a6..82d941bbda 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6471,19 +6471,13 @@ static void Cmd_moveend(void) } else // Eject Pack { - if (gBattleResources->flags->flags[gBattlerTarget] & RESOURCE_FLAG_EMERGENCY_EXIT) - { - gBattlescriptCurrInstr = BattleScript_EjectPackMissesTiming; - gProtectStructs[battler].statFell = FALSE; - } - else + if (!(gBattleResources->flags->flags[gBattlerTarget] & RESOURCE_FLAG_EMERGENCY_EXIT)) { gBattlescriptCurrInstr = BattleScript_EjectPackActivates; AI_DATA->ejectPackSwitch = TRUE; - // Are these 2 lines below needed? - gProtectStructs[battler].statFell = FALSE; gSpecialStatuses[gBattlerAttacker].preventLifeOrbDamage = TRUE; } + gProtectStructs[battler].statFell = FALSE; } break; // Only the fastest Eject item activates } diff --git a/test/battle/hold_effect/eject_pack.c b/test/battle/hold_effect/eject_pack.c index b3a2d34b63..0d2696392f 100644 --- a/test/battle/hold_effect/eject_pack.c +++ b/test/battle/hold_effect/eject_pack.c @@ -76,12 +76,13 @@ SINGLE_BATTLE_TEST("Eject Pack will miss timing to switch out user if Emergency } SCENE { ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); - MESSAGE("Wobbuffet is switched out with the Eject Pack!"); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet is switched out with the Eject Pack!"); + } ABILITY_POPUP(opponent, ABILITY_EMERGENCY_EXIT); } THEN { EXPECT(player->species == SPECIES_WOBBUFFET); - EXPECT(player->item == ITEM_NONE); EXPECT(opponent->species == SPECIES_WYNAUT); } }