Skip to main content

Pickups Specific

Functions

getBatteries

getBatteries(batterySubType?): readonly EntityPickupBattery[]

Helper function to get all of the battery entities in the room.

Parameters

NameTypeDefault valueDescription
batterySubType-1 | BatterySubType-1Optional. If specified, will only get the batteries that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupBattery[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:24


getBombPickups

getBombPickups(bombSubType?): readonly EntityPickupBomb[]

Helper function to get all of the bomb entities in the room. (Specifically, this refers to bomb pickups, not the EntityBomb class.)

Parameters

NameTypeDefault valueDescription
bombSubType-1 | BombSubType-1Optional. If specified, will only get the bombs that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupBomb[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:40


getCards

getCards(cardType?): readonly EntityPickupCard[]

Helper function to get all of the card entities in the room.

Parameters

NameTypeDefault valueDescription
cardTypeCardType | -1-1Optional. If specified, will only get the cards that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupCard[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:52


getChests

getChests(subType?): readonly EntityPickup[]

Helper function to get all of the chest entities in the room. Specifically, this is all of the pickups with a variant in the CHEST_PICKUP_VARIANTS constant.

Parameters

NameTypeDefault valueDescription
subTypenumber-1Optional. If specified, will only get the chests that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickup[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:65


getCoins

getCoins(coinSubType?): readonly EntityPickupCoin[]

Helper function to get all of the coin pickup entities in the room.

Parameters

NameTypeDefault valueDescription
coinSubType-1 | CoinSubType-1Optional. If specified, will only get the coins that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupCoin[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:82


getCollectibles

getCollectibles(collectibleType?): readonly EntityPickupCollectible[]

Helper function to get all of the collectible entities in the room.

Parameters

NameTypeDefault valueDescription
collectibleTypeCollectibleType | -1-1Optional. If specified, will only get the collectibles that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupCollectible[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:94


getHearts

getHearts(heartSubType?): readonly EntityPickupHeart[]

Helper function to get all of the heart pickup entities in the room.

Parameters

NameTypeDefault valueDescription
heartSubType-1 | HeartSubType-1Optional. If specified, will only get the hearts that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupHeart[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:109


getKeys

getKeys(keySubType?): readonly EntityPickupKey[]

Helper function to get all of the key pickup entities in the room.

Parameters

NameTypeDefault valueDescription
keySubType-1 | KeySubType-1Optional. If specified, will only get the keys that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupKey[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:121


getPills

getPills(pillColor?): readonly EntityPickupPill[]

Helper function to get all of the pill entities in the room.

Parameters

NameTypeDefault valueDescription
pillColorPillColor | -1-1Optional. If specified, will only get the pills that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupPill[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:133


getSacks

getSacks(sackSubType?): readonly EntityPickupSack[]

Helper function to get all of the sack (i.e. grab bag) entities in the room.

Parameters

NameTypeDefault valueDescription
sackSubType-1 | SackSubType-1Optional. If specified, will only get the sacks that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupSack[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:145


getTrinkets

getTrinkets(trinketType?): readonly EntityPickupTrinket[]

Helper function to get all of the trinket entities in the room.

Parameters

NameTypeDefault valueDescription
trinketTypeTrinketType | -1-1Optional. If specified, will only get the trinkets that match the sub-type. Default is -1, which matches every sub-type.

Returns

readonly EntityPickupTrinket[]

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:157


removeAllBatteries

removeAllBatteries(batterySubType?, cap?): readonly EntityPickupBattery[]

Helper function to remove all of the batteries in the room.

Parameters

NameTypeDefault valueDescription
batterySubType-1 | BatterySubType-1Optional. If specified, will only remove the batteries that match this sub-type. Default is -1, which matches every sub-type.
cap?intundefinedOptional. If specified, will only remove the given amount of cards.

Returns

readonly EntityPickupBattery[]

The batteries that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:174


removeAllBombPickups

removeAllBombPickups(bombSubType?, cap?): readonly EntityPickupBomb[]

Helper function to remove all of the bomb pickups in the room. (Specifically, this refers to bomb pickups, not the EntityBomb class.)

Parameters

NameTypeDefault valueDescription
bombSubType-1 | BombSubType-1Optional. If specified, will only remove bombs that match this sub-type. Default is -1, which matches every sub-type.
cap?intundefinedOptional. If specified, will only remove the given amount of bombs.

Returns

readonly EntityPickupBomb[]

The bombs that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:194


removeAllCards

removeAllCards(cardType?, cap?): readonly EntityPickupCard[]

Helper function to remove all of the cards in the room.

Parameters

NameTypeDefault valueDescription
cardTypeCardType | -1-1Optional. If specified, will only remove cards that match this sub-type. Default is -1, which matches every sub-type.
cap?intundefinedOptional. If specified, will only remove the given amount of cards.

Returns

readonly EntityPickupCard[]

The cards that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:213


removeAllChests

removeAllChests(subType?, cap?): readonly EntityPickup[]

Helper function to remove all of the chests in the room. Specifically, this is all of the pickups with a variant in the CHEST_PICKUP_VARIANTS constant.

Parameters

NameTypeDefault valueDescription
subTypenumber-1Optional. If specified, will only remove chests that match this sub-type. Default is -1, which matches every sub-type.
cap?intundefinedOptional. If specified, will only remove the given amount of chests.

Returns

readonly EntityPickup[]

The chests that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:233


removeAllCoins

removeAllCoins(coinSubType?, cap?): readonly EntityPickupCoin[]

Helper function to remove all of the coins in the room.

Parameters

NameTypeDescription
coinSubType?CoinSubTypeOptional. If specified, will only remove coins that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of coins.

Returns

readonly EntityPickupCoin[]

The coins that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:249


removeAllCollectibles

removeAllCollectibles(collectibleType?, cap?): readonly EntityPickupCollectible[]

Helper function to remove all of the collectibles in the room.

Parameters

NameTypeDescription
collectibleType?CollectibleTypeOptional. If specified, will only remove collectibles that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of collectibles.

Returns

readonly EntityPickupCollectible[]

The collectibles that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:268


removeAllHearts

removeAllHearts(heartSubType?, cap?): readonly EntityPickupHeart[]

Helper function to remove all of the heart pickup entities in the room.

Parameters

NameTypeDescription
heartSubType?HeartSubTypeOptional. If specified, will only remove hearts that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of hearts.

Returns

readonly EntityPickupHeart[]

The hearts that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:287


removeAllKeys

removeAllKeys(keySubType?, cap?): readonly EntityPickupKey[]

Helper function to remove all of the keys in the room.

Parameters

NameTypeDescription
keySubType?KeySubTypeOptional. If specified, will only remove keys that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of keys.

Returns

readonly EntityPickupKey[]

The keys that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:306


removeAllPills

removeAllPills(pillColor?, cap?): readonly EntityPickupPill[]

Helper function to remove all of the pills in the room.

Parameters

NameTypeDescription
pillColor?PillColorOptional. If specified, will only remove pills that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of pills.

Returns

readonly EntityPickupPill[]

The pills that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:325


removeAllSacks

removeAllSacks(sackSubType?, cap?): readonly EntityPickupSack[]

Helper function to remove all of the sacks (i.e. grab bags) in the room.

Parameters

NameTypeDescription
sackSubType?SackSubTypeOptional. If specified, will only remove sacks that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of sacks.

Returns

readonly EntityPickupSack[]

The sacks that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:344


removeAllTrinkets

removeAllTrinkets(trinketType?, cap?): readonly EntityPickupTrinket[]

Helper function to remove all of the trinkets in the room.

Parameters

NameTypeDescription
trinketType?TrinketTypeOptional. If specified, will only remove trinkets that match this sub-type. Default is -1, which matches every sub-type.
cap?intOptional. If specified, will only remove the given amount of trinkets.

Returns

readonly EntityPickupTrinket[]

The trinkets that were removed.

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:363


spawnBattery

spawnBattery(batterySubType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupBattery

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.LIL_BATTERY (90).

Parameters

NameTypeDefault value
batterySubTypeBatterySubTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupBattery

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:377


spawnBatteryWithSeed

spawnBatteryWithSeed(batterySubType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupBattery

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.LIL_BATTERY (90) and a specific seed.

Parameters

NameTypeDefault value
batterySubTypeBatterySubTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupBattery

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:398


spawnBombPickup

spawnBombPickup(bombSubType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupBomb

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.BOMB (40).

Parameters

NameTypeDefault value
bombSubTypeBombSubTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupBomb

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:415


spawnBombPickupWithSeed

spawnBombPickupWithSeed(bombSubType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupBomb

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.BOMB (40) and a specific seed.

Parameters

NameTypeDefault value
bombSubTypeBombSubTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupBomb

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:436


spawnCard

spawnCard(cardType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupCard

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.CARD (300).

Parameters

NameTypeDefault value
cardTypeCardTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupCard

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:453


spawnCardWithSeed

spawnCardWithSeed(cardType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupCard

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.CARD (300) and a specific seed.

Parameters

NameTypeDefault value
cardTypeCardTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupCard

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:474


spawnCoin

spawnCoin(coinSubType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupCoin

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.COIN (20).

Parameters

NameTypeDefault value
coinSubTypeCoinSubTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupCoin

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:485


spawnCoinWithSeed

spawnCoinWithSeed(coinSubType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupCoin

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.COIN (20) and a specific seed.

Parameters

NameTypeDefault value
coinSubTypeCoinSubTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupCoin

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:506


spawnHeart

spawnHeart(heartSubType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupHeart

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.HEART (10).

Parameters

NameTypeDefault value
heartSubTypeHeartSubTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupHeart

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:523


spawnHeartWithSeed

spawnHeartWithSeed(heartSubType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupHeart

Parameters

NameTypeDefault value
heartSubTypeHeartSubTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupHeart

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:540


spawnKey

spawnKey(keySubType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupKey

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.KEY (30).

Parameters

NameTypeDefault value
keySubTypeKeySubTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupKey

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:557


spawnKeyWithSeed

spawnKeyWithSeed(keySubType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupKey

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.KEY (30) and a specific seed.

Parameters

NameTypeDefault value
keySubTypeKeySubTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupKey

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:578


spawnPill

spawnPill(pillColor, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupPill

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.PILL (70).

Parameters

NameTypeDefault value
pillColorPillColorundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupPill

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:595


spawnPillWithSeed

spawnPillWithSeed(pillColor, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupPill

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.PILL (70) and a specific seed.

Parameters

NameTypeDefault value
pillColorPillColorundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupPill

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:616


spawnSack

spawnSack(sackSubType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupSack

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.SACK (69).

Parameters

NameTypeDefault value
sackSubTypeSackSubTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupSack

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:633


spawnSackWithSeed

spawnSackWithSeed(sackSubType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupSack

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.SACK (69) and a specific seed.

Parameters

NameTypeDefault value
sackSubTypeSackSubTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupSack

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:654


spawnTrinket

spawnTrinket(trinketType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickupTrinket

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.TRINKET (350).

Parameters

NameTypeDefault value
trinketTypeTrinketTypeundefined
positionOrGridIndexint | Vectorundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined
seedOrRNGundefined | RNG | Seedundefined

Returns

EntityPickupTrinket

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:673


spawnTrinketWithSeed

spawnTrinketWithSeed(trinketType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickupTrinket

Helper function to spawn a EntityType.PICKUP (5) with variant PickupVariant.TRINKET (350) and a specific seed.

Parameters

NameTypeDefault value
trinketTypeTrinketTypeundefined
positionOrGridIndexint | Vectorundefined
seedOrRNGRNG | Seedundefined
velocityVectorVectorZero
spawnerundefined | Entityundefined

Returns

EntityPickupTrinket

Defined in

packages/isaacscript-common/src/functions/pickupsSpecific.ts:694