eject packer invisible before openpartymenu

This commit is contained in:
Evan 2021-01-08 08:02:00 -07:00
parent 6dabff1ee3
commit b5128be68b
4 changed files with 12 additions and 0 deletions

View File

@ -1765,6 +1765,10 @@
.4byte \ptr
.endm
.macro makeinvisible battler:req
various \battler, VARIOUS_MAKE_INVISIBLE
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7

View File

@ -7895,6 +7895,7 @@ BattleScript_EjectButtonActivates::
printstring STRINGID_EJECTBUTTONACTIVATE
waitmessage 0x40
removeitem BS_SCRIPTING
makeinvisible BS_SCRIPTING
openpartyscreen BS_SCRIPTING, BattleScript_EjectButtonEnd
switchoutabilities BS_SCRIPTING
waitstate

View File

@ -169,6 +169,7 @@
#define VARIOUS_JUMP_IF_ABSENT 101
#define VARIOUS_DESTROY_ABILITY_POPUP 102
#define VARIOUS_TERRAIN_SEED 103
#define VARIOUS_MAKE_INVISIBLE 104
// Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0

View File

@ -8427,6 +8427,12 @@ static void Cmd_various(void)
}
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
return;
case VARIOUS_MAKE_INVISIBLE:
if (gBattleControllerExecFlags)
break;
BtlController_EmitSpriteInvisibility(0, TRUE);
MarkBattlerForControllerExec(gActiveBattler);
break;
}
gBattlescriptCurrInstr += 3;