isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
50 lines • 2.56 kB
TypeScript
import type { CollectibleType, TrinketType } from "isaac-typescript-definitions";
import { ItemPoolType } from "isaac-typescript-definitions";
/**
* Helper function to get the collectibles that are in a particular item pool at the beginning of a
* vanilla run.
*/
export declare function getDefaultCollectibleTypesInItemPool(itemPoolType: ItemPoolType): ReadonlySet<CollectibleType>;
/**
* 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.
*/
export declare function getDefaultItemPoolsForCollectibleType(collectibleType: CollectibleType): readonly ItemPoolType[];
/**
* Helper function to get the name for an item pool type as it appears in the "itempools.xml" file.
*/
export declare function getItemPoolName(itemPoolType: ItemPoolType): string;
/**
* 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.
*
* @param seedOrRNG 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.
*/
export declare function getRandomItemPool(seedOrRNG: Seed | RNG | undefined): ItemPoolType;
/**
* Helper function to check if a particular collectibles is in a particular item pool at the
* beginning of a vanilla run.
*/
export declare function isCollectibleTypeInDefaultItemPool(collectibleType: CollectibleType, itemPoolType: ItemPoolType): boolean;
/**
* 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.
*/
export declare function removeCollectibleFromPools(...collectibleTypes: readonly CollectibleType[]): 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.
*/
export declare function removeTrinketFromPools(...trinketTypes: readonly TrinketType[]): void;
//# sourceMappingURL=itemPool.d.ts.map