Skip to content

Pocket Items

getActivePocketItemSlot(player): PocketItemSlot | undefined

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:18

Helper function to get the PocketItemSlot that the player’s pocket active collectible item is in, if any. Returns undefined if the player does not have a pocket active item.

EntityPlayer

PocketItemSlot | undefined


getFirstCard(player): PocketItemDescription | undefined

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:32

Helper item to get the first card that a player is holding in their pocket item slots.

EntityPlayer

PocketItemDescription | undefined


getFirstCardOrPill(player): PocketItemDescription | undefined

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:44

Helper item to get the first card or pill that a player is holding in their pocket item slots.

EntityPlayer

PocketItemDescription | undefined


getFirstPill(player): PocketItemDescription | undefined

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:56

Helper item to get the first pill that a player is holding in their pocket item slots.

EntityPlayer

PocketItemDescription | undefined


getPocketItems(player): readonly PocketItemDescription[]

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:75

Use this helper function as a workaround for the EntityPlayer.GetPocketItem method not working correctly.

Note that due to API limitations, there is no way to determine the location of a Dice Bag trinket dice. Furthermore, when the player has a Dice Bag trinket dice and a pocket active at the same time, there is no way to determine the location of the pocket active item. If this function cannot determine the identity of a particular slot, it will mark the type of the slot as PocketItemType.UNDETERMINABLE.

EntityPlayer

readonly PocketItemDescription[]


hasOpenPocketItemSlot(player): boolean

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:149

Returns whether the player can hold an additional pocket item, beyond what they are currently carrying. This takes into account items that modify the max number of pocket items, like Starter Deck.

If the player is the Tainted Soul, this always returns false, since that character cannot pick up items. (Only Tainted Forgotten can pick up items.)

EntityPlayer

boolean


isFirstSlotPocketActiveItem(player): boolean

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:164

Helper function to determine whether the player’s “active” pocket item slot is set to their pocket active item.

EntityPlayer

boolean


pocketItemsEquals(pocketItems1, pocketItems2): boolean

Defined in: packages/isaacscript-common/src/functions/pocketItems.ts:175

Helper function to see if two sets of pocket item descriptions are identical.

readonly PocketItemDescription[]

readonly PocketItemDescription[]

boolean