isaacscript-common 40.0.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 (54) hide show
  1. package/dist/index.rollup.d.ts +364 -334
  2. package/dist/isaacscript-common.lua +379 -378
  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 +17 -2
  12. package/dist/src/core/constants.d.ts.map +1 -1
  13. package/dist/src/core/constants.lua +8 -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/collectibles.d.ts +0 -10
  24. package/dist/src/functions/collectibles.d.ts.map +1 -1
  25. package/dist/src/functions/collectibles.lua +0 -13
  26. package/dist/src/functions/dimensions.d.ts +0 -4
  27. package/dist/src/functions/dimensions.d.ts.map +1 -1
  28. package/dist/src/functions/dimensions.lua +2 -8
  29. package/dist/src/functions/pills.d.ts +0 -2
  30. package/dist/src/functions/pills.d.ts.map +1 -1
  31. package/dist/src/functions/pills.lua +0 -5
  32. package/dist/src/functions/rooms.lua +2 -2
  33. package/dist/src/functions/trinkets.d.ts +0 -9
  34. package/dist/src/functions/trinkets.d.ts.map +1 -1
  35. package/dist/src/functions/trinkets.lua +0 -12
  36. package/dist/src/index.d.ts +1 -0
  37. package/dist/src/index.d.ts.map +1 -1
  38. package/dist/src/index.lua +8 -0
  39. package/package.json +1 -1
  40. package/src/classes/features/other/FlyingDetection.ts +2 -2
  41. package/src/classes/features/other/ItemPoolDetection.ts +2 -2
  42. package/src/classes/features/other/ModdedElementDetection.ts +4 -156
  43. package/src/classes/features/other/ModdedElementSets.ts +552 -486
  44. package/src/core/constants.ts +15 -2
  45. package/src/core/constantsFirstLast.ts +5 -1
  46. package/src/core/constantsVanilla.ts +183 -0
  47. package/src/core/upgradeMod.ts +6 -1
  48. package/src/functions/cards.ts +1 -15
  49. package/src/functions/collectibles.ts +1 -18
  50. package/src/functions/dimensions.ts +2 -10
  51. package/src/functions/pills.ts +0 -6
  52. package/src/functions/rooms.ts +3 -3
  53. package/src/functions/trinkets.ts +1 -17
  54. 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
@@ -4695,11 +4707,6 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
4695
4707
  */
4696
4708
  export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<string>;
4697
4709
 
4698
- /**
4699
- * Helper function to get an array with every valid `Dimension` (not including `Dimension.CURRENT`).
4700
- */
4701
- export declare function getAllDimensions(): Dimension[];
4702
-
4703
4710
  /**
4704
4711
  * Helper function to get every legal grid index for the current room.
4705
4712
  *
@@ -7510,38 +7517,6 @@ export declare function getUnusedDoorSlots(): DoorSlot[];
7510
7517
  */
7511
7518
  export declare function getUsableActiveItemSlots(player: EntityPlayer, collectibleType: CollectibleType): ActiveSlot[];
7512
7519
 
7513
- /**
7514
- * Helper function to get an array with every valid vanilla card sub-type.
7515
- *
7516
- * Note that unlike collectibles and trinkets, there are no gaps in the card types, so this is a
7517
- * simple range from the first card type to the last vanilla card type.
7518
- */
7519
- export declare function getVanillaCardTypes(): CardType[];
7520
-
7521
- /**
7522
- * Helper function to get an array that represents the range from the first collectible type to the
7523
- * last vanilla collectible type. This will include integers that do not represent any valid
7524
- * collectible types.
7525
- *
7526
- * This function is only useful when building collectible type objects. For most purposes, you
7527
- * should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
7528
- * instead (which are part of `ISCFeature.MODDED_ELEMENT_SETS`).
7529
- */
7530
- export declare function getVanillaCollectibleTypeRange(): CollectibleType[];
7531
-
7532
- /** Helper function to get an array with every vanilla pill effect. */
7533
- export declare function getVanillaPillEffects(): PillEffect[];
7534
-
7535
- /**
7536
- * Helper function to get an array that represents the range from the first trinket type to the last
7537
- * vanilla trinket type. This will include integers that do not represent any valid trinket types.
7538
- *
7539
- * This function is only useful when building collectible type objects. For most purposes, you
7540
- * should use the `getVanillaTrinketArray` or `getVanillaTrinketSet` helper functions instead (which
7541
- * are part of `ISCFeature.MODDED_ELEMENT_SETS`).
7542
- */
7543
- export declare function getVanillaTrinketTypeRange(): TrinketType[];
7544
-
7545
7520
  /**
7546
7521
  * Get how many hearts are currently being shown on the hearts UI.
7547
7522
  *
@@ -12765,27 +12740,6 @@ declare class ModdedElementDetection extends Feature {
12765
12740
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12766
12741
  */
12767
12742
  getLastCollectibleType(): CollectibleType;
12768
- /**
12769
- * Helper function to get an array that represents every modded collectible type.
12770
- *
12771
- * Returns an empty array if there are no modded collectible types.
12772
- *
12773
- * This function is only useful when building collectible type objects. For most purposes, you
12774
- * should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function
12775
- * instead.
12776
- *
12777
- * (This function is named differently from the `getVanillaCollectibleTypeRange` function because
12778
- * all modded collectible types are contiguous. Thus, each value represents a real
12779
- * `CollectibleType`.)
12780
- *
12781
- * This function can only be called if at least one callback has been executed. This is because
12782
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
12783
- * order).
12784
- *
12785
- * In order to use this function, you must upgrade your mod with
12786
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12787
- */
12788
- getModdedCollectibleTypes(): CollectibleType[];
12789
12743
  /**
12790
12744
  * Returns the total number of collectibles in the item config, including both vanilla and modded
12791
12745
  * items. If you just need the number of vanilla collectible types, use the
@@ -12836,24 +12790,6 @@ declare class ModdedElementDetection extends Feature {
12836
12790
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12837
12791
  */
12838
12792
  getLastTrinketType(): TrinketType;
12839
- /**
12840
- * Helper function to get an array that represents every modded trinket type.
12841
- *
12842
- * Returns an empty array if there are no modded trinket types.
12843
- *
12844
- * This function is only useful when building trinket type objects. For most purposes, you should
12845
- * use the `getModdedTrinketArray` or `getModdedTrinketSet` helper function instead.
12846
- *
12847
- * (This function is named differently from the `getVanillaTrinketTypeRange` function because all
12848
- * modded trinket types are contiguous. Thus, each value represents a real `TrinketType`.)
12849
- *
12850
- * This function can only be called if at least one callback has been executed. This is because
12851
- * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
12852
- *
12853
- * In order to use this function, you must upgrade your mod with
12854
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12855
- */
12856
- getModdedTrinketTypes(): TrinketType[];
12857
12793
  /**
12858
12794
  * Returns the total number of trinkets in the item config, including both vanilla and modded
12859
12795
  * items. If you just need the number of vanilla trinket types, use the
@@ -12876,16 +12812,6 @@ declare class ModdedElementDetection extends Feature {
12876
12812
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12877
12813
  */
12878
12814
  getNumModdedTrinketTypes(): int;
12879
- /**
12880
- * Helper function to get an array with every valid card sub-type. This includes modded cards.
12881
- *
12882
- * This function can only be called if at least one callback has been executed. This is because
12883
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
12884
- *
12885
- * In order to use this function, you must upgrade your mod with
12886
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12887
- */
12888
- getAllCardTypes(): CardType[];
12889
12815
  /**
12890
12816
  * Returns the first modded card sub-type, or undefined if there are no modded cards.
12891
12817
  *
@@ -12909,18 +12835,6 @@ declare class ModdedElementDetection extends Feature {
12909
12835
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12910
12836
  */
12911
12837
  getLastCardType(): CardType;
12912
- /**
12913
- * Helper function to get an array with every modded card sub-type.
12914
- *
12915
- * Returns an empty array if there are no modded cards.
12916
- *
12917
- * This function can only be called if at least one callback has been executed. This is because
12918
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
12919
- *
12920
- * In order to use this function, you must upgrade your mod with
12921
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12922
- */
12923
- getModdedCardTypes(): CardType[];
12924
12838
  /**
12925
12839
  * Will change depending on how many modded cards there are.
12926
12840
  *
@@ -12941,18 +12855,6 @@ declare class ModdedElementDetection extends Feature {
12941
12855
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12942
12856
  */
12943
12857
  getNumModdedCardTypes(): int;
12944
- /**
12945
- * Helper function to get an array with every valid pill effect. This includes modded pill
12946
- * effects.
12947
- *
12948
- * This function can only be called if at least one callback has been executed. This is because
12949
- * not all pill effects will necessarily be present when a mod first loads (due to mod load
12950
- * order).
12951
- *
12952
- * In order to use this function, you must upgrade your mod with
12953
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12954
- */
12955
- getAllPillEffects(): PillEffect[];
12956
12858
  /**
12957
12859
  * Returns the first modded pill effect, or undefined if there are no modded pill effects.
12958
12860
  *
@@ -12978,19 +12880,6 @@ declare class ModdedElementDetection extends Feature {
12978
12880
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12979
12881
  */
12980
12882
  getLastPillEffect(): PillEffect;
12981
- /**
12982
- * Helper function to get an array with every modded pill effect.
12983
- *
12984
- * Returns an empty array if there are no modded pill effects.
12985
- *
12986
- * This function can only be called if at least one callback has been executed. This is because
12987
- * not all pill effects will necessarily be present when a mod first loads (due to mod load
12988
- * order).
12989
- *
12990
- * In order to use this function, you must upgrade your mod with
12991
- * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12992
- */
12993
- getModdedPillEffects(): PillEffect[];
12994
12883
  /**
12995
12884
  * Will change depending on how many modded pill effects there are.
12996
12885
  *
@@ -13016,37 +12905,43 @@ declare class ModdedElementDetection extends Feature {
13016
12905
  getNumModdedPillEffects(): int;
13017
12906
  }
13018
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
+ */
13019
12916
  declare class ModdedElementSets extends Feature {
13020
12917
  private arraysInitialized;
13021
12918
  private readonly allCollectibleTypesArray;
13022
12919
  private readonly allCollectibleTypesSet;
13023
- private readonly vanillaCollectibleTypesArray;
13024
- private readonly vanillaCollectibleTypesSet;
13025
12920
  private readonly moddedCollectibleTypesArray;
13026
12921
  private readonly moddedCollectibleTypesSet;
13027
12922
  private readonly allTrinketTypesArray;
13028
12923
  private readonly allTrinketTypesSet;
13029
- private readonly vanillaTrinketTypesArray;
13030
- private readonly vanillaTrinketTypesSet;
13031
12924
  private readonly moddedTrinketTypesArray;
13032
12925
  private readonly moddedTrinketTypesSet;
13033
12926
  private readonly allCardTypesArray;
13034
12927
  private readonly allCardTypesSet;
13035
- private readonly vanillaCardTypesArray;
13036
- private readonly vanillaCardTypesSet;
13037
12928
  private readonly moddedCardTypesArray;
13038
12929
  private readonly moddedCardTypesSet;
13039
- private readonly tagToCollectibleTypesMap;
12930
+ private readonly allPillEffectsArray;
12931
+ private readonly allPillEffectsSet;
12932
+ private readonly moddedPillEffectsArray;
12933
+ private readonly moddedPillEffectsSet;
13040
12934
  private readonly cacheFlagToCollectibleTypesMap;
13041
12935
  private readonly cacheFlagToTrinketTypesMap;
13042
12936
  private flyingCollectibleTypesSet;
13043
12937
  private readonly permanentFlyingCollectibleTypesSet;
13044
12938
  private flyingTrinketTypesSet;
12939
+ private readonly tagToCollectibleTypesMap;
13045
12940
  private readonly edenActiveCollectibleTypesSet;
13046
12941
  private readonly edenPassiveCollectibleTypesSet;
13047
12942
  private readonly itemConfigCardTypeToCardTypeMap;
13048
12943
  /**
13049
- * The set of cards that are not:
12944
+ * The set of card types that are not:
13050
12945
  *
13051
12946
  * - ItemConfigCardType.RUNE
13052
12947
  * - ItemConfigCardType.SPECIAL_OBJECT
@@ -13054,12 +12949,10 @@ declare class ModdedElementSets extends Feature {
13054
12949
  private readonly cardSet;
13055
12950
  private readonly moddedElementDetection;
13056
12951
  private lazyInit;
13057
- private lazyInitVanillaCollectibleTypes;
13058
12952
  private lazyInitModdedCollectibleTypes;
13059
- private lazyInitVanillaTrinketTypes;
13060
12953
  private lazyInitModdedTrinketTypes;
13061
- private lazyInitVanillaCardTypes;
13062
12954
  private lazyInitModdedCardTypes;
12955
+ private lazyInitModdedPillEffects;
13063
12956
  private lazyInitTagToCollectibleTypesMap;
13064
12957
  private lazyInitCacheFlagToCollectibleTypesMap;
13065
12958
  private lazyInitCacheFlagToTrinketTypesMap;
@@ -13068,250 +12961,246 @@ declare class ModdedElementSets extends Feature {
13068
12961
  private lazyInitEdenCollectibleTypesSet;
13069
12962
  private lazyInitCardTypes;
13070
12963
  /**
13071
- * Returns an array containing every valid card type in the game, including modded cards.
13072
- *
13073
- * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13074
- * use the `getCardSet` helper function instead.
13075
- *
13076
- * This function can only be called if at least one callback has been executed. This is because
13077
- * not all cards will necessarily be present when a mod first loads (due to mod load order).
13078
- *
13079
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13080
- */
13081
- getCardArray(): readonly CardType[];
13082
- /**
13083
- * 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.
13084
12966
  *
13085
- * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13086
- * 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.
13087
12969
  *
13088
12970
  * This function can only be called if at least one callback has been executed. This is because
13089
- * 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).
13090
12973
  *
13091
12974
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13092
12975
  */
13093
- getCardSet(): ReadonlySet<CardType>;
12976
+ getCollectibleTypes(): readonly CollectibleType[];
13094
12977
  /**
13095
- * 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.
13096
12980
  *
13097
- * This function is variadic, meaning that you can you can specify N card types to get a set
13098
- * 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.
13099
12983
  *
13100
12984
  * This function can only be called if at least one callback has been executed. This is because
13101
- * 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).
13102
12987
  *
13103
12988
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13104
12989
  */
13105
- getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
12990
+ getCollectibleTypeSet(): ReadonlySet<CollectibleType>;
13106
12991
  /**
13107
- * Returns an array containing every valid collectible type in the game, including modded
13108
- * collectibles.
12992
+ * Returns an array containing every modded collectible type in the game.
13109
12993
  *
13110
12994
  * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
13111
- * then use the `getCollectibleSet` helper function instead.
12995
+ * then use the `getModdedCollectibleTypesSet` helper function instead.
13112
12996
  *
13113
12997
  * This function can only be called if at least one callback has been executed. This is because
13114
- * 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
13115
12999
  * order).
13116
13000
  *
13117
13001
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13118
13002
  */
13119
- getCollectibleArray(): readonly CollectibleType[];
13003
+ getModdedCollectibleTypes(): readonly CollectibleType[];
13120
13004
  /**
13121
- * Returns a set containing every valid collectible type in the game, including modded
13122
- * collectibles.
13005
+ * Returns a set containing every modded collectible type in the game.
13123
13006
  *
13124
13007
  * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
13125
- * then use the `getCollectibleArray` helper function instead.
13008
+ * then use the `getModdedCollectibleTypes` helper function instead.
13126
13009
  *
13127
13010
  * This function can only be called if at least one callback has been executed. This is because
13128
- * 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
13129
13012
  * order).
13130
13013
  *
13131
13014
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13132
13015
  */
13133
- getCollectibleSet(): ReadonlySet<CollectibleType>;
13016
+ getModdedCollectibleTypesSet(): ReadonlySet<CollectibleType>;
13134
13017
  /**
13135
- * Helper function to get all of the collectible types in the game that count towards a particular
13136
- * transformation.
13018
+ * Iterates over every collectible in the game and returns a map containing the number of each
13019
+ * item that the player has.
13137
13020
  *
13138
- * For example, to get all of the collectible types that count towards Guppy:
13139
- *
13140
- * ```ts
13141
- * const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
13142
- * ```
13021
+ * Note that this will filter out non-real collectibles like Lilith's Incubus.
13143
13022
  *
13144
13023
  * 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
13024
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13146
13025
  * order).
13147
13026
  *
13148
13027
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13149
13028
  */
13150
- getCollectiblesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
13029
+ getPlayerCollectibleMap(player: EntityPlayer): Map<CollectibleType, int>;
13151
13030
  /**
13152
- * Returns a set containing every collectible type with the given cache flag, including modded
13153
- * collectibles.
13031
+ * Returns an array containing every modded trinket type in the game.
13154
13032
  *
13155
- * This function can only be called if at least one callback has been executed. This is because
13156
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13157
- * 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.
13158
13035
  *
13159
13036
  * This function can only be called if at least one callback has been executed. This is because
13160
- * 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
13161
13038
  * order).
13162
13039
  *
13163
13040
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13164
13041
  */
13165
- getCollectiblesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
13042
+ getTrinketTypes(): readonly TrinketType[];
13166
13043
  /**
13167
- * Returns a set containing every collectible type with the given tag.
13168
- *
13169
- * For example, to get all of the collectible types that count as offensive for the purposes of
13170
- * Tainted Lost:
13044
+ * Returns a set containing every modded trinket type in the game.
13171
13045
  *
13172
- * ```ts
13173
- * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
13174
- * ```
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.
13175
13048
  *
13176
13049
  * 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
13050
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13178
13051
  * order).
13179
13052
  *
13180
13053
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13181
13054
  */
13182
- getCollectiblesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
13055
+ getTrinketTypesSet(): ReadonlySet<TrinketType>;
13183
13056
  /**
13184
- * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13185
- * 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.
13186
13061
  *
13187
13062
  * 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
13063
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13189
13064
  * order).
13190
13065
  *
13191
13066
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13192
13067
  */
13193
- getEdenActiveCollectibles(): ReadonlySet<CollectibleType>;
13068
+ getModdedTrinketTypes(): readonly TrinketType[];
13194
13069
  /**
13195
- * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13196
- * 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.
13197
13074
  *
13198
13075
  * This function can only be called if at least one callback has been executed. This is because
13199
- * 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
13200
13077
  * order).
13201
13078
  *
13202
13079
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13203
13080
  */
13204
- getEdenPassiveCollectibles(): ReadonlySet<CollectibleType>;
13081
+ getModdedTrinketTypesSet(): ReadonlySet<TrinketType>;
13205
13082
  /**
13206
- * Returns a set of all of the collectibles that grant flight. This is derived from collectibles
13207
- * 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.
13208
13084
  *
13209
- * Collectibles that only grant flight conditionally are manually pruned. Collectibles such as
13210
- * 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.
13211
13087
  *
13212
13088
  * This function can only be called if at least one callback has been executed. This is because
13213
- * not all collectibles will necessarily be present when a mod first loads (due to mod load
13214
- * order).
13089
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13215
13090
  *
13216
13091
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13217
- *
13218
- * @param includeConditionalItems Whether collectibles that only grant flight conditionally should
13219
- * be included in the set (like Empty Vessel).
13220
13092
  */
13221
- getFlyingCollectibles(includeConditionalItems: boolean): ReadonlySet<CollectibleType>;
13093
+ getCardTypes(): readonly CardType[];
13222
13094
  /**
13223
- * Returns a set of all of the trinkets that grant flight. (All trinkets that grant flight do so
13224
- * 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.
13225
13099
  *
13226
13100
  * This function can only be called if at least one callback has been executed. This is because
13227
- * 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).
13228
13102
  *
13229
13103
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13230
13104
  */
13231
- getFlyingTrinkets(): ReadonlySet<TrinketType>;
13105
+ getCardTypesSet(): ReadonlySet<CardType>;
13232
13106
  /**
13233
13107
  * Returns an array containing every modded card type in the game.
13234
13108
  *
13235
13109
  * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13236
- * use the `getModdedCardSet` helper function instead.
13110
+ * use the `getModdedCardTypesSet` helper function instead.
13237
13111
  *
13238
13112
  * This function can only be called if at least one callback has been executed. This is because
13239
- * 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).
13240
13114
  *
13241
13115
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13242
13116
  */
13243
- getModdedCardArray(): readonly CardType[];
13117
+ getModdedCardTypes(): readonly CardType[];
13244
13118
  /**
13245
13119
  * Returns a set containing every modded card type in the game.
13246
13120
  *
13247
13121
  * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13248
- * use the `getModdedCardArray` helper function instead.
13122
+ * use the `getModdedCardTypes` helper function instead.
13249
13123
  *
13250
13124
  * This function can only be called if at least one callback has been executed. This is because
13251
- * 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).
13252
13126
  *
13253
13127
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13254
13128
  */
13255
- getModdedCardSet(): ReadonlySet<CardType>;
13129
+ getModdedCardTypesSet(): ReadonlySet<CardType>;
13256
13130
  /**
13257
- * 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.
13258
13132
  *
13259
- * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
13260
- * 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.
13261
13135
  *
13262
13136
  * This function can only be called if at least one callback has been executed. This is because
13263
- * 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
13264
13138
  * order).
13265
13139
  *
13266
13140
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13267
13141
  */
13268
- getModdedCollectibleArray(): readonly CollectibleType[];
13142
+ getPillEffects(): readonly PillEffect[];
13269
13143
  /**
13270
- * 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.
13271
13145
  *
13272
- * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
13273
- * 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.
13274
13148
  *
13275
13149
  * This function can only be called if at least one callback has been executed. This is because
13276
- * 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
13277
13151
  * order).
13278
13152
  *
13279
13153
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13280
13154
  */
13281
- getModdedCollectibleSet(): ReadonlySet<CollectibleType>;
13155
+ getPillEffectsSet(): ReadonlySet<PillEffect>;
13282
13156
  /**
13283
- * Returns an array containing every modded trinket type in the game.
13157
+ * Returns an array containing every modded pill effect in the game.
13284
13158
  *
13285
- * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13286
- * 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.
13287
13161
  *
13288
13162
  * This function can only be called if at least one callback has been executed. This is because
13289
- * 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).
13290
13165
  *
13291
13166
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13292
13167
  */
13293
- getModdedTrinketArray(): readonly TrinketType[];
13168
+ getModdedPillEffects(): readonly PillEffect[];
13294
13169
  /**
13295
- * Returns a set containing every modded trinket type in the game.
13170
+ * Returns a set containing every modded pill effect in the game.
13296
13171
  *
13297
- * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13298
- * 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.
13299
13174
  *
13300
13175
  * This function can only be called if at least one callback has been executed. This is because
13301
- * 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).
13302
13178
  *
13303
13179
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13304
13180
  */
13305
- getModdedTrinketSet(): ReadonlySet<TrinketType>;
13181
+ getModdedPillEffectsSet(): ReadonlySet<PillEffect>;
13306
13182
  /**
13307
- * Iterates over every item in the game and returns a map containing the number of each item that
13308
- * the player has.
13183
+ * Returns a set containing every collectible type with the given cache flag, including modded
13184
+ * collectibles.
13309
13185
  *
13310
- * 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).
13311
13189
  *
13312
13190
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13313
13191
  */
13314
- 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>;
13315
13204
  /**
13316
13205
  * Returns an array containing every collectible type that the player has that matches the
13317
13206
  * provided `CacheFlag`.
@@ -13331,187 +13220,226 @@ declare class ModdedElementSets extends Feature {
13331
13220
  * Lilith's Incubus.
13332
13221
  *
13333
13222
  * This function can only be called if at least one callback has been executed. This is because
13334
- * 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
13335
13224
  * order).
13336
13225
  *
13337
13226
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13338
13227
  */
13339
13228
  getPlayerCollectiblesWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): CollectibleType[];
13340
- /**
13341
- * Returns the number of items that a player has towards a particular transformation.
13342
- *
13343
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13344
- */
13345
- getPlayerCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): CollectibleType[];
13346
- /**
13347
- * Returns the number of items that a player has towards a particular transformation.
13348
- *
13349
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13350
- */
13351
- getPlayerCollectiblesForTransformation(player: EntityPlayer, playerForm: PlayerForm): CollectibleType[];
13352
13229
  /**
13353
13230
  * Returns a map containing every trinket type that the player has that matches the provided
13354
13231
  * `CacheFlag`. The values of the map correspond to the multiplier for that trinket.
13355
13232
  *
13356
13233
  * This function can only be called if at least one callback has been executed. This is because
13357
- * 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).
13358
13236
  *
13359
13237
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13360
13238
  */
13361
13239
  getPlayerTrinketsWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): Map<TrinketType, int>;
13362
13240
  /**
13363
- * 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.
13364
13243
  *
13365
- * This will not return:
13366
- * - any runes
13367
- * - 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).
13368
13255
  *
13369
13256
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13370
13257
  *
13371
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13372
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13373
- * @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).
13374
13260
  */
13375
- getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13261
+ getFlyingCollectibleTypes(includeConditionalItems: boolean): ReadonlySet<CollectibleType>;
13376
13262
  /**
13377
- * 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.)
13378
13265
  *
13379
- * 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.)
13380
13269
  *
13381
- * @param itemConfigCardType The item config card type that represents the pool of cards to select
13382
- * from.
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 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`.
13386
13275
  */
13387
- getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13276
+ getFlyingTrinketTypes(): ReadonlySet<TrinketType>;
13388
13277
  /**
13389
- * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
13390
- * of Isaac, etc.). This will never return a Rune Shard.
13278
+ * Returns a set containing every collectible type with the given tag.
13391
13279
  *
13392
- * 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:
13393
13282
  *
13394
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13395
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13396
- * @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`.
13397
13292
  */
13398
- getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13293
+ getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
13399
13294
  /**
13400
- * 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.
13401
13296
  *
13402
13297
  * This function can only be called if at least one callback has been executed. This is because
13403
- * 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
13404
13299
  * order).
13405
13300
  *
13406
13301
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13407
- *
13408
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13409
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13410
- * @param exceptions Optional. An array of runes to not select.
13411
13302
  */
13412
- getRandomEdenActiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13303
+ getPlayerCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): CollectibleType[];
13413
13304
  /**
13414
- * 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
+ * ```
13415
13313
  *
13416
13314
  * This function can only be called if at least one callback has been executed. This is because
13417
- * 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
13418
13316
  * order).
13419
13317
  *
13420
13318
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13421
- *
13422
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13423
- * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13424
- * @param exceptions Optional. An array of runes to not select.
13425
13319
  */
13426
- getRandomEdenPassiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13320
+ getCollectibleTypesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
13427
13321
  /**
13428
- * Returns an array containing every modded trinket type in the game.
13429
- *
13430
- * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13431
- * then use the `getModdedTrinketSet` helper function instead.
13322
+ * Returns the number of items that a player has towards a particular transformation.
13432
13323
  *
13433
13324
  * This function can only be called if at least one callback has been executed. This is because
13434
- * 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).
13435
13327
  *
13436
13328
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13437
13329
  */
13438
- getTrinketArray(): readonly TrinketType[];
13330
+ getPlayerCollectiblesForTransformation(player: EntityPlayer, playerForm: PlayerForm): CollectibleType[];
13439
13331
  /**
13440
- * 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.
13441
13334
  *
13442
- * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13443
- * then use the `getModdedTrinketArray` helper function instead.
13335
+ * Under the hood, this is determined by looking at the "noeden" tag in "items_metadata.xml".
13444
13336
  *
13445
13337
  * This function can only be called if at least one callback has been executed. This is because
13446
- * 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).
13447
13340
  *
13448
13341
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13449
13342
  */
13450
- getTrinketSet(): ReadonlySet<TrinketType>;
13343
+ getEdenActiveCollectibleTypes(): ReadonlySet<CollectibleType>;
13451
13344
  /**
13452
- * Returns a set containing every trinket type with the given cache flag, including modded
13453
- * 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".
13454
13349
  *
13455
13350
  * This function can only be called if at least one callback has been executed. This is because
13456
- * 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).
13457
13353
  *
13458
13354
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13459
13355
  */
13460
- getTrinketsWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
13356
+ getEdenPassiveCollectibleTypes(): ReadonlySet<CollectibleType>;
13461
13357
  /**
13462
- * 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.
13463
13359
  *
13464
- * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13465
- * 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).
13466
13363
  *
13467
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.
13468
13369
  */
13469
- getVanillaCardArray(): readonly CardType[];
13370
+ getRandomEdenActiveCollectibleType(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13470
13371
  /**
13471
- * 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.
13472
13373
  *
13473
- * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13474
- * 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).
13475
13377
  *
13476
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.
13477
13383
  */
13478
- getVanillaCardSet(): ReadonlySet<CardType>;
13384
+ getRandomEdenPassiveCollectibleType(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13479
13385
  /**
13480
- * 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`.
13481
13387
  *
13482
- * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
13483
- * 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).
13484
13393
  *
13485
13394
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13486
13395
  */
13487
- getVanillaCollectibleArray(): readonly CollectibleType[];
13396
+ getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
13488
13397
  /**
13489
- * 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`.
13490
13399
  *
13491
- * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
13492
- * 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).
13493
13402
  *
13494
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.
13495
13410
  */
13496
- getVanillaCollectibleSet(): ReadonlySet<CollectibleType>;
13411
+ getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13497
13412
  /**
13498
- * 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.).
13499
13414
  *
13500
- * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13501
- * 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).
13502
13421
  *
13503
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.
13504
13427
  */
13505
- getVanillaTrinketArray(): readonly TrinketType[];
13428
+ getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13506
13429
  /**
13507
- * 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.
13508
13432
  *
13509
- * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13510
- * 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).
13511
13435
  *
13512
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.
13513
13441
  */
13514
- getVanillaTrinketSet(): ReadonlySet<TrinketType>;
13442
+ getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13515
13443
  }
13516
13444
 
13517
13445
  /**
@@ -13889,6 +13817,10 @@ declare class NoSirenSteal extends Feature {
13889
13817
  setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant, familiarSubType?: int): void;
13890
13818
  }
13891
13819
 
13820
+ /**
13821
+ * The number of dimensions, not including `Dimension.CURRENT`. (This is derived from the
13822
+ * `Dimension` enum.)
13823
+ */
13892
13824
  export declare const NUM_DIMENSIONS: number;
13893
13825
 
13894
13826
  export declare const NUM_NORMAL_PILL_COLORS: number;
@@ -13897,7 +13829,7 @@ export declare const NUM_NORMAL_PILL_COLORS: number;
13897
13829
  * The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
13898
13830
  * horse pills.)
13899
13831
  */
13900
- export declare const NUM_PILLS_IN_POOL: number;
13832
+ export declare const NUM_PILL_COLORS_IN_POOL: number;
13901
13833
 
13902
13834
  /** Calculated from the `Card` enum. `Card.NULL` is not included. */
13903
13835
  export declare const NUM_VANILLA_CARD_TYPES: number;
@@ -17751,6 +17683,104 @@ export declare function validateEnumContiguous<T>(transpiledEnumName: string, tr
17751
17683
  */
17752
17684
  export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
17753
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
+
17754
17784
  /**
17755
17785
  * Helper function to compare two vectors for equality.
17756
17786
  *