isaacscript-common 39.6.0 → 41.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index.rollup.d.ts +376 -335
  2. package/dist/isaacscript-common.lua +430 -424
  3. package/dist/src/classes/features/other/FlyingDetection.lua +2 -2
  4. package/dist/src/classes/features/other/ItemPoolDetection.lua +2 -2
  5. package/dist/src/classes/features/other/ModdedElementDetection.d.ts +0 -86
  6. package/dist/src/classes/features/other/ModdedElementDetection.d.ts.map +1 -1
  7. package/dist/src/classes/features/other/ModdedElementDetection.lua +1 -57
  8. package/dist/src/classes/features/other/ModdedElementSets.d.ts +250 -210
  9. package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/ModdedElementSets.lua +285 -284
  11. package/dist/src/core/constants.d.ts +26 -2
  12. package/dist/src/core/constants.d.ts.map +1 -1
  13. package/dist/src/core/constants.lua +56 -1
  14. package/dist/src/core/constantsFirstLast.d.ts +5 -0
  15. package/dist/src/core/constantsFirstLast.d.ts.map +1 -1
  16. package/dist/src/core/constantsVanilla.d.ts +93 -0
  17. package/dist/src/core/constantsVanilla.d.ts.map +1 -0
  18. package/dist/src/core/constantsVanilla.lua +115 -0
  19. package/dist/src/core/upgradeMod.lua +3 -0
  20. package/dist/src/functions/cards.d.ts +0 -7
  21. package/dist/src/functions/cards.d.ts.map +1 -1
  22. package/dist/src/functions/cards.lua +0 -10
  23. package/dist/src/functions/characters.d.ts +1 -1
  24. package/dist/src/functions/characters.d.ts.map +1 -1
  25. package/dist/src/functions/characters.lua +6 -46
  26. package/dist/src/functions/collectibles.d.ts +0 -10
  27. package/dist/src/functions/collectibles.d.ts.map +1 -1
  28. package/dist/src/functions/collectibles.lua +0 -13
  29. package/dist/src/functions/dimensions.d.ts +0 -4
  30. package/dist/src/functions/dimensions.d.ts.map +1 -1
  31. package/dist/src/functions/dimensions.lua +2 -8
  32. package/dist/src/functions/pills.d.ts +0 -2
  33. package/dist/src/functions/pills.d.ts.map +1 -1
  34. package/dist/src/functions/pills.lua +0 -5
  35. package/dist/src/functions/rooms.lua +2 -2
  36. package/dist/src/functions/trinkets.d.ts +0 -9
  37. package/dist/src/functions/trinkets.d.ts.map +1 -1
  38. package/dist/src/functions/trinkets.lua +0 -12
  39. package/dist/src/index.d.ts +1 -0
  40. package/dist/src/index.d.ts.map +1 -1
  41. package/dist/src/index.lua +8 -0
  42. package/package.json +1 -1
  43. package/src/classes/features/other/FlyingDetection.ts +2 -2
  44. package/src/classes/features/other/ItemPoolDetection.ts +2 -2
  45. package/src/classes/features/other/ModdedElementDetection.ts +4 -156
  46. package/src/classes/features/other/ModdedElementSets.ts +552 -486
  47. package/src/core/constants.ts +69 -2
  48. package/src/core/constantsFirstLast.ts +5 -1
  49. package/src/core/constantsVanilla.ts +183 -0
  50. package/src/core/upgradeMod.ts +6 -1
  51. package/src/functions/cards.ts +1 -15
  52. package/src/functions/characters.ts +4 -47
  53. package/src/functions/collectibles.ts +1 -18
  54. package/src/functions/dimensions.ts +2 -10
  55. package/src/functions/pills.ts +0 -6
  56. package/src/functions/rooms.ts +3 -3
  57. package/src/functions/trinkets.ts +1 -17
  58. package/src/index.ts +1 -0
@@ -949,6 +949,12 @@ export declare function addTrinketCostume(player: EntityPlayer, trinketType: Tri
949
949
  export declare const ALL_DISPLAY_FLAGS: BitFlags<number & {
950
950
  readonly __bitFlagBrand: symbol;
951
951
  } & {
952
+ /**
953
+ * The combination of the following flags:
954
+ * - `DisplayFlag.VISIBLE` (1 << 0)
955
+ * - `DisplayFlag.SHADOW` (1 << 1)
956
+ * - `DisplayFlag.SHOW_ICON` (1 << 2)
957
+ */
952
958
  readonly __displayFlagBrand: symbol;
953
959
  }>;
954
960
 
@@ -3584,6 +3590,12 @@ export declare function deserializeVector(vector: SerializedVector): Vector;
3584
3590
  /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76). */
3585
3591
  export declare const DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75;
3586
3592
 
3593
+ /**
3594
+ * An array containing every valid `Dimension`, not including `Dimension.CURRENT`. (This is derived
3595
+ * from the `NUM_DIMENSIONS` constant.)
3596
+ */
3597
+ export declare const DIMENSIONS: readonly Dimension[];
3598
+
3587
3599
  /**
3588
3600
  * Helper function to convert a direction to degrees. For example, `Direction.LEFT` (0) would return
3589
3601
  * 180 and `Direction.RIGHT` (2) would return 0. (This corresponds to how the
@@ -4456,6 +4468,11 @@ declare class FlipDetection extends Feature {
4456
4468
  private readonly postUseItemFlip;
4457
4469
  }
4458
4470
 
4471
+ /**
4472
+ * An array containing every flying character. This includes non-main characters such as The Soul.
4473
+ */
4474
+ export declare const FLYING_CHARACTERS: readonly [PlayerType.AZAZEL, PlayerType.LOST, PlayerType.SOUL, PlayerType.LOST_B, PlayerType.JACOB_2_B, PlayerType.SOUL_B];
4475
+
4459
4476
  declare class FlyingDetection extends Feature {
4460
4477
  private readonly moddedElementSets;
4461
4478
  /**
@@ -4690,11 +4707,6 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
4690
4707
  */
4691
4708
  export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<string>;
4692
4709
 
4693
- /**
4694
- * Helper function to get an array with every valid `Dimension` (not including `Dimension.CURRENT`).
4695
- */
4696
- export declare function getAllDimensions(): Dimension[];
4697
-
4698
4710
  /**
4699
4711
  * Helper function to get every legal grid index for the current room.
4700
4712
  *
@@ -7505,38 +7517,6 @@ export declare function getUnusedDoorSlots(): DoorSlot[];
7505
7517
  */
7506
7518
  export declare function getUsableActiveItemSlots(player: EntityPlayer, collectibleType: CollectibleType): ActiveSlot[];
7507
7519
 
7508
- /**
7509
- * Helper function to get an array with every valid vanilla card sub-type.
7510
- *
7511
- * Note that unlike collectibles and trinkets, there are no gaps in the card types, so this is a
7512
- * simple range from the first card type to the last vanilla card type.
7513
- */
7514
- export declare function getVanillaCardTypes(): CardType[];
7515
-
7516
- /**
7517
- * Helper function to get an array that represents the range from the first collectible type to the
7518
- * last vanilla collectible type. This will include integers that do not represent any valid
7519
- * collectible types.
7520
- *
7521
- * This function is only useful when building collectible type objects. For most purposes, you
7522
- * should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
7523
- * instead (which are part of `ISCFeature.MODDED_ELEMENT_SETS`).
7524
- */
7525
- export declare function getVanillaCollectibleTypeRange(): CollectibleType[];
7526
-
7527
- /** Helper function to get an array with every vanilla pill effect. */
7528
- export declare function getVanillaPillEffects(): PillEffect[];
7529
-
7530
- /**
7531
- * Helper function to get an array that represents the range from the first trinket type to the last
7532
- * vanilla trinket type. This will include integers that do not represent any valid trinket types.
7533
- *
7534
- * This function is only useful when building collectible type objects. For most purposes, you
7535
- * should use the `getVanillaTrinketArray` or `getVanillaTrinketSet` helper functions instead (which
7536
- * are part of `ISCFeature.MODDED_ELEMENT_SETS`).
7537
- */
7538
- export declare function getVanillaTrinketTypeRange(): TrinketType[];
7539
-
7540
7520
  /**
7541
7521
  * Get how many hearts are currently being shown on the hearts UI.
7542
7522
  *
@@ -8700,7 +8680,7 @@ export declare function isFirstPlayer(player: EntityPlayer): boolean;
8700
8680
  */
8701
8681
  export declare function isFirstSlotPocketActiveItem(player: EntityPlayer): boolean;
8702
8682
 
8703
- export declare function isFlyingCharacter(player: EntityPlayer): boolean;
8683
+ export declare function isFlyingCharacter(character: PlayerType): boolean;
8704
8684
 
8705
8685
  /**
8706
8686
  * Helper function to detect if a particular player is the Found Soul player provided by the
@@ -10010,6 +9990,12 @@ export declare function logVector(this: void, vector: Vector, name?: string, rou
10010
9990
  /** Helper type to match all of the lowercase keys of an object. */
10011
9991
  export declare type LowercaseKeys<T> = StartsWithLowercase<keyof T>;
10012
9992
 
9993
+ /**
9994
+ * An array containing every character that is selectable from the main menu (and has achievements
9995
+ * related to completing the various bosses and so on).
9996
+ */
9997
+ export declare const MAIN_CHARACTERS: readonly [PlayerType.ISAAC, PlayerType.MAGDALENE, PlayerType.CAIN, PlayerType.JUDAS, PlayerType.BLUE_BABY, PlayerType.EVE, PlayerType.SAMSON, PlayerType.AZAZEL, PlayerType.LAZARUS, PlayerType.EDEN, PlayerType.LOST, PlayerType.LILITH, PlayerType.KEEPER, PlayerType.APOLLYON, PlayerType.FORGOTTEN, PlayerType.BETHANY, PlayerType.JACOB, PlayerType.ISAAC_B, PlayerType.MAGDALENE_B, PlayerType.CAIN_B, PlayerType.JUDAS_B, PlayerType.BLUE_BABY_B, PlayerType.EVE_B, PlayerType.SAMSON_B, PlayerType.AZAZEL_B, PlayerType.LAZARUS_B, PlayerType.EDEN_B, PlayerType.LOST_B, PlayerType.LILITH_B, PlayerType.KEEPER_B, PlayerType.APOLLYON_B, PlayerType.FORGOTTEN_B, PlayerType.BETHANY_B, PlayerType.JACOB_B];
9998
+
10013
9999
  /**
10014
10000
  * Helper function for non-TypeScript users to convert all of the elements in an array to something
10015
10001
  * else.
@@ -12754,27 +12740,6 @@ declare class ModdedElementDetection extends Feature {
12754
12740
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12755
12741
  */
12756
12742
  getLastCollectibleType(): CollectibleType;
12757
- /**
12758
- * Helper function to get an array that represents every modded collectible type.
12759
- *
12760
- * Returns an empty array if there are no modded collectible types.
12761
- *
12762
- * This function is only useful when building collectible type objects. For most purposes, you
12763
- * should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function
12764
- * instead.
12765
- *
12766
- * (This function is named differently from the `getVanillaCollectibleTypeRange` function because
12767
- * all modded collectible types are contiguous. Thus, each value represents a real
12768
- * `CollectibleType`.)
12769
- *
12770
- * This function can only be called if at least one callback has been executed. This is because
12771
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
12772
- * order).
12773
- *
12774
- * In order to use this function, you must upgrade your mod with
12775
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12776
- */
12777
- getModdedCollectibleTypes(): CollectibleType[];
12778
12743
  /**
12779
12744
  * Returns the total number of collectibles in the item config, including both vanilla and modded
12780
12745
  * items. If you just need the number of vanilla collectible types, use the
@@ -12825,24 +12790,6 @@ declare class ModdedElementDetection extends Feature {
12825
12790
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12826
12791
  */
12827
12792
  getLastTrinketType(): TrinketType;
12828
- /**
12829
- * Helper function to get an array that represents every modded trinket type.
12830
- *
12831
- * Returns an empty array if there are no modded trinket types.
12832
- *
12833
- * This function is only useful when building trinket type objects. For most purposes, you should
12834
- * use the `getModdedTrinketArray` or `getModdedTrinketSet` helper function instead.
12835
- *
12836
- * (This function is named differently from the `getVanillaTrinketTypeRange` function because all
12837
- * modded trinket types are contiguous. Thus, each value represents a real `TrinketType`.)
12838
- *
12839
- * This function can only be called if at least one callback has been executed. This is because
12840
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
12841
- *
12842
- * In order to use this function, you must upgrade your mod with
12843
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12844
- */
12845
- getModdedTrinketTypes(): TrinketType[];
12846
12793
  /**
12847
12794
  * Returns the total number of trinkets in the item config, including both vanilla and modded
12848
12795
  * items. If you just need the number of vanilla trinket types, use the
@@ -12865,16 +12812,6 @@ declare class ModdedElementDetection extends Feature {
12865
12812
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12866
12813
  */
12867
12814
  getNumModdedTrinketTypes(): int;
12868
- /**
12869
- * Helper function to get an array with every valid card sub-type. This includes modded cards.
12870
- *
12871
- * This function can only be called if at least one callback has been executed. This is because
12872
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
12873
- *
12874
- * In order to use this function, you must upgrade your mod with
12875
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12876
- */
12877
- getAllCardTypes(): CardType[];
12878
12815
  /**
12879
12816
  * Returns the first modded card sub-type, or undefined if there are no modded cards.
12880
12817
  *
@@ -12898,18 +12835,6 @@ declare class ModdedElementDetection extends Feature {
12898
12835
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12899
12836
  */
12900
12837
  getLastCardType(): CardType;
12901
- /**
12902
- * Helper function to get an array with every modded card sub-type.
12903
- *
12904
- * Returns an empty array if there are no modded cards.
12905
- *
12906
- * This function can only be called if at least one callback has been executed. This is because
12907
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
12908
- *
12909
- * In order to use this function, you must upgrade your mod with
12910
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12911
- */
12912
- getModdedCardTypes(): CardType[];
12913
12838
  /**
12914
12839
  * Will change depending on how many modded cards there are.
12915
12840
  *
@@ -12930,18 +12855,6 @@ declare class ModdedElementDetection extends Feature {
12930
12855
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12931
12856
  */
12932
12857
  getNumModdedCardTypes(): int;
12933
- /**
12934
- * Helper function to get an array with every valid pill effect. This includes modded pill
12935
- * effects.
12936
- *
12937
- * This function can only be called if at least one callback has been executed. This is because
12938
- * not all pill effects will necessarily be present when a mod first loads (due to mod load
12939
- * order).
12940
- *
12941
- * In order to use this function, you must upgrade your mod with
12942
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12943
- */
12944
- getAllPillEffects(): PillEffect[];
12945
12858
  /**
12946
12859
  * Returns the first modded pill effect, or undefined if there are no modded pill effects.
12947
12860
  *
@@ -12967,19 +12880,6 @@ declare class ModdedElementDetection extends Feature {
12967
12880
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12968
12881
  */
12969
12882
  getLastPillEffect(): PillEffect;
12970
- /**
12971
- * Helper function to get an array with every modded pill effect.
12972
- *
12973
- * Returns an empty array if there are no modded pill effects.
12974
- *
12975
- * This function can only be called if at least one callback has been executed. This is because
12976
- * not all pill effects will necessarily be present when a mod first loads (due to mod load
12977
- * order).
12978
- *
12979
- * In order to use this function, you must upgrade your mod with
12980
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12981
- */
12982
- getModdedPillEffects(): PillEffect[];
12983
12883
  /**
12984
12884
  * Will change depending on how many modded pill effects there are.
12985
12885
  *
@@ -13005,37 +12905,43 @@ declare class ModdedElementDetection extends Feature {
13005
12905
  getNumModdedPillEffects(): int;
13006
12906
  }
13007
12907
 
12908
+ /**
12909
+ * A feature that lazy-inits and caches various arrays and sets that include both vanilla and modded
12910
+ * elements. This is useful for performance purposes (so that we do not have to reconstruct the
12911
+ * arrays/sets multiple times).
12912
+ *
12913
+ * The modded arrays/sets are created using the functions from
12914
+ * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12915
+ */
13008
12916
  declare class ModdedElementSets extends Feature {
13009
12917
  private arraysInitialized;
13010
12918
  private readonly allCollectibleTypesArray;
13011
12919
  private readonly allCollectibleTypesSet;
13012
- private readonly vanillaCollectibleTypesArray;
13013
- private readonly vanillaCollectibleTypesSet;
13014
12920
  private readonly moddedCollectibleTypesArray;
13015
12921
  private readonly moddedCollectibleTypesSet;
13016
12922
  private readonly allTrinketTypesArray;
13017
12923
  private readonly allTrinketTypesSet;
13018
- private readonly vanillaTrinketTypesArray;
13019
- private readonly vanillaTrinketTypesSet;
13020
12924
  private readonly moddedTrinketTypesArray;
13021
12925
  private readonly moddedTrinketTypesSet;
13022
12926
  private readonly allCardTypesArray;
13023
12927
  private readonly allCardTypesSet;
13024
- private readonly vanillaCardTypesArray;
13025
- private readonly vanillaCardTypesSet;
13026
12928
  private readonly moddedCardTypesArray;
13027
12929
  private readonly moddedCardTypesSet;
13028
- private readonly tagToCollectibleTypesMap;
12930
+ private readonly allPillEffectsArray;
12931
+ private readonly allPillEffectsSet;
12932
+ private readonly moddedPillEffectsArray;
12933
+ private readonly moddedPillEffectsSet;
13029
12934
  private readonly cacheFlagToCollectibleTypesMap;
13030
12935
  private readonly cacheFlagToTrinketTypesMap;
13031
12936
  private flyingCollectibleTypesSet;
13032
12937
  private readonly permanentFlyingCollectibleTypesSet;
13033
12938
  private flyingTrinketTypesSet;
12939
+ private readonly tagToCollectibleTypesMap;
13034
12940
  private readonly edenActiveCollectibleTypesSet;
13035
12941
  private readonly edenPassiveCollectibleTypesSet;
13036
12942
  private readonly itemConfigCardTypeToCardTypeMap;
13037
12943
  /**
13038
- * The set of cards that are not:
12944
+ * The set of card types that are not:
13039
12945
  *
13040
12946
  * - ItemConfigCardType.RUNE
13041
12947
  * - ItemConfigCardType.SPECIAL_OBJECT
@@ -13043,12 +12949,10 @@ declare class ModdedElementSets extends Feature {
13043
12949
  private readonly cardSet;
13044
12950
  private readonly moddedElementDetection;
13045
12951
  private lazyInit;
13046
- private lazyInitVanillaCollectibleTypes;
13047
12952
  private lazyInitModdedCollectibleTypes;
13048
- private lazyInitVanillaTrinketTypes;
13049
12953
  private lazyInitModdedTrinketTypes;
13050
- private lazyInitVanillaCardTypes;
13051
12954
  private lazyInitModdedCardTypes;
12955
+ private lazyInitModdedPillEffects;
13052
12956
  private lazyInitTagToCollectibleTypesMap;
13053
12957
  private lazyInitCacheFlagToCollectibleTypesMap;
13054
12958
  private lazyInitCacheFlagToTrinketTypesMap;
@@ -13057,250 +12961,246 @@ declare class ModdedElementSets extends Feature {
13057
12961
  private lazyInitEdenCollectibleTypesSet;
13058
12962
  private lazyInitCardTypes;
13059
12963
  /**
13060
- * Returns an array containing every valid card type in the game, including modded cards.
13061
- *
13062
- * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13063
- * use the `getCardSet` helper function instead.
13064
- *
13065
- * This function can only be called if at least one callback has been executed. This is because
13066
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
13067
- *
13068
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13069
- */
13070
- getCardArray(): readonly CardType[];
13071
- /**
13072
- * Returns a set containing every valid card type in the game, including modded cards.
12964
+ * Returns an array containing every valid collectible type in the game, including modded
12965
+ * collectibles.
13073
12966
  *
13074
- * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13075
- * use the `getCardArray` helper function instead.
12967
+ * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
12968
+ * then use the `getCollectibleTypesSet` helper function instead.
13076
12969
  *
13077
12970
  * This function can only be called if at least one callback has been executed. This is because
13078
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
12971
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
12972
+ * order).
13079
12973
  *
13080
12974
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13081
12975
  */
13082
- getCardSet(): ReadonlySet<CardType>;
12976
+ getCollectibleTypes(): readonly CollectibleType[];
13083
12977
  /**
13084
- * Helper function to get a set of card types matching the `ItemConfigCardType`.
12978
+ * Returns a set containing every valid collectible type in the game, including modded
12979
+ * collectibles.
13085
12980
  *
13086
- * This function is variadic, meaning that you can you can specify N card types to get a set
13087
- * containing cards that match any of the specified types.
12981
+ * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
12982
+ * then use the `getCollectibleTypes` helper function instead.
13088
12983
  *
13089
12984
  * This function can only be called if at least one callback has been executed. This is because
13090
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
12985
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
12986
+ * order).
13091
12987
  *
13092
12988
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13093
12989
  */
13094
- getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
12990
+ getCollectibleTypeSet(): ReadonlySet<CollectibleType>;
13095
12991
  /**
13096
- * Returns an array containing every valid collectible type in the game, including modded
13097
- * collectibles.
12992
+ * Returns an array containing every modded collectible type in the game.
13098
12993
  *
13099
12994
  * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
13100
- * then use the `getCollectibleSet` helper function instead.
12995
+ * then use the `getModdedCollectibleTypesSet` helper function instead.
13101
12996
  *
13102
12997
  * This function can only be called if at least one callback has been executed. This is because
13103
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
12998
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13104
12999
  * order).
13105
13000
  *
13106
13001
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13107
13002
  */
13108
- getCollectibleArray(): readonly CollectibleType[];
13003
+ getModdedCollectibleTypes(): readonly CollectibleType[];
13109
13004
  /**
13110
- * Returns a set containing every valid collectible type in the game, including modded
13111
- * collectibles.
13005
+ * Returns a set containing every modded collectible type in the game.
13112
13006
  *
13113
13007
  * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
13114
- * then use the `getCollectibleArray` helper function instead.
13008
+ * then use the `getModdedCollectibleTypes` helper function instead.
13115
13009
  *
13116
13010
  * This function can only be called if at least one callback has been executed. This is because
13117
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13011
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13118
13012
  * order).
13119
13013
  *
13120
13014
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13121
13015
  */
13122
- getCollectibleSet(): ReadonlySet<CollectibleType>;
13016
+ getModdedCollectibleTypesSet(): ReadonlySet<CollectibleType>;
13123
13017
  /**
13124
- * Helper function to get all of the collectible types in the game that count towards a particular
13125
- * transformation.
13126
- *
13127
- * For example, to get all of the collectible types that count towards Guppy:
13018
+ * Iterates over every collectible in the game and returns a map containing the number of each
13019
+ * item that the player has.
13128
13020
  *
13129
- * ```ts
13130
- * const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
13131
- * ```
13021
+ * Note that this will filter out non-real collectibles like Lilith's Incubus.
13132
13022
  *
13133
13023
  * This function can only be called if at least one callback has been executed. This is because
13134
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13024
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13135
13025
  * order).
13136
13026
  *
13137
13027
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13138
13028
  */
13139
- getCollectiblesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
13029
+ getPlayerCollectibleMap(player: EntityPlayer): Map<CollectibleType, int>;
13140
13030
  /**
13141
- * Returns a set containing every collectible type with the given cache flag, including modded
13142
- * collectibles.
13031
+ * Returns an array containing every modded trinket type in the game.
13143
13032
  *
13144
- * This function can only be called if at least one callback has been executed. This is because
13145
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13146
- * order).
13033
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13034
+ * then use the `getModdedTrinketTypesSet` helper function instead.
13147
13035
  *
13148
13036
  * This function can only be called if at least one callback has been executed. This is because
13149
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13037
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13150
13038
  * order).
13151
13039
  *
13152
13040
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13153
13041
  */
13154
- getCollectiblesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
13042
+ getTrinketTypes(): readonly TrinketType[];
13155
13043
  /**
13156
- * Returns a set containing every collectible type with the given tag.
13157
- *
13158
- * For example, to get all of the collectible types that count as offensive for the purposes of
13159
- * Tainted Lost:
13044
+ * Returns a set containing every modded trinket type in the game.
13160
13045
  *
13161
- * ```ts
13162
- * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
13163
- * ```
13046
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13047
+ * then use the `getModdedTrinketTypes` helper function instead.
13164
13048
  *
13165
13049
  * This function can only be called if at least one callback has been executed. This is because
13166
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13050
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13167
13051
  * order).
13168
13052
  *
13169
13053
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13170
13054
  */
13171
- getCollectiblesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
13055
+ getTrinketTypesSet(): ReadonlySet<TrinketType>;
13172
13056
  /**
13173
- * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13174
- * starting item.
13057
+ * Returns an array containing every modded trinket type in the game.
13058
+ *
13059
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13060
+ * then use the `getModdedTrinketTypesSet` helper function instead.
13175
13061
  *
13176
13062
  * This function can only be called if at least one callback has been executed. This is because
13177
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13063
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13178
13064
  * order).
13179
13065
  *
13180
13066
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13181
13067
  */
13182
- getEdenActiveCollectibles(): ReadonlySet<CollectibleType>;
13068
+ getModdedTrinketTypes(): readonly TrinketType[];
13183
13069
  /**
13184
- * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13185
- * starting item.
13070
+ * Returns a set containing every modded trinket type in the game.
13071
+ *
13072
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13073
+ * then use the `getModdedTrinketTypes` helper function instead.
13186
13074
  *
13187
13075
  * This function can only be called if at least one callback has been executed. This is because
13188
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13076
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13189
13077
  * order).
13190
13078
  *
13191
13079
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13192
13080
  */
13193
- getEdenPassiveCollectibles(): ReadonlySet<CollectibleType>;
13081
+ getModdedTrinketTypesSet(): ReadonlySet<TrinketType>;
13194
13082
  /**
13195
- * Returns a set of all of the collectibles that grant flight. This is derived from collectibles
13196
- * that have `CacheFlag.FLYING` set in the "items.xml" file.
13083
+ * Returns an array containing every valid card type in the game, including modded cards.
13197
13084
  *
13198
- * Collectibles that only grant flight conditionally are manually pruned. Collectibles such as
13199
- * Empty Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
13085
+ * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13086
+ * use the `getCardTypesSet` helper function instead.
13200
13087
  *
13201
13088
  * This function can only be called if at least one callback has been executed. This is because
13202
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13203
- * order).
13089
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13204
13090
  *
13205
13091
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13206
- *
13207
- * @param includeConditionalItems Whether collectibles that only grant flight conditionally should
13208
- * be included in the set (like Empty Vessel).
13209
13092
  */
13210
- getFlyingCollectibles(includeConditionalItems: boolean): ReadonlySet<CollectibleType>;
13093
+ getCardTypes(): readonly CardType[];
13211
13094
  /**
13212
- * Returns a set of all of the trinkets that grant flight. (All trinkets that grant flight do so
13213
- * conditionally, like Bat Wing and Azazel's Stump.)
13095
+ * Returns a set containing every valid card type in the game, including modded cards.
13096
+ *
13097
+ * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13098
+ * use the `getCardTypes` helper function instead.
13214
13099
  *
13215
13100
  * This function can only be called if at least one callback has been executed. This is because
13216
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13101
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13217
13102
  *
13218
13103
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13219
13104
  */
13220
- getFlyingTrinkets(): ReadonlySet<TrinketType>;
13105
+ getCardTypesSet(): ReadonlySet<CardType>;
13221
13106
  /**
13222
13107
  * Returns an array containing every modded card type in the game.
13223
13108
  *
13224
13109
  * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13225
- * use the `getModdedCardSet` helper function instead.
13110
+ * use the `getModdedCardTypesSet` helper function instead.
13226
13111
  *
13227
13112
  * This function can only be called if at least one callback has been executed. This is because
13228
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
13113
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13229
13114
  *
13230
13115
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13231
13116
  */
13232
- getModdedCardArray(): readonly CardType[];
13117
+ getModdedCardTypes(): readonly CardType[];
13233
13118
  /**
13234
13119
  * Returns a set containing every modded card type in the game.
13235
13120
  *
13236
13121
  * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13237
- * use the `getModdedCardArray` helper function instead.
13122
+ * use the `getModdedCardTypes` helper function instead.
13238
13123
  *
13239
13124
  * This function can only be called if at least one callback has been executed. This is because
13240
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
13125
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13241
13126
  *
13242
13127
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13243
13128
  */
13244
- getModdedCardSet(): ReadonlySet<CardType>;
13129
+ getModdedCardTypesSet(): ReadonlySet<CardType>;
13245
13130
  /**
13246
- * Returns an array containing every modded collectible type in the game.
13131
+ * Returns an array containing every valid pill effect in the game, including modded pill effects.
13247
13132
  *
13248
- * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
13249
- * then use the `getModdedCollectibleSet` helper function instead.
13133
+ * Use this if you need to iterate over the pill effects in order. If you need to do O(1) lookups,
13134
+ * then use the `getPillEffectSet` helper function instead.
13250
13135
  *
13251
13136
  * This function can only be called if at least one callback has been executed. This is because
13252
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13137
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13253
13138
  * order).
13254
13139
  *
13255
13140
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13256
13141
  */
13257
- getModdedCollectibleArray(): readonly CollectibleType[];
13142
+ getPillEffects(): readonly PillEffect[];
13258
13143
  /**
13259
- * Returns a set containing every modded collectible type in the game.
13144
+ * Returns a set containing every valid pill effect in the game, including modded pill effects.
13260
13145
  *
13261
- * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
13262
- * then use the `getModdedCollectibleArray` helper function instead.
13146
+ * Use this if you need to do O(1) lookups. If you need to iterate over the pill effects in order,
13147
+ * then use the `getPillEffects` helper function instead.
13263
13148
  *
13264
13149
  * This function can only be called if at least one callback has been executed. This is because
13265
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13150
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13266
13151
  * order).
13267
13152
  *
13268
13153
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13269
13154
  */
13270
- getModdedCollectibleSet(): ReadonlySet<CollectibleType>;
13155
+ getPillEffectsSet(): ReadonlySet<PillEffect>;
13271
13156
  /**
13272
- * Returns an array containing every modded trinket type in the game.
13157
+ * Returns an array containing every modded pill effect in the game.
13273
13158
  *
13274
- * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13275
- * then use the `getModdedTrinketSet` helper function instead.
13159
+ * Use this if you need to iterate over the pill effects in order. If you need to do O(1) lookups,
13160
+ * then use the `getModdedPillEffectsSet` helper function instead.
13276
13161
  *
13277
13162
  * This function can only be called if at least one callback has been executed. This is because
13278
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13163
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13164
+ * order).
13279
13165
  *
13280
13166
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13281
13167
  */
13282
- getModdedTrinketArray(): readonly TrinketType[];
13168
+ getModdedPillEffects(): readonly PillEffect[];
13283
13169
  /**
13284
- * Returns a set containing every modded trinket type in the game.
13170
+ * Returns a set containing every modded pill effect in the game.
13285
13171
  *
13286
- * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13287
- * then use the `getModdedTrinketArray` helper function instead.
13172
+ * Use this if you need to do O(1) lookups. If you need to iterate over the pill effects in order,
13173
+ * then use the `getModdedPillEffects` helper function instead.
13288
13174
  *
13289
13175
  * This function can only be called if at least one callback has been executed. This is because
13290
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13176
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13177
+ * order).
13291
13178
  *
13292
13179
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13293
13180
  */
13294
- getModdedTrinketSet(): ReadonlySet<TrinketType>;
13181
+ getModdedPillEffectsSet(): ReadonlySet<PillEffect>;
13295
13182
  /**
13296
- * Iterates over every item in the game and returns a map containing the number of each item that
13297
- * the player has.
13183
+ * Returns a set containing every collectible type with the given cache flag, including modded
13184
+ * collectibles.
13298
13185
  *
13299
- * Note that this will filter out non-real collectibles like Lilith's Incubus.
13186
+ * This function can only be called if at least one callback has been executed. This is because
13187
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13188
+ * order).
13300
13189
  *
13301
13190
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13302
13191
  */
13303
- getPlayerCollectibleMap(player: EntityPlayer): Map<CollectibleType, int>;
13192
+ getCollectibleTypesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
13193
+ /**
13194
+ * Returns a set containing every trinket type with the given cache flag, including modded
13195
+ * trinkets.
13196
+ *
13197
+ * This function can only be called if at least one callback has been executed. This is because
13198
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13199
+ * order).
13200
+ *
13201
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13202
+ */
13203
+ getTrinketsTypesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
13304
13204
  /**
13305
13205
  * Returns an array containing every collectible type that the player has that matches the
13306
13206
  * provided `CacheFlag`.
@@ -13320,187 +13220,226 @@ declare class ModdedElementSets extends Feature {
13320
13220
  * Lilith's Incubus.
13321
13221
  *
13322
13222
  * This function can only be called if at least one callback has been executed. This is because
13323
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13223
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13324
13224
  * order).
13325
13225
  *
13326
13226
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13327
13227
  */
13328
13228
  getPlayerCollectiblesWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): CollectibleType[];
13329
- /**
13330
- * Returns the number of items that a player has towards a particular transformation.
13331
- *
13332
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13333
- */
13334
- getPlayerCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): CollectibleType[];
13335
- /**
13336
- * Returns the number of items that a player has towards a particular transformation.
13337
- *
13338
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13339
- */
13340
- getPlayerCollectiblesForTransformation(player: EntityPlayer, playerForm: PlayerForm): CollectibleType[];
13341
13229
  /**
13342
13230
  * Returns a map containing every trinket type that the player has that matches the provided
13343
13231
  * `CacheFlag`. The values of the map correspond to the multiplier for that trinket.
13344
13232
  *
13345
13233
  * This function can only be called if at least one callback has been executed. This is because
13346
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13234
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13235
+ * order).
13347
13236
  *
13348
13237
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13349
13238
  */
13350
13239
  getPlayerTrinketsWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): Map<TrinketType, int>;
13351
13240
  /**
13352
- * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
13241
+ * Returns a set of all of the collectibles that grant flight. This is derived from collectibles
13242
+ * that have `CacheFlag.FLYING` set in the "items.xml" file.
13353
13243
  *
13354
- * This will not return:
13355
- * - any runes
13356
- * - any objects like Dice Shard
13244
+ * Vanilla collectibles that only grant flight conditionally are manually pruned. Collectibles
13245
+ * such as Empty Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
13246
+ *
13247
+ * Under the hood, this is determined by looking at the collectibles that have `CacheFlag.FLYING`
13248
+ * and excluding the ones that have `CacheFlag.ALL`. (None of the collectibles with
13249
+ * `CacheFlag.ALL` grant flying, including all of the 3 Dollar Bill collectibles and all of the
13250
+ * Birthright effects.)
13251
+ *
13252
+ * This function can only be called if at least one callback has been executed. This is because
13253
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13254
+ * order).
13357
13255
  *
13358
13256
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13359
13257
  *
13360
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13361
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13362
- * @param exceptions Optional. An array of cards to not select.
13258
+ * @param includeConditionalItems Whether collectibles that only grant flight conditionally should
13259
+ * be included in the set (like Empty Vessel).
13363
13260
  */
13364
- getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13261
+ getFlyingCollectibleTypes(includeConditionalItems: boolean): ReadonlySet<CollectibleType>;
13365
13262
  /**
13366
- * Helper function to get a random card type that matches the provided `ItemConfigCardType`.
13263
+ * Returns a set of all of the trinkets that grant flight. (All vanilla trinkets that grant flight
13264
+ * do so conditionally, like Bat Wing and Azazel's Stump.)
13367
13265
  *
13368
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13266
+ * Under the hood, this is determined by looking at the trinkets that have `CacheFlag.FLYING` and
13267
+ * excluding the ones that have `CacheFlag.ALL`. (None of the trinket with `CacheFlag.ALL` grant
13268
+ * flying except for Azazel's Stump.)
13369
13269
  *
13370
- * @param itemConfigCardType The item config card type that represents the pool of cards to select
13371
- * from.
13372
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13373
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13374
- * @param exceptions Optional. An array of cards to not select.
13270
+ * This function can only be called if at least one callback has been executed. This is because
13271
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13272
+ * order).
13273
+ *
13274
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13375
13275
  */
13376
- getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13276
+ getFlyingTrinketTypes(): ReadonlySet<TrinketType>;
13377
13277
  /**
13378
- * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
13379
- * of Isaac, etc.). This will never return a Rune Shard.
13278
+ * Returns a set containing every collectible type with the given tag.
13380
13279
  *
13381
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13280
+ * For example, to get all of the collectible types that count as offensive for the purposes of
13281
+ * Tainted Lost:
13382
13282
  *
13383
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13384
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13385
- * @param exceptions Optional. An array of runes to not select.
13283
+ * ```ts
13284
+ * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
13285
+ * ```
13286
+ *
13287
+ * This function can only be called if at least one callback has been executed. This is because
13288
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13289
+ * order).
13290
+ *
13291
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13386
13292
  */
13387
- getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13293
+ getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
13388
13294
  /**
13389
- * Returns a random active collectible type that that is a valid starting item for Eden.
13295
+ * Returns the number of items that a player has towards a particular transformation.
13390
13296
  *
13391
13297
  * This function can only be called if at least one callback has been executed. This is because
13392
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13298
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13393
13299
  * order).
13394
13300
  *
13395
13301
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13396
- *
13397
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13398
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13399
- * @param exceptions Optional. An array of runes to not select.
13400
13302
  */
13401
- getRandomEdenActiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13303
+ getPlayerCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): CollectibleType[];
13402
13304
  /**
13403
- * Returns a random passive collectible type that that is a valid starting item for Eden.
13305
+ * Helper function to get all of the collectible types in the game that count towards a particular
13306
+ * transformation.
13307
+ *
13308
+ * For example, to get all of the collectible types that count towards Guppy:
13309
+ *
13310
+ * ```ts
13311
+ * const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
13312
+ * ```
13404
13313
  *
13405
13314
  * This function can only be called if at least one callback has been executed. This is because
13406
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13315
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13407
13316
  * order).
13408
13317
  *
13409
13318
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13410
- *
13411
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13412
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13413
- * @param exceptions Optional. An array of runes to not select.
13414
13319
  */
13415
- getRandomEdenPassiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13320
+ getCollectibleTypesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
13416
13321
  /**
13417
- * Returns an array containing every modded trinket type in the game.
13418
- *
13419
- * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13420
- * then use the `getModdedTrinketSet` helper function instead.
13322
+ * Returns the number of items that a player has towards a particular transformation.
13421
13323
  *
13422
13324
  * This function can only be called if at least one callback has been executed. This is because
13423
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13325
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13326
+ * order).
13424
13327
  *
13425
13328
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13426
13329
  */
13427
- getTrinketArray(): readonly TrinketType[];
13330
+ getPlayerCollectiblesForTransformation(player: EntityPlayer, playerForm: PlayerForm): CollectibleType[];
13428
13331
  /**
13429
- * Returns a set containing every modded trinket type in the game.
13332
+ * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13333
+ * starting item.
13430
13334
  *
13431
- * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13432
- * then use the `getModdedTrinketArray` helper function instead.
13335
+ * Under the hood, this is determined by looking at the "noeden" tag in "items_metadata.xml".
13433
13336
  *
13434
13337
  * This function can only be called if at least one callback has been executed. This is because
13435
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13338
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13339
+ * order).
13436
13340
  *
13437
13341
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13438
13342
  */
13439
- getTrinketSet(): ReadonlySet<TrinketType>;
13343
+ getEdenActiveCollectibleTypes(): ReadonlySet<CollectibleType>;
13440
13344
  /**
13441
- * Returns a set containing every trinket type with the given cache flag, including modded
13442
- * trinkets.
13345
+ * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13346
+ * starting item.
13347
+ *
13348
+ * Under the hood, this is determined by looking at the "noeden" tag in "items_metadata.xml".
13443
13349
  *
13444
13350
  * This function can only be called if at least one callback has been executed. This is because
13445
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
13351
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13352
+ * order).
13446
13353
  *
13447
13354
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13448
13355
  */
13449
- getTrinketsWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
13356
+ getEdenPassiveCollectibleTypes(): ReadonlySet<CollectibleType>;
13450
13357
  /**
13451
- * Returns an array containing every valid vanilla card type in the game.
13358
+ * Returns a random active collectible type that that is a valid starting item for Eden.
13452
13359
  *
13453
- * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13454
- * use the `getVanillaCardSet` helper function instead.
13360
+ * This function can only be called if at least one callback has been executed. This is because
13361
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13362
+ * order).
13455
13363
  *
13456
13364
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13365
+ *
13366
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13367
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13368
+ * @param exceptions Optional. An array of runes to not select.
13457
13369
  */
13458
- getVanillaCardArray(): readonly CardType[];
13370
+ getRandomEdenActiveCollectibleType(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13459
13371
  /**
13460
- * Returns a set containing every valid vanilla card type in the game.
13372
+ * Returns a random passive collectible type that that is a valid starting item for Eden.
13461
13373
  *
13462
- * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13463
- * use the `getVanillaCardArray` helper function instead.
13374
+ * This function can only be called if at least one callback has been executed. This is because
13375
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13376
+ * order).
13464
13377
  *
13465
13378
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13379
+ *
13380
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13381
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13382
+ * @param exceptions Optional. An array of runes to not select.
13466
13383
  */
13467
- getVanillaCardSet(): ReadonlySet<CardType>;
13384
+ getRandomEdenPassiveCollectibleType(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13468
13385
  /**
13469
- * Returns an array containing every valid vanilla collectible type in the game.
13386
+ * Helper function to get a set of card types matching the `ItemConfigCardType`.
13470
13387
  *
13471
- * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
13472
- * then use the `getVanillaCollectibleSet` helper function instead.
13388
+ * This function is variadic, meaning that you can you can specify N card types to get a set
13389
+ * containing cards that match any of the specified types.
13390
+ *
13391
+ * This function can only be called if at least one callback has been executed. This is because
13392
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13473
13393
  *
13474
13394
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13475
13395
  */
13476
- getVanillaCollectibleArray(): readonly CollectibleType[];
13396
+ getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
13477
13397
  /**
13478
- * Returns a set containing every valid vanilla collectible type in the game.
13398
+ * Helper function to get a random card type that matches the provided `ItemConfigCardType`.
13479
13399
  *
13480
- * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
13481
- * then use the `getVanillaCollectibleArray` helper function instead.
13400
+ * This function can only be called if at least one callback has been executed. This is because
13401
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13482
13402
  *
13483
13403
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13404
+ *
13405
+ * @param itemConfigCardType The item config card type that represents the pool of cards to select
13406
+ * from.
13407
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13408
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13409
+ * @param exceptions Optional. An array of cards to not select.
13484
13410
  */
13485
- getVanillaCollectibleSet(): ReadonlySet<CollectibleType>;
13411
+ getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13486
13412
  /**
13487
- * Returns an array containing every valid vanilla trinket type in the game.
13413
+ * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
13488
13414
  *
13489
- * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13490
- * then use the `getVanillaTrinketSet` helper function instead.
13415
+ * This will not return:
13416
+ * - any runes
13417
+ * - any objects like Dice Shard
13418
+ *
13419
+ * This function can only be called if at least one callback has been executed. This is because
13420
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13491
13421
  *
13492
13422
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13423
+ *
13424
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13425
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13426
+ * @param exceptions Optional. An array of cards to not select.
13493
13427
  */
13494
- getVanillaTrinketArray(): readonly TrinketType[];
13428
+ getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13495
13429
  /**
13496
- * Returns a set containing every valid vanilla trinket type in the game.
13430
+ * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
13431
+ * of Isaac, etc.). This will never return a Rune Shard.
13497
13432
  *
13498
- * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13499
- * then use the `getVanillaTrinketArray` helper function instead.
13433
+ * This function can only be called if at least one callback has been executed. This is because
13434
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13500
13435
  *
13501
13436
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13437
+ *
13438
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13439
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13440
+ * @param exceptions Optional. An array of runes to not select.
13502
13441
  */
13503
- getVanillaTrinketSet(): ReadonlySet<TrinketType>;
13442
+ getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13504
13443
  }
13505
13444
 
13506
13445
  /**
@@ -13878,6 +13817,10 @@ declare class NoSirenSteal extends Feature {
13878
13817
  setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant, familiarSubType?: int): void;
13879
13818
  }
13880
13819
 
13820
+ /**
13821
+ * The number of dimensions, not including `Dimension.CURRENT`. (This is derived from the
13822
+ * `Dimension` enum.)
13823
+ */
13881
13824
  export declare const NUM_DIMENSIONS: number;
13882
13825
 
13883
13826
  export declare const NUM_NORMAL_PILL_COLORS: number;
@@ -13886,7 +13829,7 @@ export declare const NUM_NORMAL_PILL_COLORS: number;
13886
13829
  * The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
13887
13830
  * horse pills.)
13888
13831
  */
13889
- export declare const NUM_PILLS_IN_POOL: number;
13832
+ export declare const NUM_PILL_COLORS_IN_POOL: number;
13890
13833
 
13891
13834
  /** Calculated from the `Card` enum. `Card.NULL` is not included. */
13892
13835
  export declare const NUM_VANILLA_CARD_TYPES: number;
@@ -17740,6 +17683,104 @@ export declare function validateEnumContiguous<T>(transpiledEnumName: string, tr
17740
17683
  */
17741
17684
  export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
17742
17685
 
17686
+ /**
17687
+ * An array that represents the range from the first vanilla card type to the last vanilla card
17688
+ * type.
17689
+ *
17690
+ * This function is only useful when building card type objects. For most purposes, you should use
17691
+ * the `VANILLA_CARD_TYPES` or `VANILLA_CARD_TYPES_SET` constants instead.
17692
+ */
17693
+ export declare const VANILLA_CARD_TYPE_RANGE: readonly int[];
17694
+
17695
+ /**
17696
+ * An array that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
17697
+ * method. Vanilla card types are contiguous, but we validate every entry to double check.
17698
+ *
17699
+ * If you need to do O(1) lookups, use the `VANILLA_CARD_TYPES_SET` constant instead.
17700
+ */
17701
+ export declare const VANILLA_CARD_TYPES: readonly CardType[];
17702
+
17703
+ /**
17704
+ * A set that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
17705
+ * method. Vanilla card types are contiguous, but we validate every entry to double check.
17706
+ */
17707
+ export declare const VANILLA_CARD_TYPES_SET: ReadonlySet<CardType>;
17708
+
17709
+ /**
17710
+ * An array that represents the range from the first vanilla collectible type to the last vanilla
17711
+ * collectible type. This will include integers that do not represent any valid collectible types.
17712
+ *
17713
+ * This function is only useful when building collectible type objects. For most purposes, you
17714
+ * should use the `VANILLA_COLLECTIBLE_TYPES` or `VANILLA_COLLECTIBLE_TYPES_SET` constants instead.
17715
+ */
17716
+ export declare const VANILLA_COLLECTIBLE_TYPE_RANGE: readonly int[];
17717
+
17718
+ /**
17719
+ * An array that contains every valid vanilla collectible type, as verified by the
17720
+ * `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
17721
+ * must be verified. (There are several gaps, e.g. 666.)
17722
+ *
17723
+ * If you need to do O(1) lookups, use the `VANILLA_COLLECTIBLE_TYPES_SET` constant instead.
17724
+ */
17725
+ export declare const VANILLA_COLLECTIBLE_TYPES: readonly CollectibleType[];
17726
+
17727
+ /**
17728
+ * A set that contains every valid vanilla collectible type, as verified by the
17729
+ * `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
17730
+ * must be verified. (There are several gaps, e.g. 666.)
17731
+ */
17732
+ export declare const VANILLA_COLLECTIBLE_TYPES_SET: ReadonlySet<CollectibleType>;
17733
+
17734
+ /**
17735
+ * An array that represents the range from the first vanilla pill effect to the last vanilla pill
17736
+ * effect.
17737
+ *
17738
+ * This function is only useful when building pill effect objects. For most purposes, you should use
17739
+ * the `VANILLA_PILL_EFFECTS` or `VANILLA_PILL_EFFECTS_SET` constants instead.
17740
+ */
17741
+ export declare const VANILLA_PILL_EFFECT_RANGE: readonly int[];
17742
+
17743
+ /**
17744
+ * An array that contains every valid vanilla pill effect, as verified by the
17745
+ * `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
17746
+ * entry to double check.
17747
+ *
17748
+ * If you need to do O(1) lookups, use the `VANILLA_PILL_EFFECT_SET` constant instead.
17749
+ */
17750
+ export declare const VANILLA_PILL_EFFECTS: readonly PillEffect[];
17751
+
17752
+ /**
17753
+ * A set that contains every valid vanilla pill effect, as verified by the
17754
+ * `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
17755
+ * entry to double check.
17756
+ */
17757
+ export declare const VANILLA_PILL_EFFECTS_SET: ReadonlySet<PillEffect>;
17758
+
17759
+ /**
17760
+ * An array that represents the range from the first vanilla trinket type to the last vanilla
17761
+ * trinket type. This will include integers that do not represent any valid trinket types.
17762
+ *
17763
+ * This function is only useful when building trinket type objects. For most purposes, you should
17764
+ * use the `VANILLA_TRINKET_TYPES` or `VANILLA_TRINKET_TYPES_SET` constants instead.
17765
+ */
17766
+ export declare const VANILLA_TRINKET_TYPE_RANGE: readonly int[];
17767
+
17768
+ /**
17769
+ * An array that contains every valid vanilla trinket type, as verified by the
17770
+ * `ItemConfig.GetTrinket` method. Vanilla trinket types are not contiguous, so every valid must be
17771
+ * verified. (The only gap is 47 for `POLAROID_OBSOLETE`.)
17772
+ *
17773
+ * If you need to do O(1) lookups, use the `VANILLA_TRINKET_TYPES_SET` constant instead.
17774
+ */
17775
+ export declare const VANILLA_TRINKET_TYPES: readonly TrinketType[];
17776
+
17777
+ /**
17778
+ * A set that contains every valid vanilla trinket type, as verified by the `ItemConfig.GetTrinket`
17779
+ * method. Vanilla trinket types are not contiguous, so every valid must be verified. (The only gap
17780
+ * is 47 for `POLAROID_OBSOLETE`.)
17781
+ */
17782
+ export declare const VANILLA_TRINKET_TYPES_SET: ReadonlySet<TrinketType>;
17783
+
17743
17784
  /**
17744
17785
  * Helper function to compare two vectors for equality.
17745
17786
  *