📚
Library of Isaac
  • Library of Isaac
  • Get Started
  • F.A.Q.
  • Custom Enums
    • AmbushType
    • AngelVariant
    • BabyLongLegsVariant
    • BabyVariant
    • BeastVariant
    • BegottenVariant
    • BigBonyVariant
    • BigHornVariant
    • BloodClotSubType
    • BloodExplosionSubType
    • BloodPuppyVariant
    • BlueFlySubType
    • BoilVariant
    • BonyVariant
    • BoomFlyVariant
    • BossID
    • CallbackOptionalArgType
    • CallbackReturnMode
    • CanaryVariant
    • Charger2Variant
    • ChargerSubType
    • ChargerVariant
    • ChimeraVariant
    • ChubVariant
    • ClottyVariant
    • ClutchVariant
    • ConjoinedFattyVariant
    • ConstantStoneShooterSubType
    • ConstantStoneShooterVariant
    • ConversionHeartSubType
    • CopyableIsaacAPIClassType
    • CrawlSpaceVariant
    • CrazyLongLegsVariant
    • CultistVariant
    • CustomCallback
    • CustomReviveType
    • DaddyLongLegsVariant
    • DannyVariant
    • DarkEsauVariant
    • DeathsHeadVariant
    • DeathVariant
    • DebugMode
    • DiceFloorSubType
    • Dimension
    • DingleVariant
    • DipFamiliarSubType
    • DipVariant
    • DogmaVariant
    • DopleVariant
    • DukeVariant
    • DumpVariant
    • EnvyVariant
    • EvisVariant
    • ExorcistVariant
    • EyeVariant
    • FacelessVariant
    • FallenVariant
    • FattyVariant
    • FireplaceVariant
    • FistulaVariant
    • FlyBombVariant
    • Gaper2Variant
    • GaperVariant
    • GeminiVariant
    • GenericPropVariant
    • GibSubType
    • GlobinVariant
    • GluttonyVariant
    • GoatVariant
    • GreedVariant
    • GridEntityXMLType
    • GrimaceVariant
    • GrubVariant
    • GurgleVariant
    • GurglingVariant
    • GusherVariant
    • GutsVariant
    • GuttedFattyVariant
    • GyroVariant
    • HauntVariant
    • HealthType
    • HeartVariant
    • HeavenLightDoorSubType
    • HiveVariant
    • HomunculusVariant
    • HopperVariant
    • HostVariant
    • InventoryType
    • IsaacVariant
    • ItemConfigTag
    • KnifeVariant
    • KnightVariant
    • LambVariant
    • LarryJrVariant
    • LeaperVariant
    • LeechVariant
    • LeperVariant
    • LittleHornVariant
    • LockState
    • LokiVariant
    • LustVariant
    • MamaGurdyVariant
    • MaskVariant
    • MawVariant
    • MegaSatanVariant
    • MembrainVariant
    • MoleVariant
    • MomsHeartVariant
    • MomVariant
    • Monstro2Variant
    • MotherSubType
    • MotherVariant
    • MoveableTNTVariant
    • MrMawVariant
    • MrMineVariant
    • MulliganVariant
    • NeedleVariant
    • NerveEndingVariant
    • ParaBiteVariant
    • PeeperFattyVariant
    • PeepVariant
    • PickupNullSubType
    • PillEffectType
    • PinVariant
    • PitfallVariant
    • PitState
    • PitVariant
    • PokyVariant
    • PoltyVariant
    • PolycephalusVariant
    • PoofSubType
    • PoopEntityVariant
    • PoopGridEntityVariant
    • PoopState
    • PooterVariant
    • PortalVariant
    • PressurePlateVariant
    • PreyVariant
    • PrideVariant
    • ProjectilesMode
    • PurgatorySubType
    • RageCreepVariant
    • RaglichVariant
    • RaglingVariant
    • RagManVariant
    • RagMegaVariant
    • RevenantVariant
    • RockSpiderVariant
    • RockState
    • RockVariant
    • RotgutVariant
    • RoundWormVariant
    • SatanVariant
    • ScourgeVariant
    • SerializationBrand
    • SerializationType
    • ShockwaveSoundMode
    • ShopKeeperVariant
    • SingeVariant
    • SirenVariant
    • SkinnyVariant
    • SlothVariant
    • SlotVariant
    • SpiderWebState
    • SpittyVariant
    • SquirtVariant
    • StageID
    • StatueVariant
    • StoneyVariant
    • SubHorfVariant
    • SuckerVariant
    • SwingerVariant
    • TallLadderSubType
    • TNTState
    • TrapdoorVariant
    • TumorVariant
    • UltraCoinVariant
    • UltraGreedVariant
    • VariablePersistenceMode
    • VisageVariant
    • VisFattyVariant
    • VisVariant
    • WalkingBoilVariant
    • WallCreepVariant
    • WarVariant
    • WhipperVariant
    • WidowVariant
    • WrathVariant
  • CustomCallback
  • Modules
    • Ambush
    • Benchmark
    • BitSet128
    • Bombs
    • Bosses
    • Charge
    • Collectibles
    • Color
    • CustomItemPools
    • Debug
    • Dimensions
    • Direction
    • Doors
    • Effects
    • Entities
    • EntitySpecific
    • Familiars
    • GridEntities
    • GridIndexes
    • GridSpecific
    • Input
    • IsaacAPIClass
    • ItemPool
    • JSON
    • Log
    • Pause
    • Pickups
    • PickupSpecific
    • Pills
    • Players
    • Random
    • RNG
    • Rooms
    • RoomSpecific
    • Run
    • SaveManager
    • Serialize
    • ShockWaves
    • Sprites
    • Stage
    • Trinkets
    • UI
    • Utils
      • DeepCopy
      • Easings
      • Flags
      • Functions
      • Math
      • String
      • Tables
    • Vector
Powered by GitBook
On this page
  • Overview
  • Functions
  • AddSmeltedTrinket()
  • DoesAnyPlayerHasItem()
  • DoesAnyPlayerHasTrinket()
  • GetBlackHeartsNum()
  • GetCharacterDeathAnimationName()
  • GetCharacterMaxHeartContainers()
  • GetClosestPlayers()
  • GetHearts()
  • GetPlayerByIndex()
  • GetPlayerFromEntity()
  • GetPlayerHealthType()
  • GetPlayerIndex()
  • GetPlayerInventory()
  • GetPlayerMaxHeartContainers()
  • GetPlayerNumHitsRemaining()
  • GetPlayers()
  • GetPlayersByCollectible()
  • GetPlayersByTrinket()
  • GetPlayersOfType()
  • GetPlayersWithControllerIndex()
  • GetSmeltedTrinketMultiplier()
  • GetSoulHearts()
  • GetSubPlayerParent()
  • GiveTrinketsBack()
  • IsActiveTaintedLazForm()
  • IsBethany()
  • IsChildPlayer()
  • IsDamageToPlayerFatal()
  • IsJacobOrEsau()
  • IsKeeper()
  • IsTaintedLazarus()
  • IsTheLost()
  • PlayerHasCollectible()
  • RegisterCharacterHealthConversion()
  • RemoveCollectibleCostume()
  • TemporarilyRemoveTrinket()
  • TemporarilyRemoveTrinkets()
  • WillMysteriousPaperRevive()
  • WillPlayerRevive()
  • WillReviveFromHeartbreak()
  • WillReviveFromSpiritShackles()
  1. Modules

Players

Overview

Return Value
Function

void

boolean

boolean

integer

string

integer

integer

void

PlayerIndex

InventoryObject[]

void

integer

integer

integer

void

boolean

boolean

void

boolean

boolean

boolean

boolean

boolean

void

void

void

TrinketSituation?

TrinketSituation?

boolean

boolean

boolean

boolean

Functions

AddSmeltedTrinket()

Gives the player an smelted trinket without changing the player's current held trinkets.

DoesAnyPlayerHasItem()

Returns true if at least one player has the given item.

DoesAnyPlayerHasTrinket()

Returns true if at least one player has the given trinket.

GetBlackHeartsNum()

Returns the number of black hearts that the player has, excluding any soul hearts. For example, if the player has one full black heart, one full soul heart, and one half black heart, this function returns 3. This is different from the EntityPlayer.GetBlackHearts method, since that returns a bitmask.

GetCharacterDeathAnimationName()

Helper function to determine which death animation a character will play - Most characters have a 56 frame death animation (i.e. the "Death" animation). - The Lost and Tainted Lost have a 38 frame death animation (i.e. the "LostDeath" animation). - Tainted Forgotten has a 20 frame death animation (i.e. the "ForgottenDeath" animation).

GetCharacterMaxHeartContainers()

Returns the maximum heart containers that the provided character can have. Normally, this is 12, but with Keeper it is 3, and with Tainted Keeper it is 2. This does not account for Birthright or Mother's Kiss; use the GetPlayerMaxHeartContainers helper function for that.

GetClosestPlayers()

Returns the n closest players to a certain point. The players are ordered by their distance.

GetHearts()

Returns the number of red hearts that the player has, excluding any rotten hearts. For example, if the player has one full black heart, one full soul heart, and one half black heart, this function returns 3. This is different from the EntityPlayer.GetHearts method, since that returns a value that includes rotten hearts.

GetPlayerByIndex()

Returns a player given its index.

GetPlayerFromEntity()

Helper function to get the player from a tear, laser, bomb, etc. Returns nil if the entity does not correspond to any particular player. This function works by looking at the Parent and the SpawnerEntity fields (in that order). As a last resort, it will attempt to use the Entity.ToPlayer method on the entity itself.

GetPlayerHealthType()

Helper function to get the amount of a given health type a player has.

GetPlayerIndex()

@class PlayerIndex : integer Returns a given player's index. Useful for storing unique data per player.

GetPlayerInventory()

@class InventoryObject @field Type InventoryType @field Id CollectibleType | TrinketType Returns a list of all the items/gulped trinkets (things that appear on the extra HUD) ordered by the time they were collected. This method is not perfect and will fail if the player rerolls all of their items or a mod gives several items in the same frame.

GetPlayerMaxHeartContainers()

Helper function to get the max amount of heart containers a player can have.

GetPlayerNumHitsRemaining()

Returns the combined value of all of the player's red hearts, soul/black hearts, and bone hearts, minus the value of the player's rotten hearts. This is equivalent to the number of hits that the player can currently take, but does not take into account double damage from champion enemies and/or being on later floors. (For example, on Womb 1, players who have 1 soul heart remaining would die in 1 hit to anything, even though this function would report that they have 2 hits remaining.)

GetPlayers()

Returns a list of all players.

GetPlayersByCollectible()

Returns a list of all players that have a certain item

GetPlayersByTrinket()

Returns all the players that have a certain trinket

GetPlayersOfType()

Returns all the players of a given type.

GetPlayersWithControllerIndex()

Returns all the players corresponding to a controller index.

GetSmeltedTrinketMultiplier()

Returns the number of trinkets a player has smelted. Won't count the trinkets they're currently holding.

GetSoulHearts()

Returns the number of soul hearts that the player has, excluding any black hearts. For example, if the player has one full black heart, one full soul heart, and one half black heart, this function returns 2. This is different from the EntityPlayer.GetSoulHearts method, since that returns the combined number of soul hearts and black hearts.

GetSubPlayerParent()

Helper function to get the parent of a given sub player.

GiveTrinketsBack()

Helper function to restore the player's trinkets back to the way they were before the temporarilyRemoveTrinket function was used. It will re-smelt any smelted trinkets that were removed.

IsActiveTaintedLazForm()

Returns wether the given form of tainted lazarus is the active one. If the given player is not tainted lazarus, it'll always return false. Accounts for when the player has Birthright.

IsBethany()

Helper function to check if a player is Bethany or T.Bethany.

IsChildPlayer()

Helper function to detect if a player is a "child player", meaning they have a defined Parent field (i.e. Strawman players)

IsDamageToPlayerFatal()

Uses the player's current health and other miscellaneous things to determine if incoming damage will be fatal.

IsJacobOrEsau()

Helper function to check if a player is either Jacob or Esau. Note that this will only be true for the non tainted versions.

IsKeeper()

Helper function to check if a player is either Keeper of T.Keeper.

IsTaintedLazarus()

Helper function to check if a player is any form of Tainted Lazarus.

IsTheLost()

Helper function to check if a player is The Lost or T.The Lost.

PlayerHasCollectible()

Returns true if the player has one or more of the provided collectibles This function is variadic, meaning that you can specify as many collectible types that you want to check for.

RegisterCharacterHealthConversion()

Causes the provided player type to have their health be converted to the provided heart sub-type. This is the same mechanic that certain characters use for converting health, such as Blue Baby having red heart containers being converted into soul hearts.

RemoveCollectibleCostume()

Removes a costume from the provided player.

TemporarilyRemoveTrinket()

@class TrinketSituation @field TrinketTypeRemoved TrinketType @field TrinketType1 TrinketType @field TrinketType2 TrinketType @field NumSmeltedTrinkets integer Helper function to temporarily remove a specific kind of trinket from the player. Use this in combination with the giveTrinketsBack function to take away and give back a trinket on the same frame. This function correctly handles multiple trinket slots and ensures that all copies of the trinket are removed, including smelted trinkets. Note that one smelted golden trinket is the same as two smelted normal trinkets.

TemporarilyRemoveTrinkets()

Helper function to temporarily removes a player's held trinkets, if any. This will not remove any smelted trinkets. Use this in combination with the giveTrinketsBack function to take away and give back trinkets on the same frame.

WillMysteriousPaperRevive()

Assuming that we are on the frame of fatal damage, this function returns whether or not 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

WillPlayerRevive()

The EntityPlayer.WillPlayerRevive method does not properly account for Mysterious Paper, so use this helper function instead for more robust revival detection.

WillReviveFromHeartbreak()

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.

WillReviveFromSpiritShackles()

Helper function to determine if the Spirit Shackles item is in an enabled state. (It can be either enabled or disabled.)

PreviousPillsNextRandom

Last updated 1 year ago

( player, trinketId)

( collectibleId, boolean? ignoreModifiers = false)

( trinketId, boolean? ignoreModifiers = false)

( player)

( character)

( character)

[]

( center, integer? numberOfPlayers?)

( player)

?

(PlayerIndex playerIndex)

?

( entity)

( player, healthType)

( player, boolean? differentiateSoulAndForgotten?)

( player, ? inventoryTypeFilter?)

( player)

( player)

[]

(boolean? ignoreCoopBabies? = true)

[]

( collectibleId)

[]

( trinketId)

[]

( playerType)

[]

(integer controllerIndex)

( player, trinket)

( player)

?

( subPlayer)

( player, TrinketSituation? trinketSituation)

( player)

( player)

( player)

( player, number amount, source, integer? lastDamageGameFrame)

( player)

( player)

( player)

( player)

( player, ...)

( playerType, conversionHeartSubType)

( player, collectible)

( player, trinketType)

( player)

( player)

( player)

( player)

( player)

void AddSmeltedTrinket(player, trinketId)

boolean DoesAnyPlayerHasItem( collectibleId, boolean? ignoreModifiers = false)

boolean DoesAnyPlayerHasTrinket( trinketId, boolean? ignoreModifiers = false)

integer GetBlackHeartsNum( player)

string GetCharacterDeathAnimationName( character)

integer GetCharacterMaxHeartContainers( character)

[] GetClosestPlayers( center, integer? numberOfPlayers?)

integer GetHearts( player)

? GetPlayerByIndex(PlayerIndex playerIndex)

? GetPlayerFromEntity( entity)

void GetPlayerHealthType(player, healthType)

PlayerIndex GetPlayerIndex( player, boolean? differentiateSoulAndForgotten?)

InventoryObject[] GetPlayerInventory(player,? inventoryTypeFilter?)

void GetPlayerMaxHeartContainers( player)

integer GetPlayerNumHitsRemaining( player)

[] GetPlayers(boolean? ignoreCoopBabies? = true)

[] GetPlayersByCollectible( collectibleId)

[] GetPlayersByTrinket( trinketId)

[] GetPlayersOfType( playerType)

[] GetPlayersWithControllerIndex(integer controllerIndex)

integer GetSmeltedTrinketMultiplier(player, trinket)

integer GetSoulHearts( player)

? GetSubPlayerParent( subPlayer)

void GiveTrinketsBack( player, TrinketSituation? trinketSituation)

boolean IsActiveTaintedLazForm( player)

boolean IsBethany( player)

void IsChildPlayer( player)

boolean IsDamageToPlayerFatal(player, number amount, source, integer? lastDamageGameFrame)

boolean IsJacobOrEsau( player)

boolean IsKeeper( player)

boolean IsTaintedLazarus( player)

boolean IsTheLost( player)

void PlayerHasCollectible(player, ...)

void RegisterCharacterHealthConversion(playerType, conversionHeartSubType)

void RemoveCollectibleCostume(player, collectible)

TrinketSituation? TemporarilyRemoveTrinket(player, trinketType)

TrinketSituation? TemporarilyRemoveTrinkets( player)

boolean WillMysteriousPaperRevive( player)

boolean WillPlayerRevive( player)

boolean WillReviveFromHeartbreak( player)

boolean WillReviveFromSpiritShackles( player)

EntityPlayer
TrinketType
CollectibleType
TrinketType
EntityPlayer
PlayerType
PlayerType
EntityPlayer
Vector
EntityPlayer
EntityPlayer
EntityPlayer
Entity
EntityPlayer
HealthType
EntityPlayer
EntityPlayer
InventoryType
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
CollectibleType
EntityPlayer
TrinketType
EntityPlayer
PlayerType
EntityPlayer
EntityPlayer
TrinketType
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityRef
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
CollectibleType
PlayerType
ConversionHeartSubType
EntityPlayer
CollectibleType
EntityPlayer
TrinketType
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
EntityPlayer
TrinketType
AddSmeltedTrinket
CollectibleType
DoesAnyPlayerHasItem
TrinketType
DoesAnyPlayerHasTrinket
EntityPlayer
GetBlackHeartsNum
PlayerType
GetCharacterDeathAnimationName
PlayerType
GetCharacterMaxHeartContainers
Vector
GetClosestPlayers
EntityPlayer
GetHearts
GetPlayerByIndex
Entity
GetPlayerFromEntity
EntityPlayer
HealthType
GetPlayerHealthType
EntityPlayer
GetPlayerIndex
EntityPlayer
InventoryType
GetPlayerInventory
EntityPlayer
GetPlayerMaxHeartContainers
EntityPlayer
GetPlayerNumHitsRemaining
GetPlayers
CollectibleType
GetPlayersByCollectible
TrinketType
GetPlayersByTrinket
PlayerType
GetPlayersOfType
GetPlayersWithControllerIndex
EntityPlayer
TrinketType
GetSmeltedTrinketMultiplier
EntityPlayer
GetSoulHearts
EntityPlayer
GetSubPlayerParent
EntityPlayer
GiveTrinketsBack
EntityPlayer
IsActiveTaintedLazForm
EntityPlayer
IsBethany
EntityPlayer
IsChildPlayer
EntityPlayer
EntityRef
IsDamageToPlayerFatal
EntityPlayer
IsJacobOrEsau
EntityPlayer
IsKeeper
EntityPlayer
IsTaintedLazarus
EntityPlayer
IsTheLost
EntityPlayer
CollectibleType
PlayerHasCollectible
PlayerType
ConversionHeartSubType
RegisterCharacterHealthConversion
EntityPlayer
CollectibleType
RemoveCollectibleCostume
EntityPlayer
TrinketType
TemporarilyRemoveTrinket
EntityPlayer
TemporarilyRemoveTrinkets
EntityPlayer
WillMysteriousPaperRevive
EntityPlayer
WillPlayerRevive
EntityPlayer
WillReviveFromHeartbreak
EntityPlayer
WillReviveFromSpiritShackles