A_Invincibility is an action that makes the target player invincible for a short period of time and plays the invincibility music (
INVINC). In Mario mode,
MINVNC is played instead. If the target player is currently in Super form, the music will not be changed.
Code – A_Invincibility
// Function: A_Invincibility
// Description: Awards the player invincibility.
// var1 = unused
// var2 = unused
void A_Invincibility(mobj_t *actor)
if (LUA_CallAction("A_Invincibility", actor))
if (!actor->target || !actor->target->player)
CONS_Debug(DBG_GAMELOGIC, "Powerup has no target.\n");
player = actor->target->player;
player->powers[pw_invulnerability] = invulntics + 1;
if (P_IsLocalPlayer(player) && !player->powers[pw_super])
S_ChangeMusicInternal((mariomode) ? "minvnc" : "invinc", false);