isaacscript-common 40.0.0 → 41.1.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 (61) hide show
  1. package/dist/index.rollup.d.ts +363 -335
  2. package/dist/isaacscript-common.lua +463 -461
  3. package/dist/lualib_bundle.lua +61 -56
  4. package/dist/src/classes/features/other/FlyingDetection.lua +2 -2
  5. package/dist/src/classes/features/other/ItemPoolDetection.lua +2 -2
  6. package/dist/src/classes/features/other/ModdedElementDetection.d.ts +0 -86
  7. package/dist/src/classes/features/other/ModdedElementDetection.d.ts.map +1 -1
  8. package/dist/src/classes/features/other/ModdedElementDetection.lua +1 -57
  9. package/dist/src/classes/features/other/ModdedElementSets.d.ts +250 -210
  10. package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  11. package/dist/src/classes/features/other/ModdedElementSets.lua +285 -284
  12. package/dist/src/core/constants.d.ts +13 -2
  13. package/dist/src/core/constants.d.ts.map +1 -1
  14. package/dist/src/core/constants.lua +28 -1
  15. package/dist/src/core/constantsFirstLast.d.ts +5 -0
  16. package/dist/src/core/constantsFirstLast.d.ts.map +1 -1
  17. package/dist/src/core/constantsVanilla.d.ts +93 -0
  18. package/dist/src/core/constantsVanilla.d.ts.map +1 -0
  19. package/dist/src/core/constantsVanilla.lua +115 -0
  20. package/dist/src/core/upgradeMod.lua +3 -0
  21. package/dist/src/functions/cards.d.ts +0 -7
  22. package/dist/src/functions/cards.d.ts.map +1 -1
  23. package/dist/src/functions/cards.lua +0 -10
  24. package/dist/src/functions/collectibles.d.ts +0 -10
  25. package/dist/src/functions/collectibles.d.ts.map +1 -1
  26. package/dist/src/functions/collectibles.lua +0 -13
  27. package/dist/src/functions/dimensions.d.ts +0 -4
  28. package/dist/src/functions/dimensions.d.ts.map +1 -1
  29. package/dist/src/functions/dimensions.lua +2 -8
  30. package/dist/src/functions/pickups.lua +3 -3
  31. package/dist/src/functions/pills.d.ts +0 -2
  32. package/dist/src/functions/pills.d.ts.map +1 -1
  33. package/dist/src/functions/pills.lua +0 -5
  34. package/dist/src/functions/rooms.lua +2 -2
  35. package/dist/src/functions/trinkets.d.ts +0 -9
  36. package/dist/src/functions/trinkets.d.ts.map +1 -1
  37. package/dist/src/functions/trinkets.lua +0 -12
  38. package/dist/src/index.d.ts +1 -0
  39. package/dist/src/index.d.ts.map +1 -1
  40. package/dist/src/index.lua +8 -0
  41. package/package.json +1 -1
  42. package/src/classes/features/other/FlyingDetection.ts +2 -2
  43. package/src/classes/features/other/ItemPoolDetection.ts +2 -2
  44. package/src/classes/features/other/ModdedElementDetection.ts +4 -156
  45. package/src/classes/features/other/ModdedElementSets.ts +552 -486
  46. package/src/core/constants.ts +36 -2
  47. package/src/core/constantsFirstLast.ts +5 -1
  48. package/src/core/constantsVanilla.ts +183 -0
  49. package/src/core/upgradeMod.ts +6 -1
  50. package/src/functions/cards.ts +1 -15
  51. package/src/functions/collectibles.ts +1 -18
  52. package/src/functions/dimensions.ts +2 -10
  53. package/src/functions/pickups.ts +2 -2
  54. package/src/functions/pills.ts +0 -6
  55. package/src/functions/rooms.ts +3 -3
  56. package/src/functions/trinkets.ts +1 -17
  57. package/src/index.ts +1 -0
  58. package/dist/src/sets/chestPickupVariantsSet.d.ts +0 -3
  59. package/dist/src/sets/chestPickupVariantsSet.d.ts.map +0 -1
  60. package/dist/src/sets/chestPickupVariantsSet.lua +0 -22
  61. package/src/sets/chestPickupVariantsSet.ts +0 -17
@@ -56,7 +56,7 @@ import type { Music } from 'isaac-typescript-definitions';
56
56
  import type { NPCState } from 'isaac-typescript-definitions';
57
57
  import { NullItemID } from 'isaac-typescript-definitions';
58
58
  import { PickupPrice } from 'isaac-typescript-definitions';
59
- import type { PickupVariant } from 'isaac-typescript-definitions';
59
+ import { PickupVariant } from 'isaac-typescript-definitions';
60
60
  import { PillColor } from 'isaac-typescript-definitions';
61
61
  import { PillEffect } from 'isaac-typescript-definitions';
62
62
  import { PitVariant } from 'isaac-typescript-definitions';
@@ -1517,6 +1517,10 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: Col
1517
1517
  */
1518
1518
  export declare function checkFamiliarFromCollectibles(player: EntityPlayer, collectibleType: CollectibleType, familiarVariant: FamiliarVariant, familiarSubType?: int): void;
1519
1519
 
1520
+ export declare const CHEST_PICKUP_VARIANTS: readonly [PickupVariant.CHEST, PickupVariant.BOMB_CHEST, PickupVariant.SPIKED_CHEST, PickupVariant.ETERNAL_CHEST, PickupVariant.MIMIC_CHEST, PickupVariant.OLD_CHEST, PickupVariant.WOODEN_CHEST, PickupVariant.MEGA_CHEST, PickupVariant.HAUNTED_CHEST, PickupVariant.LOCKED_CHEST, PickupVariant.RED_CHEST, PickupVariant.MOMS_CHEST];
1521
+
1522
+ export declare const CHEST_PICKUP_VARIANTS_SET: ReadonlySet<PickupVariant>;
1523
+
1520
1524
  /**
1521
1525
  * Helper function to normalize a number, ensuring that it is within a certain range.
1522
1526
  *
@@ -3584,6 +3588,12 @@ export declare function deserializeVector(vector: SerializedVector): Vector;
3584
3588
  /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76). */
3585
3589
  export declare const DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75;
3586
3590
 
3591
+ /**
3592
+ * An array containing every valid `Dimension`, not including `Dimension.CURRENT`. (This is derived
3593
+ * from the `NUM_DIMENSIONS` constant.)
3594
+ */
3595
+ export declare const DIMENSIONS: readonly Dimension[];
3596
+
3587
3597
  /**
3588
3598
  * Helper function to convert a direction to degrees. For example, `Direction.LEFT` (0) would return
3589
3599
  * 180 and `Direction.RIGHT` (2) would return 0. (This corresponds to how the
@@ -4695,11 +4705,6 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
4695
4705
  */
4696
4706
  export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<string>;
4697
4707
 
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
4708
  /**
4704
4709
  * Helper function to get every legal grid index for the current room.
4705
4710
  *
@@ -7510,38 +7515,6 @@ export declare function getUnusedDoorSlots(): DoorSlot[];
7510
7515
  */
7511
7516
  export declare function getUsableActiveItemSlots(player: EntityPlayer, collectibleType: CollectibleType): ActiveSlot[];
7512
7517
 
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
7518
  /**
7546
7519
  * Get how many hearts are currently being shown on the hearts UI.
7547
7520
  *
@@ -12765,27 +12738,6 @@ declare class ModdedElementDetection extends Feature {
12765
12738
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12766
12739
  */
12767
12740
  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
12741
  /**
12790
12742
  * Returns the total number of collectibles in the item config, including both vanilla and modded
12791
12743
  * items. If you just need the number of vanilla collectible types, use the
@@ -12836,24 +12788,6 @@ declare class ModdedElementDetection extends Feature {
12836
12788
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12837
12789
  */
12838
12790
  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
12791
  /**
12858
12792
  * Returns the total number of trinkets in the item config, including both vanilla and modded
12859
12793
  * items. If you just need the number of vanilla trinket types, use the
@@ -12876,16 +12810,6 @@ declare class ModdedElementDetection extends Feature {
12876
12810
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12877
12811
  */
12878
12812
  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
12813
  /**
12890
12814
  * Returns the first modded card sub-type, or undefined if there are no modded cards.
12891
12815
  *
@@ -12909,18 +12833,6 @@ declare class ModdedElementDetection extends Feature {
12909
12833
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12910
12834
  */
12911
12835
  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
12836
  /**
12925
12837
  * Will change depending on how many modded cards there are.
12926
12838
  *
@@ -12941,18 +12853,6 @@ declare class ModdedElementDetection extends Feature {
12941
12853
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12942
12854
  */
12943
12855
  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
12856
  /**
12957
12857
  * Returns the first modded pill effect, or undefined if there are no modded pill effects.
12958
12858
  *
@@ -12978,19 +12878,6 @@ declare class ModdedElementDetection extends Feature {
12978
12878
  * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12979
12879
  */
12980
12880
  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
12881
  /**
12995
12882
  * Will change depending on how many modded pill effects there are.
12996
12883
  *
@@ -13016,37 +12903,43 @@ declare class ModdedElementDetection extends Feature {
13016
12903
  getNumModdedPillEffects(): int;
13017
12904
  }
13018
12905
 
12906
+ /**
12907
+ * A feature that lazy-inits and caches various arrays and sets that include both vanilla and modded
12908
+ * elements. This is useful for performance purposes (so that we do not have to reconstruct the
12909
+ * arrays/sets multiple times).
12910
+ *
12911
+ * The modded arrays/sets are created using the functions from
12912
+ * `ISCFeature.MODDED_ELEMENT_DETECTION`.
12913
+ */
13019
12914
  declare class ModdedElementSets extends Feature {
13020
12915
  private arraysInitialized;
13021
12916
  private readonly allCollectibleTypesArray;
13022
12917
  private readonly allCollectibleTypesSet;
13023
- private readonly vanillaCollectibleTypesArray;
13024
- private readonly vanillaCollectibleTypesSet;
13025
12918
  private readonly moddedCollectibleTypesArray;
13026
12919
  private readonly moddedCollectibleTypesSet;
13027
12920
  private readonly allTrinketTypesArray;
13028
12921
  private readonly allTrinketTypesSet;
13029
- private readonly vanillaTrinketTypesArray;
13030
- private readonly vanillaTrinketTypesSet;
13031
12922
  private readonly moddedTrinketTypesArray;
13032
12923
  private readonly moddedTrinketTypesSet;
13033
12924
  private readonly allCardTypesArray;
13034
12925
  private readonly allCardTypesSet;
13035
- private readonly vanillaCardTypesArray;
13036
- private readonly vanillaCardTypesSet;
13037
12926
  private readonly moddedCardTypesArray;
13038
12927
  private readonly moddedCardTypesSet;
13039
- private readonly tagToCollectibleTypesMap;
12928
+ private readonly allPillEffectsArray;
12929
+ private readonly allPillEffectsSet;
12930
+ private readonly moddedPillEffectsArray;
12931
+ private readonly moddedPillEffectsSet;
13040
12932
  private readonly cacheFlagToCollectibleTypesMap;
13041
12933
  private readonly cacheFlagToTrinketTypesMap;
13042
12934
  private flyingCollectibleTypesSet;
13043
12935
  private readonly permanentFlyingCollectibleTypesSet;
13044
12936
  private flyingTrinketTypesSet;
12937
+ private readonly tagToCollectibleTypesMap;
13045
12938
  private readonly edenActiveCollectibleTypesSet;
13046
12939
  private readonly edenPassiveCollectibleTypesSet;
13047
12940
  private readonly itemConfigCardTypeToCardTypeMap;
13048
12941
  /**
13049
- * The set of cards that are not:
12942
+ * The set of card types that are not:
13050
12943
  *
13051
12944
  * - ItemConfigCardType.RUNE
13052
12945
  * - ItemConfigCardType.SPECIAL_OBJECT
@@ -13054,12 +12947,10 @@ declare class ModdedElementSets extends Feature {
13054
12947
  private readonly cardSet;
13055
12948
  private readonly moddedElementDetection;
13056
12949
  private lazyInit;
13057
- private lazyInitVanillaCollectibleTypes;
13058
12950
  private lazyInitModdedCollectibleTypes;
13059
- private lazyInitVanillaTrinketTypes;
13060
12951
  private lazyInitModdedTrinketTypes;
13061
- private lazyInitVanillaCardTypes;
13062
12952
  private lazyInitModdedCardTypes;
12953
+ private lazyInitModdedPillEffects;
13063
12954
  private lazyInitTagToCollectibleTypesMap;
13064
12955
  private lazyInitCacheFlagToCollectibleTypesMap;
13065
12956
  private lazyInitCacheFlagToTrinketTypesMap;
@@ -13068,250 +12959,246 @@ declare class ModdedElementSets extends Feature {
13068
12959
  private lazyInitEdenCollectibleTypesSet;
13069
12960
  private lazyInitCardTypes;
13070
12961
  /**
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.
12962
+ * Returns an array containing every valid collectible type in the game, including modded
12963
+ * collectibles.
13084
12964
  *
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.
12965
+ * Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
12966
+ * then use the `getCollectibleTypesSet` helper function instead.
13087
12967
  *
13088
12968
  * 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).
12969
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
12970
+ * order).
13090
12971
  *
13091
12972
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13092
12973
  */
13093
- getCardSet(): ReadonlySet<CardType>;
12974
+ getCollectibleTypes(): readonly CollectibleType[];
13094
12975
  /**
13095
- * Helper function to get a set of card types matching the `ItemConfigCardType`.
12976
+ * Returns a set containing every valid collectible type in the game, including modded
12977
+ * collectibles.
13096
12978
  *
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.
12979
+ * Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
12980
+ * then use the `getCollectibleTypes` helper function instead.
13099
12981
  *
13100
12982
  * 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).
12983
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
12984
+ * order).
13102
12985
  *
13103
12986
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13104
12987
  */
13105
- getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
12988
+ getCollectibleTypeSet(): ReadonlySet<CollectibleType>;
13106
12989
  /**
13107
- * Returns an array containing every valid collectible type in the game, including modded
13108
- * collectibles.
12990
+ * Returns an array containing every modded collectible type in the game.
13109
12991
  *
13110
12992
  * 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.
12993
+ * then use the `getModdedCollectibleTypesSet` helper function instead.
13112
12994
  *
13113
12995
  * 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
12996
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13115
12997
  * order).
13116
12998
  *
13117
12999
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13118
13000
  */
13119
- getCollectibleArray(): readonly CollectibleType[];
13001
+ getModdedCollectibleTypes(): readonly CollectibleType[];
13120
13002
  /**
13121
- * Returns a set containing every valid collectible type in the game, including modded
13122
- * collectibles.
13003
+ * Returns a set containing every modded collectible type in the game.
13123
13004
  *
13124
13005
  * 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.
13006
+ * then use the `getModdedCollectibleTypes` helper function instead.
13126
13007
  *
13127
13008
  * 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
13009
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13129
13010
  * order).
13130
13011
  *
13131
13012
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13132
13013
  */
13133
- getCollectibleSet(): ReadonlySet<CollectibleType>;
13014
+ getModdedCollectibleTypesSet(): ReadonlySet<CollectibleType>;
13134
13015
  /**
13135
- * Helper function to get all of the collectible types in the game that count towards a particular
13136
- * transformation.
13016
+ * Iterates over every collectible in the game and returns a map containing the number of each
13017
+ * item that the player has.
13137
13018
  *
13138
- * For example, to get all of the collectible types that count towards Guppy:
13139
- *
13140
- * ```ts
13141
- * const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
13142
- * ```
13019
+ * Note that this will filter out non-real collectibles like Lilith's Incubus.
13143
13020
  *
13144
13021
  * 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
13022
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13146
13023
  * order).
13147
13024
  *
13148
13025
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13149
13026
  */
13150
- getCollectiblesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
13027
+ getPlayerCollectibleMap(player: EntityPlayer): Map<CollectibleType, int>;
13151
13028
  /**
13152
- * Returns a set containing every collectible type with the given cache flag, including modded
13153
- * collectibles.
13029
+ * Returns an array containing every modded trinket type in the game.
13154
13030
  *
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).
13031
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13032
+ * then use the `getModdedTrinketTypesSet` helper function instead.
13158
13033
  *
13159
13034
  * 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
13035
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13161
13036
  * order).
13162
13037
  *
13163
13038
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13164
13039
  */
13165
- getCollectiblesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
13040
+ getTrinketTypes(): readonly TrinketType[];
13166
13041
  /**
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:
13042
+ * Returns a set containing every modded trinket type in the game.
13171
13043
  *
13172
- * ```ts
13173
- * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
13174
- * ```
13044
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13045
+ * then use the `getModdedTrinketTypes` helper function instead.
13175
13046
  *
13176
13047
  * 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
13048
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13178
13049
  * order).
13179
13050
  *
13180
13051
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13181
13052
  */
13182
- getCollectiblesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
13053
+ getTrinketTypesSet(): ReadonlySet<TrinketType>;
13183
13054
  /**
13184
- * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13185
- * starting item.
13055
+ * Returns an array containing every modded trinket type in the game.
13056
+ *
13057
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
13058
+ * then use the `getModdedTrinketTypesSet` helper function instead.
13186
13059
  *
13187
13060
  * 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
13061
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13189
13062
  * order).
13190
13063
  *
13191
13064
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13192
13065
  */
13193
- getEdenActiveCollectibles(): ReadonlySet<CollectibleType>;
13066
+ getModdedTrinketTypes(): readonly TrinketType[];
13194
13067
  /**
13195
- * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13196
- * starting item.
13068
+ * Returns a set containing every modded trinket type in the game.
13069
+ *
13070
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
13071
+ * then use the `getModdedTrinketTypes` helper function instead.
13197
13072
  *
13198
13073
  * 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
13074
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13200
13075
  * order).
13201
13076
  *
13202
13077
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13203
13078
  */
13204
- getEdenPassiveCollectibles(): ReadonlySet<CollectibleType>;
13079
+ getModdedTrinketTypesSet(): ReadonlySet<TrinketType>;
13205
13080
  /**
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.
13081
+ * Returns an array containing every valid card type in the game, including modded cards.
13208
13082
  *
13209
- * Collectibles that only grant flight conditionally are manually pruned. Collectibles such as
13210
- * Empty Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
13083
+ * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
13084
+ * use the `getCardTypesSet` helper function instead.
13211
13085
  *
13212
13086
  * 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).
13087
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13215
13088
  *
13216
13089
  * 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
13090
  */
13221
- getFlyingCollectibles(includeConditionalItems: boolean): ReadonlySet<CollectibleType>;
13091
+ getCardTypes(): readonly CardType[];
13222
13092
  /**
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.)
13093
+ * Returns a set containing every valid card type in the game, including modded cards.
13094
+ *
13095
+ * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
13096
+ * use the `getCardTypes` helper function instead.
13225
13097
  *
13226
13098
  * 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).
13099
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13228
13100
  *
13229
13101
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13230
13102
  */
13231
- getFlyingTrinkets(): ReadonlySet<TrinketType>;
13103
+ getCardTypesSet(): ReadonlySet<CardType>;
13232
13104
  /**
13233
13105
  * Returns an array containing every modded card type in the game.
13234
13106
  *
13235
13107
  * 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.
13108
+ * use the `getModdedCardTypesSet` helper function instead.
13237
13109
  *
13238
13110
  * 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).
13111
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13240
13112
  *
13241
13113
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13242
13114
  */
13243
- getModdedCardArray(): readonly CardType[];
13115
+ getModdedCardTypes(): readonly CardType[];
13244
13116
  /**
13245
13117
  * Returns a set containing every modded card type in the game.
13246
13118
  *
13247
13119
  * 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.
13120
+ * use the `getModdedCardTypes` helper function instead.
13249
13121
  *
13250
13122
  * 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).
13123
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13252
13124
  *
13253
13125
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13254
13126
  */
13255
- getModdedCardSet(): ReadonlySet<CardType>;
13127
+ getModdedCardTypesSet(): ReadonlySet<CardType>;
13256
13128
  /**
13257
- * Returns an array containing every modded collectible type in the game.
13129
+ * Returns an array containing every valid pill effect in the game, including modded pill effects.
13258
13130
  *
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.
13131
+ * Use this if you need to iterate over the pill effects in order. If you need to do O(1) lookups,
13132
+ * then use the `getPillEffectSet` helper function instead.
13261
13133
  *
13262
13134
  * 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
13135
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13264
13136
  * order).
13265
13137
  *
13266
13138
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13267
13139
  */
13268
- getModdedCollectibleArray(): readonly CollectibleType[];
13140
+ getPillEffects(): readonly PillEffect[];
13269
13141
  /**
13270
- * Returns a set containing every modded collectible type in the game.
13142
+ * Returns a set containing every valid pill effect in the game, including modded pill effects.
13271
13143
  *
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.
13144
+ * Use this if you need to do O(1) lookups. If you need to iterate over the pill effects in order,
13145
+ * then use the `getPillEffects` helper function instead.
13274
13146
  *
13275
13147
  * 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
13148
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13277
13149
  * order).
13278
13150
  *
13279
13151
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13280
13152
  */
13281
- getModdedCollectibleSet(): ReadonlySet<CollectibleType>;
13153
+ getPillEffectsSet(): ReadonlySet<PillEffect>;
13282
13154
  /**
13283
- * Returns an array containing every modded trinket type in the game.
13155
+ * Returns an array containing every modded pill effect in the game.
13284
13156
  *
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.
13157
+ * Use this if you need to iterate over the pill effects in order. If you need to do O(1) lookups,
13158
+ * then use the `getModdedPillEffectsSet` helper function instead.
13287
13159
  *
13288
13160
  * 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).
13161
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13162
+ * order).
13290
13163
  *
13291
13164
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13292
13165
  */
13293
- getModdedTrinketArray(): readonly TrinketType[];
13166
+ getModdedPillEffects(): readonly PillEffect[];
13294
13167
  /**
13295
- * Returns a set containing every modded trinket type in the game.
13168
+ * Returns a set containing every modded pill effect in the game.
13296
13169
  *
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.
13170
+ * Use this if you need to do O(1) lookups. If you need to iterate over the pill effects in order,
13171
+ * then use the `getModdedPillEffects` helper function instead.
13299
13172
  *
13300
13173
  * 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).
13174
+ * not all pill effects will necessarily be present when a mod first loads (due to mod load
13175
+ * order).
13302
13176
  *
13303
13177
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13304
13178
  */
13305
- getModdedTrinketSet(): ReadonlySet<TrinketType>;
13179
+ getModdedPillEffectsSet(): ReadonlySet<PillEffect>;
13306
13180
  /**
13307
- * Iterates over every item in the game and returns a map containing the number of each item that
13308
- * the player has.
13181
+ * Returns a set containing every collectible type with the given cache flag, including modded
13182
+ * collectibles.
13309
13183
  *
13310
- * Note that this will filter out non-real collectibles like Lilith's Incubus.
13184
+ * This function can only be called if at least one callback has been executed. This is because
13185
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13186
+ * order).
13311
13187
  *
13312
13188
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13313
13189
  */
13314
- getPlayerCollectibleMap(player: EntityPlayer): Map<CollectibleType, int>;
13190
+ getCollectibleTypesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
13191
+ /**
13192
+ * Returns a set containing every trinket type with the given cache flag, including modded
13193
+ * trinkets.
13194
+ *
13195
+ * This function can only be called if at least one callback has been executed. This is because
13196
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13197
+ * order).
13198
+ *
13199
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13200
+ */
13201
+ getTrinketsTypesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
13315
13202
  /**
13316
13203
  * Returns an array containing every collectible type that the player has that matches the
13317
13204
  * provided `CacheFlag`.
@@ -13331,187 +13218,226 @@ declare class ModdedElementSets extends Feature {
13331
13218
  * Lilith's Incubus.
13332
13219
  *
13333
13220
  * 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
13221
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13335
13222
  * order).
13336
13223
  *
13337
13224
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13338
13225
  */
13339
13226
  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
13227
  /**
13353
13228
  * Returns a map containing every trinket type that the player has that matches the provided
13354
13229
  * `CacheFlag`. The values of the map correspond to the multiplier for that trinket.
13355
13230
  *
13356
13231
  * 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).
13232
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13233
+ * order).
13358
13234
  *
13359
13235
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13360
13236
  */
13361
13237
  getPlayerTrinketsWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): Map<TrinketType, int>;
13362
13238
  /**
13363
- * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
13239
+ * Returns a set of all of the collectibles that grant flight. This is derived from collectibles
13240
+ * that have `CacheFlag.FLYING` set in the "items.xml" file.
13364
13241
  *
13365
- * This will not return:
13366
- * - any runes
13367
- * - any objects like Dice Shard
13242
+ * Vanilla collectibles that only grant flight conditionally are manually pruned. Collectibles
13243
+ * such as Empty Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
13244
+ *
13245
+ * Under the hood, this is determined by looking at the collectibles that have `CacheFlag.FLYING`
13246
+ * and excluding the ones that have `CacheFlag.ALL`. (None of the collectibles with
13247
+ * `CacheFlag.ALL` grant flying, including all of the 3 Dollar Bill collectibles and all of the
13248
+ * Birthright effects.)
13249
+ *
13250
+ * This function can only be called if at least one callback has been executed. This is because
13251
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13252
+ * order).
13368
13253
  *
13369
13254
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13370
13255
  *
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.
13256
+ * @param includeConditionalItems Whether collectibles that only grant flight conditionally should
13257
+ * be included in the set (like Empty Vessel).
13374
13258
  */
13375
- getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13259
+ getFlyingCollectibleTypes(includeConditionalItems: boolean): ReadonlySet<CollectibleType>;
13376
13260
  /**
13377
- * Helper function to get a random card type that matches the provided `ItemConfigCardType`.
13261
+ * Returns a set of all of the trinkets that grant flight. (All vanilla trinkets that grant flight
13262
+ * do so conditionally, like Bat Wing and Azazel's Stump.)
13378
13263
  *
13379
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13264
+ * Under the hood, this is determined by looking at the trinkets that have `CacheFlag.FLYING` and
13265
+ * excluding the ones that have `CacheFlag.ALL`. (None of the trinket with `CacheFlag.ALL` grant
13266
+ * flying except for Azazel's Stump.)
13380
13267
  *
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.
13268
+ * This function can only be called if at least one callback has been executed. This is because
13269
+ * not all trinket types will necessarily be present when a mod first loads (due to mod load
13270
+ * order).
13271
+ *
13272
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13386
13273
  */
13387
- getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13274
+ getFlyingTrinketTypes(): ReadonlySet<TrinketType>;
13388
13275
  /**
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.
13276
+ * Returns a set containing every collectible type with the given tag.
13391
13277
  *
13392
- * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13278
+ * For example, to get all of the collectible types that count as offensive for the purposes of
13279
+ * Tainted Lost:
13393
13280
  *
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.
13281
+ * ```ts
13282
+ * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
13283
+ * ```
13284
+ *
13285
+ * This function can only be called if at least one callback has been executed. This is because
13286
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13287
+ * order).
13288
+ *
13289
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13397
13290
  */
13398
- getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13291
+ getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
13399
13292
  /**
13400
- * Returns a random active collectible type that that is a valid starting item for Eden.
13293
+ * Returns the number of items that a player has towards a particular transformation.
13401
13294
  *
13402
13295
  * 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
13296
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13404
13297
  * order).
13405
13298
  *
13406
13299
  * 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
13300
  */
13412
- getRandomEdenActiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13301
+ getPlayerCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): CollectibleType[];
13413
13302
  /**
13414
- * Returns a random passive collectible type that that is a valid starting item for Eden.
13303
+ * Helper function to get all of the collectible types in the game that count towards a particular
13304
+ * transformation.
13305
+ *
13306
+ * For example, to get all of the collectible types that count towards Guppy:
13307
+ *
13308
+ * ```ts
13309
+ * const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
13310
+ * ```
13415
13311
  *
13416
13312
  * 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
13313
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13418
13314
  * order).
13419
13315
  *
13420
13316
  * 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
13317
  */
13426
- getRandomEdenPassiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13318
+ getCollectibleTypesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
13427
13319
  /**
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.
13320
+ * Returns the number of items that a player has towards a particular transformation.
13432
13321
  *
13433
13322
  * 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).
13323
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13324
+ * order).
13435
13325
  *
13436
13326
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13437
13327
  */
13438
- getTrinketArray(): readonly TrinketType[];
13328
+ getPlayerCollectiblesForTransformation(player: EntityPlayer, playerForm: PlayerForm): CollectibleType[];
13439
13329
  /**
13440
- * Returns a set containing every modded trinket type in the game.
13330
+ * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13331
+ * starting item.
13441
13332
  *
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.
13333
+ * Under the hood, this is determined by looking at the "noeden" tag in "items_metadata.xml".
13444
13334
  *
13445
13335
  * 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).
13336
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13337
+ * order).
13447
13338
  *
13448
13339
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13449
13340
  */
13450
- getTrinketSet(): ReadonlySet<TrinketType>;
13341
+ getEdenActiveCollectibleTypes(): ReadonlySet<CollectibleType>;
13451
13342
  /**
13452
- * Returns a set containing every trinket type with the given cache flag, including modded
13453
- * trinkets.
13343
+ * Returns a set containing every valid passive item that can be randomly granted to Eden as a
13344
+ * starting item.
13345
+ *
13346
+ * Under the hood, this is determined by looking at the "noeden" tag in "items_metadata.xml".
13454
13347
  *
13455
13348
  * 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).
13349
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13350
+ * order).
13457
13351
  *
13458
13352
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13459
13353
  */
13460
- getTrinketsWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
13354
+ getEdenPassiveCollectibleTypes(): ReadonlySet<CollectibleType>;
13461
13355
  /**
13462
- * Returns an array containing every valid vanilla card type in the game.
13356
+ * Returns a random active collectible type that that is a valid starting item for Eden.
13463
13357
  *
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.
13358
+ * This function can only be called if at least one callback has been executed. This is because
13359
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13360
+ * order).
13466
13361
  *
13467
13362
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13363
+ *
13364
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13365
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13366
+ * @param exceptions Optional. An array of runes to not select.
13468
13367
  */
13469
- getVanillaCardArray(): readonly CardType[];
13368
+ getRandomEdenActiveCollectibleType(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13470
13369
  /**
13471
- * Returns a set containing every valid vanilla card type in the game.
13370
+ * Returns a random passive collectible type that that is a valid starting item for Eden.
13472
13371
  *
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.
13372
+ * This function can only be called if at least one callback has been executed. This is because
13373
+ * not all collectible types will necessarily be present when a mod first loads (due to mod load
13374
+ * order).
13475
13375
  *
13476
13376
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13377
+ *
13378
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13379
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13380
+ * @param exceptions Optional. An array of runes to not select.
13477
13381
  */
13478
- getVanillaCardSet(): ReadonlySet<CardType>;
13382
+ getRandomEdenPassiveCollectibleType(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
13479
13383
  /**
13480
- * Returns an array containing every valid vanilla collectible type in the game.
13384
+ * Helper function to get a set of card types matching the `ItemConfigCardType`.
13481
13385
  *
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.
13386
+ * This function is variadic, meaning that you can you can specify N card types to get a set
13387
+ * containing cards that match any of the specified types.
13388
+ *
13389
+ * This function can only be called if at least one callback has been executed. This is because
13390
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13484
13391
  *
13485
13392
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13486
13393
  */
13487
- getVanillaCollectibleArray(): readonly CollectibleType[];
13394
+ getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
13488
13395
  /**
13489
- * Returns a set containing every valid vanilla collectible type in the game.
13396
+ * Helper function to get a random card type that matches the provided `ItemConfigCardType`.
13490
13397
  *
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.
13398
+ * This function can only be called if at least one callback has been executed. This is because
13399
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13493
13400
  *
13494
13401
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13402
+ *
13403
+ * @param itemConfigCardType The item config card type that represents the pool of cards to select
13404
+ * from.
13405
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13406
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13407
+ * @param exceptions Optional. An array of cards to not select.
13495
13408
  */
13496
- getVanillaCollectibleSet(): ReadonlySet<CollectibleType>;
13409
+ getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13497
13410
  /**
13498
- * Returns an array containing every valid vanilla trinket type in the game.
13411
+ * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
13499
13412
  *
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.
13413
+ * This will not return:
13414
+ * - any runes
13415
+ * - any objects like Dice Shard
13416
+ *
13417
+ * This function can only be called if at least one callback has been executed. This is because
13418
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13502
13419
  *
13503
13420
  * 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 cards to not select.
13504
13425
  */
13505
- getVanillaTrinketArray(): readonly TrinketType[];
13426
+ getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13506
13427
  /**
13507
- * Returns a set containing every valid vanilla trinket type in the game.
13428
+ * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
13429
+ * of Isaac, etc.). This will never return a Rune Shard.
13508
13430
  *
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.
13431
+ * This function can only be called if at least one callback has been executed. This is because
13432
+ * not all card types will necessarily be present when a mod first loads (due to mod load order).
13511
13433
  *
13512
13434
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
13435
+ *
13436
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
13437
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
13438
+ * @param exceptions Optional. An array of runes to not select.
13513
13439
  */
13514
- getVanillaTrinketSet(): ReadonlySet<TrinketType>;
13440
+ getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
13515
13441
  }
13516
13442
 
13517
13443
  /**
@@ -13889,6 +13815,10 @@ declare class NoSirenSteal extends Feature {
13889
13815
  setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant, familiarSubType?: int): void;
13890
13816
  }
13891
13817
 
13818
+ /**
13819
+ * The number of dimensions, not including `Dimension.CURRENT`. (This is derived from the
13820
+ * `Dimension` enum.)
13821
+ */
13892
13822
  export declare const NUM_DIMENSIONS: number;
13893
13823
 
13894
13824
  export declare const NUM_NORMAL_PILL_COLORS: number;
@@ -13897,7 +13827,7 @@ export declare const NUM_NORMAL_PILL_COLORS: number;
13897
13827
  * The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
13898
13828
  * horse pills.)
13899
13829
  */
13900
- export declare const NUM_PILLS_IN_POOL: number;
13830
+ export declare const NUM_PILL_COLORS_IN_POOL: number;
13901
13831
 
13902
13832
  /** Calculated from the `Card` enum. `Card.NULL` is not included. */
13903
13833
  export declare const NUM_VANILLA_CARD_TYPES: number;
@@ -17751,6 +17681,104 @@ export declare function validateEnumContiguous<T>(transpiledEnumName: string, tr
17751
17681
  */
17752
17682
  export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
17753
17683
 
17684
+ /**
17685
+ * An array that represents the range from the first vanilla card type to the last vanilla card
17686
+ * type.
17687
+ *
17688
+ * This function is only useful when building card type objects. For most purposes, you should use
17689
+ * the `VANILLA_CARD_TYPES` or `VANILLA_CARD_TYPES_SET` constants instead.
17690
+ */
17691
+ export declare const VANILLA_CARD_TYPE_RANGE: readonly int[];
17692
+
17693
+ /**
17694
+ * An array that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
17695
+ * method. Vanilla card types are contiguous, but we validate every entry to double check.
17696
+ *
17697
+ * If you need to do O(1) lookups, use the `VANILLA_CARD_TYPES_SET` constant instead.
17698
+ */
17699
+ export declare const VANILLA_CARD_TYPES: readonly CardType[];
17700
+
17701
+ /**
17702
+ * A set that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
17703
+ * method. Vanilla card types are contiguous, but we validate every entry to double check.
17704
+ */
17705
+ export declare const VANILLA_CARD_TYPES_SET: ReadonlySet<CardType>;
17706
+
17707
+ /**
17708
+ * An array that represents the range from the first vanilla collectible type to the last vanilla
17709
+ * collectible type. This will include integers that do not represent any valid collectible types.
17710
+ *
17711
+ * This function is only useful when building collectible type objects. For most purposes, you
17712
+ * should use the `VANILLA_COLLECTIBLE_TYPES` or `VANILLA_COLLECTIBLE_TYPES_SET` constants instead.
17713
+ */
17714
+ export declare const VANILLA_COLLECTIBLE_TYPE_RANGE: readonly int[];
17715
+
17716
+ /**
17717
+ * An array that contains every valid vanilla collectible type, as verified by the
17718
+ * `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
17719
+ * must be verified. (There are several gaps, e.g. 666.)
17720
+ *
17721
+ * If you need to do O(1) lookups, use the `VANILLA_COLLECTIBLE_TYPES_SET` constant instead.
17722
+ */
17723
+ export declare const VANILLA_COLLECTIBLE_TYPES: readonly CollectibleType[];
17724
+
17725
+ /**
17726
+ * A set that contains every valid vanilla collectible type, as verified by the
17727
+ * `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
17728
+ * must be verified. (There are several gaps, e.g. 666.)
17729
+ */
17730
+ export declare const VANILLA_COLLECTIBLE_TYPES_SET: ReadonlySet<CollectibleType>;
17731
+
17732
+ /**
17733
+ * An array that represents the range from the first vanilla pill effect to the last vanilla pill
17734
+ * effect.
17735
+ *
17736
+ * This function is only useful when building pill effect objects. For most purposes, you should use
17737
+ * the `VANILLA_PILL_EFFECTS` or `VANILLA_PILL_EFFECTS_SET` constants instead.
17738
+ */
17739
+ export declare const VANILLA_PILL_EFFECT_RANGE: readonly int[];
17740
+
17741
+ /**
17742
+ * An array that contains every valid vanilla pill effect, as verified by the
17743
+ * `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
17744
+ * entry to double check.
17745
+ *
17746
+ * If you need to do O(1) lookups, use the `VANILLA_PILL_EFFECT_SET` constant instead.
17747
+ */
17748
+ export declare const VANILLA_PILL_EFFECTS: readonly PillEffect[];
17749
+
17750
+ /**
17751
+ * A set that contains every valid vanilla pill effect, as verified by the
17752
+ * `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
17753
+ * entry to double check.
17754
+ */
17755
+ export declare const VANILLA_PILL_EFFECTS_SET: ReadonlySet<PillEffect>;
17756
+
17757
+ /**
17758
+ * An array that represents the range from the first vanilla trinket type to the last vanilla
17759
+ * trinket type. This will include integers that do not represent any valid trinket types.
17760
+ *
17761
+ * This function is only useful when building trinket type objects. For most purposes, you should
17762
+ * use the `VANILLA_TRINKET_TYPES` or `VANILLA_TRINKET_TYPES_SET` constants instead.
17763
+ */
17764
+ export declare const VANILLA_TRINKET_TYPE_RANGE: readonly int[];
17765
+
17766
+ /**
17767
+ * An array that contains every valid vanilla trinket type, as verified by the
17768
+ * `ItemConfig.GetTrinket` method. Vanilla trinket types are not contiguous, so every valid must be
17769
+ * verified. (The only gap is 47 for `POLAROID_OBSOLETE`.)
17770
+ *
17771
+ * If you need to do O(1) lookups, use the `VANILLA_TRINKET_TYPES_SET` constant instead.
17772
+ */
17773
+ export declare const VANILLA_TRINKET_TYPES: readonly TrinketType[];
17774
+
17775
+ /**
17776
+ * A set that contains every valid vanilla trinket type, as verified by the `ItemConfig.GetTrinket`
17777
+ * method. Vanilla trinket types are not contiguous, so every valid must be verified. (The only gap
17778
+ * is 47 for `POLAROID_OBSOLETE`.)
17779
+ */
17780
+ export declare const VANILLA_TRINKET_TYPES_SET: ReadonlySet<TrinketType>;
17781
+
17754
17782
  /**
17755
17783
  * Helper function to compare two vectors for equality.
17756
17784
  *