Item Pool
Functions
Section titled “Functions”getDefaultCollectibleTypesInItemPool()
Section titled “getDefaultCollectibleTypesInItemPool()”getDefaultCollectibleTypesInItemPool(
itemPoolType):ReadonlySet<CollectibleType>
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:50
Helper function to get the collectibles that are in a particular item pool at the beginning of a vanilla run.
Parameters
Section titled “Parameters”itemPoolType
Section titled “itemPoolType”ItemPoolType
Returns
Section titled “Returns”ReadonlySet<CollectibleType>
getDefaultItemPoolsForCollectibleType()
Section titled “getDefaultItemPoolsForCollectibleType()”getDefaultItemPoolsForCollectibleType(
collectibleType): readonlyItemPoolType[]
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:63
Helper function to get the item pools that a particular collectible starts in at the beginning of a vanilla run.
This function will automatically account for Greed Mode. In other words, it will not return the “normal” item pools when playing in Greed Mode.
Parameters
Section titled “Parameters”collectibleType
Section titled “collectibleType”CollectibleType
Returns
Section titled “Returns”readonly ItemPoolType[]
getItemPoolName()
Section titled “getItemPoolName()”getItemPoolName(
itemPoolType):string
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:86
Helper function to get the name for an item pool type as it appears in the “itempools.xml” file.
Parameters
Section titled “Parameters”itemPoolType
Section titled “itemPoolType”ItemPoolType
Returns
Section titled “Returns”string
getRandomItemPool()
Section titled “getRandomItemPool()”getRandomItemPool(
seedOrRNG):ItemPoolType
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:102
Helper function to get a random item pool. This is not as simple as getting a random value from
the ItemPoolType enum, since ItemPoolType.SHELL_GAME (7) is not a real item pool and the
Greed Mode item pools should be excluded if not playing in Greed Mode.
If you want to get an unseeded item pool, you must explicitly pass undefined to the seedOrRNG
parameter.
Parameters
Section titled “Parameters”seedOrRNG
Section titled “seedOrRNG”RNG | Seed | undefined
The Seed or RNG object to use. If an RNG object is provided, the
RNG.Next method will be called. If undefined is provided, it will default to
a random seed.
Returns
Section titled “Returns”ItemPoolType
isCollectibleTypeInDefaultItemPool()
Section titled “isCollectibleTypeInDefaultItemPool()”isCollectibleTypeInDefaultItemPool(
collectibleType,itemPoolType):boolean
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:116
Helper function to check if a particular collectibles is in a particular item pool at the beginning of a vanilla run.
Parameters
Section titled “Parameters”collectibleType
Section titled “collectibleType”CollectibleType
itemPoolType
Section titled “itemPoolType”ItemPoolType
Returns
Section titled “Returns”boolean
removeCollectibleFromPools()
Section titled “removeCollectibleFromPools()”removeCollectibleFromPools(…
collectibleTypes):void
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:130
Helper function to remove one or more collectibles from all item pools.
This function is variadic, meaning you can pass as many collectible types as you want to remove.
Parameters
Section titled “Parameters”collectibleTypes
Section titled “collectibleTypes”…readonly CollectibleType[]
Returns
Section titled “Returns”void
removeTrinketFromPools()
Section titled “removeTrinketFromPools()”removeTrinketFromPools(…
trinketTypes):void
Defined in: packages/isaacscript-common/src/functions/itemPool.ts:145
Helper function to remove one or more trinkets from all item pools.
This function is variadic, meaning you can pass as many trinket types as you want to remove.
Parameters
Section titled “Parameters”trinketTypes
Section titled “trinketTypes”…readonly TrinketType[]
Returns
Section titled “Returns”void
