Revive
Functions
Section titled “Functions”isDamageToPlayerFatal()
Section titled “isDamageToPlayerFatal()”isDamageToPlayerFatal(
player,amount,source,lastDamageGameFrame):boolean
Defined in: packages/isaacscript-common/src/functions/revive.ts:25
Uses the player’s current health and other miscellaneous things to determine if incoming damage will be fatal.
Parameters
Section titled “Parameters”player
Section titled “player”EntityPlayer
amount
Section titled “amount”int
source
Section titled “source”EntityRef
lastDamageGameFrame
Section titled “lastDamageGameFrame”int | undefined
Returns
Section titled “Returns”boolean
willMysteriousPaperRevive()
Section titled “willMysteriousPaperRevive()”willMysteriousPaperRevive(
player):boolean
Defined in: packages/isaacscript-common/src/functions/revive.ts:123
Assuming that we are on the frame of fatal damage, this function returns whether Mysterious Paper would rotate to Missing Poster on the frame that the “Game Over” screen would appear (which would subsequently save the player from fatal damage).
Mysterious Paper rotates between the 4 items on every frame, in order. The formula for whether
Mysterious Paper be Missing Power is: gameFrameCount % 4 === 3
Parameters
Section titled “Parameters”player
Section titled “player”EntityPlayer
Returns
Section titled “Returns”boolean
willPlayerRevive()
Section titled “willPlayerRevive()”willPlayerRevive(
player):boolean
Defined in: packages/isaacscript-common/src/functions/revive.ts:148
The EntityPlayer.WillPlayerRevive method does not properly account for Mysterious Paper, so use
this helper function instead for more robust revival detection.
Parameters
Section titled “Parameters”player
Section titled “player”EntityPlayer
Returns
Section titled “Returns”boolean
willReviveFromHeartbreak()
Section titled “willReviveFromHeartbreak()”willReviveFromHeartbreak(
player):boolean
Defined in: packages/isaacscript-common/src/functions/revive.ts:168
Helper function to determine if the player will be revived by the Heartbreak collectible if they take fatal damage. This is contingent on the character that they are playing as and the amount of broken hearts that they already have.
Parameters
Section titled “Parameters”player
Section titled “player”EntityPlayer
Returns
Section titled “Returns”boolean
willReviveFromSpiritShackles()
Section titled “willReviveFromSpiritShackles()”willReviveFromSpiritShackles(
player):boolean
Defined in: packages/isaacscript-common/src/functions/revive.ts:186
Helper function to determine if the Spirit Shackles item is in an enabled state. (It can be either enabled or disabled.)
Parameters
Section titled “Parameters”player
Section titled “player”EntityPlayer
Returns
Section titled “Returns”boolean
