Reverts wrongly done partial Eject Pack fix (#5928)
This commit is contained in:
parent
92c0039a23
commit
b7e945fbfb
4 changed files with 6 additions and 19 deletions
|
@ -9634,13 +9634,6 @@ BattleScript_EjectPackActivates::
|
||||||
jumpifcantswitch BS_SCRIPTING, BattleScript_EjectButtonEnd
|
jumpifcantswitch BS_SCRIPTING, BattleScript_EjectButtonEnd
|
||||||
goto BattleScript_EjectPackActivate_Ret
|
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::
|
BattleScript_DarkTypePreventsPrankster::
|
||||||
attackstring
|
attackstring
|
||||||
ppreduce
|
ppreduce
|
||||||
|
|
|
@ -421,7 +421,6 @@ extern const u8 BattleScript_EjectButtonActivates[];
|
||||||
extern const u8 BattleScript_EjectPackActivate_Ret[];
|
extern const u8 BattleScript_EjectPackActivate_Ret[];
|
||||||
extern const u8 BattleScript_EjectPackActivate_End2[];
|
extern const u8 BattleScript_EjectPackActivate_End2[];
|
||||||
extern const u8 BattleScript_EjectPackActivates[];
|
extern const u8 BattleScript_EjectPackActivates[];
|
||||||
extern const u8 BattleScript_EjectPackMissesTiming[];
|
|
||||||
extern const u8 BattleScript_MentalHerbCureRet[];
|
extern const u8 BattleScript_MentalHerbCureRet[];
|
||||||
extern const u8 BattleScript_MentalHerbCureEnd2[];
|
extern const u8 BattleScript_MentalHerbCureEnd2[];
|
||||||
extern const u8 BattleScript_TerrainPreventsEnd2[];
|
extern const u8 BattleScript_TerrainPreventsEnd2[];
|
||||||
|
|
|
@ -6471,19 +6471,13 @@ static void Cmd_moveend(void)
|
||||||
}
|
}
|
||||||
else // Eject Pack
|
else // Eject Pack
|
||||||
{
|
{
|
||||||
if (gBattleResources->flags->flags[gBattlerTarget] & RESOURCE_FLAG_EMERGENCY_EXIT)
|
if (!(gBattleResources->flags->flags[gBattlerTarget] & RESOURCE_FLAG_EMERGENCY_EXIT))
|
||||||
{
|
|
||||||
gBattlescriptCurrInstr = BattleScript_EjectPackMissesTiming;
|
|
||||||
gProtectStructs[battler].statFell = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = BattleScript_EjectPackActivates;
|
gBattlescriptCurrInstr = BattleScript_EjectPackActivates;
|
||||||
AI_DATA->ejectPackSwitch = TRUE;
|
AI_DATA->ejectPackSwitch = TRUE;
|
||||||
// Are these 2 lines below needed?
|
|
||||||
gProtectStructs[battler].statFell = FALSE;
|
|
||||||
gSpecialStatuses[gBattlerAttacker].preventLifeOrbDamage = TRUE;
|
gSpecialStatuses[gBattlerAttacker].preventLifeOrbDamage = TRUE;
|
||||||
}
|
}
|
||||||
|
gProtectStructs[battler].statFell = FALSE;
|
||||||
}
|
}
|
||||||
break; // Only the fastest Eject item activates
|
break; // Only the fastest Eject item activates
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,12 +76,13 @@ SINGLE_BATTLE_TEST("Eject Pack will miss timing to switch out user if Emergency
|
||||||
} SCENE {
|
} SCENE {
|
||||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT, player);
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT, player);
|
||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
NONE_OF {
|
||||||
MESSAGE("Wobbuffet is switched out with the Eject Pack!");
|
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);
|
ABILITY_POPUP(opponent, ABILITY_EMERGENCY_EXIT);
|
||||||
} THEN {
|
} THEN {
|
||||||
EXPECT(player->species == SPECIES_WOBBUFFET);
|
EXPECT(player->species == SPECIES_WOBBUFFET);
|
||||||
EXPECT(player->item == ITEM_NONE);
|
|
||||||
EXPECT(opponent->species == SPECIES_WYNAUT);
|
EXPECT(opponent->species == SPECIES_WYNAUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue