diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 1de63ad16..4d60a0ac6 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -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 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 19f87d363..be19be263 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -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 diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 17e02a50c..da3f43225 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -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 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 372971676..f0ae80fd1 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -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;