Revive
Functions
isDamageToPlayerFatal
▸ isDamageToPlayerFatal(player
, amount
, source
, lastDamageGameFrame
): boolean
Uses the player's current health and other miscellaneous things to determine if incoming damage will be fatal.
Parameters
Name | Type |
---|---|
player | EntityPlayer |
amount | int |
source | EntityRef |
lastDamageGameFrame | undefined | int |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/revive.ts:25
willMysteriousPaperRevive
▸ willMysteriousPaperRevive(player
): boolean
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
Name | Type |
---|---|
player | EntityPlayer |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/revive.ts:126
willPlayerRevive
▸ willPlayerRevive(player
): boolean
The EntityPlayer.WillPlayerRevive
method does not properly account for Mysterious Paper, so use
this helper function instead for more robust revival detection.
Parameters
Name | Type |
---|---|
player | EntityPlayer |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/revive.ts:151
willReviveFromHeartbreak
▸ willReviveFromHeartbreak(player
): boolean
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
Name | Type |
---|---|
player | EntityPlayer |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/revive.ts:171
willReviveFromSpiritShackles
▸ willReviveFromSpiritShackles(player
): boolean
Helper function to determine if the Spirit Shackles item is in an enabled state. (It can be either enabled or disabled.)
Parameters
Name | Type |
---|---|
player | EntityPlayer |
Returns
boolean