UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

31 lines 1.62 kB
/** * Uses the player's current health and other miscellaneous things to determine if incoming damage * will be fatal. */ export declare function isDamageToPlayerFatal(player: EntityPlayer, amount: int, source: EntityRef, lastDamageGameFrame: int | undefined): 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` */ export declare function willMysteriousPaperRevive(player: EntityPlayer): boolean; /** * The `EntityPlayer.WillPlayerRevive` method does not properly account for Mysterious Paper, so use * this helper function instead for more robust revival detection. */ export declare function willPlayerRevive(player: EntityPlayer): 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. */ export declare function willReviveFromHeartbreak(player: EntityPlayer): boolean; /** * Helper function to determine if the Spirit Shackles item is in an enabled state. (It can be * either enabled or disabled.) */ export declare function willReviveFromSpiritShackles(player: EntityPlayer): boolean; //# sourceMappingURL=revive.d.ts.map