Item Pool
Functions
getDefaultCollectibleTypesInItemPool
▸ getDefaultCollectibleTypesInItemPool(itemPoolType
): ReadonlySet
<CollectibleType
>
Helper function to get the collectibles that are in a particular item pool at the beginning of a vanilla run.
Parameters
Name | Type |
---|---|
itemPoolType | ItemPoolType |
Returns
ReadonlySet
<CollectibleType
>
Defined in
packages/isaacscript-common/src/functions/itemPool.ts:50
getDefaultItemPoolsForCollectibleType
▸ getDefaultItemPoolsForCollectibleType(collectibleType
): readonly ItemPoolType
[]
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
Name | Type |
---|---|
collectibleType | CollectibleType |
Returns
readonly ItemPoolType
[]
Defined in
packages/isaacscript-common/src/functions/itemPool.ts:63
getItemPoolName
▸ getItemPoolName(itemPoolType
): string
Helper function to get the name for an item pool type as it appears in the "itempools.xml" file.
Parameters
Name | Type |
---|---|
itemPoolType | ItemPoolType |
Returns
string
Defined in
packages/isaacscript-common/src/functions/itemPool.ts:86
getRandomItemPool
▸ getRandomItemPool(seedOrRNG
): ItemPoolType
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
Name | Type | Description |
---|---|---|
seedOrRNG | undefined | RNG | Seed | 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
ItemPoolType
Defined in
packages/isaacscript-common/src/functions/itemPool.ts:102
isCollectibleTypeInDefaultItemPool
▸ isCollectibleTypeInDefaultItemPool(collectibleType
, itemPoolType
): boolean
Helper function to check if a particular collectibles is in a particular item pool at the beginning of a vanilla run.
Parameters
Name | Type |
---|---|
collectibleType | CollectibleType |
itemPoolType | ItemPoolType |
Returns
boolean
Defined in
packages/isaacscript-common/src/functions/itemPool.ts:116
removeCollectibleFromPools
▸ removeCollectibleFromPools(...collectibleTypes
): void
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
Name | Type |
---|---|
...collectibleTypes | readonly CollectibleType [] |
Returns
void
Defined in
packages/isaacscript-common/src/functions/itemPool.ts:130
removeTrinketFromPools
▸ removeTrinketFromPools(...trinketTypes
): void
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
Name | Type |
---|---|
...trinketTypes | readonly TrinketType [] |
Returns
void