isaacscript-common 3.2.0 → 3.4.1

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 (50) hide show
  1. package/cachedClasses.d.ts +2 -1
  2. package/callbacks/customRevive.lua +3 -3
  3. package/callbacks/postGridEntity.lua +5 -3
  4. package/callbacks/postHolyMantleRemoved.lua +2 -2
  5. package/callbacks/postPlayerCollectible.d.ts +1 -0
  6. package/callbacks/postPlayerCollectible.lua +95 -0
  7. package/callbacks/postRoomClearChanged.lua +5 -3
  8. package/callbacks/postSlotInitUpdate.lua +5 -3
  9. package/callbacks/subscriptions/postPlayerCollectibleAdded.d.ts +6 -0
  10. package/callbacks/subscriptions/postPlayerCollectibleAdded.lua +34 -0
  11. package/callbacks/subscriptions/postPlayerCollectibleRemoved.d.ts +6 -0
  12. package/callbacks/subscriptions/postPlayerCollectibleRemoved.lua +34 -0
  13. package/constants.d.ts +8 -0
  14. package/constants.lua +5 -0
  15. package/constantsFirstLast.d.ts +3 -0
  16. package/enums/ModCallbackCustom.d.ts +427 -177
  17. package/enums/ModCallbackCustom.lua +36 -32
  18. package/features/deployJSONRoom.lua +5 -4
  19. package/features/extraConsoleCommands/listCommands.lua +1 -0
  20. package/features/persistentEntities.d.ts +28 -0
  21. package/features/persistentEntities.lua +150 -0
  22. package/features/playerInventory.d.ts +1 -10
  23. package/features/playerInventory.lua +23 -60
  24. package/functions/array.d.ts +3 -3
  25. package/functions/array.lua +3 -3
  26. package/functions/collectibleSet.d.ts +3 -3
  27. package/functions/collectibleSet.lua +3 -5
  28. package/functions/color.d.ts +2 -16
  29. package/functions/color.lua +0 -9
  30. package/functions/entity.d.ts +10 -0
  31. package/functions/entity.lua +29 -0
  32. package/functions/log.lua +2 -2
  33. package/functions/pills.d.ts +10 -0
  34. package/functions/pills.lua +16 -0
  35. package/functions/roomData.d.ts +5 -5
  36. package/functions/roomData.lua +7 -7
  37. package/functions/rooms.d.ts +1 -4
  38. package/functions/rooms.lua +19 -25
  39. package/functions/saveFile.lua +0 -1
  40. package/index.d.ts +2 -1
  41. package/index.lua +7 -2
  42. package/initCustomCallbacks.lua +3 -0
  43. package/initFeatures.lua +3 -0
  44. package/interfaces/AddCallbackParameterCustom.d.ts +4 -0
  45. package/maps/PHDPillConversions.d.ts +2 -0
  46. package/maps/PHDPillConversions.lua +25 -0
  47. package/maps/falsePHDPillConversions.d.ts +2 -0
  48. package/maps/falsePHDPillConversions.lua +39 -0
  49. package/objects/callbackRegisterFunctions.lua +6 -0
  50. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /// <reference types="isaac-typescript-definitions" />
4
+ /// <reference types="isaac-typescript-definitions" />
4
5
  /**
5
6
  * A cached version of the class returned from the `Game()` constructor.
6
7
  *
@@ -18,7 +19,7 @@ export declare const game: Game;
18
19
  * Caching the results of this constructor is safe, but caching other classes (like `Level` or
19
20
  * `Room`) is not safe and can lead to the game crashing in certain situations.
20
21
  */
21
- export declare const itemConfig: import("isaac-typescript-definitions/types/ItemConfig").ItemConfig;
22
+ export declare const itemConfig: ItemConfig;
22
23
  /**
23
24
  * A cached version of the class returned from the `MusicManager()` constructor.
24
25
  *
@@ -1,5 +1,5 @@
1
1
  local ____exports = {}
2
- local hasSubscriptions, postRender, postNewRoom, postPEffectUpdateReordered, checkWaitingForItemAnimation, postPlayerFatalDamage, preBerserkDeath, playerIsAboutToDie, logStateChanged, DEBUG, CustomReviveState, v
2
+ local hasSubscriptions, postRender, postNewRoomReordered, postPEffectUpdateReordered, checkWaitingForItemAnimation, postPlayerFatalDamage, preBerserkDeath, playerIsAboutToDie, logStateChanged, DEBUG, CustomReviveState, v
3
3
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
4
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
5
5
  local FamiliarVariant = ____isaac_2Dtypescript_2Ddefinitions.FamiliarVariant
@@ -41,7 +41,7 @@ function postRender(self)
41
41
  end
42
42
  sfxManager:Stop(SoundEffect.ONE_UP)
43
43
  end
44
- function postNewRoom(self)
44
+ function postNewRoomReordered(self)
45
45
  if v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
46
46
  return
47
47
  end
@@ -139,7 +139,7 @@ v = {run = {state = CustomReviveState.DISABLED, revivalType = nil, dyingPlayerIn
139
139
  function ____exports.customReviveCallbacksInit(self, mod)
140
140
  saveDataManager(nil, "customRevive", v, hasSubscriptions)
141
141
  mod:AddCallback(ModCallback.POST_RENDER, postRender)
142
- mod:AddCallback(ModCallback.POST_NEW_ROOM, postNewRoom)
142
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
143
143
  mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
144
144
  mod:AddCallbackCustom(ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, postPlayerFatalDamage)
145
145
  mod:AddCallbackCustom(ModCallbackCustom.PRE_BERSERK_DEATH, preBerserkDeath)
@@ -3,9 +3,11 @@ local Map = ____lualib.Map
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__Iterator = ____lualib.__TS__Iterator
5
5
  local ____exports = {}
6
- local hasSubscriptions, postUpdate, checkGridEntitiesRemoved, checkGridEntityStateChanged, checkNewGridEntity, updateTupleInMap, postNewRoom, v
6
+ local hasSubscriptions, postUpdate, checkGridEntitiesRemoved, checkGridEntityStateChanged, checkNewGridEntity, updateTupleInMap, postNewRoomReordered, v
7
7
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
8
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
10
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
9
11
  local ____exports = require("features.saveDataManager.exports")
10
12
  local saveDataManager = ____exports.saveDataManager
11
13
  local ____gridEntity = require("functions.gridEntity")
@@ -85,7 +87,7 @@ function updateTupleInMap(self, gridEntity)
85
87
  local newTuple = {gridEntityType, gridEntityVariant, gridEntity.State}
86
88
  v.room.initializedGridEntities:set(gridIndex, newTuple)
87
89
  end
88
- function postNewRoom(self)
90
+ function postNewRoomReordered(self)
89
91
  if not hasSubscriptions(nil) then
90
92
  return
91
93
  end
@@ -102,6 +104,6 @@ v = {room = {initializedGridEntities = __TS__New(Map)}}
102
104
  function ____exports.postGridEntityCallbacksInit(self, mod)
103
105
  saveDataManager(nil, "postGridEntity", v, hasSubscriptions)
104
106
  mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
105
- mod:AddCallback(ModCallback.POST_NEW_ROOM, postNewRoom)
107
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
106
108
  end
107
109
  return ____exports
@@ -12,7 +12,7 @@ local ____exports = require("features.saveDataManager.exports")
12
12
  local saveDataManager = ____exports.saveDataManager
13
13
  local ____playerDataStructures = require("functions.playerDataStructures")
14
14
  local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
15
- local defaultMapSetPlayer = ____playerDataStructures.defaultMapSetPlayer
15
+ local mapSetPlayer = ____playerDataStructures.mapSetPlayer
16
16
  local ____postHolyMantleRemoved = require("callbacks.subscriptions.postHolyMantleRemoved")
17
17
  local postHolyMantleRemovedFire = ____postHolyMantleRemoved.postHolyMantleRemovedFire
18
18
  local postHolyMantleRemovedHasSubscriptions = ____postHolyMantleRemoved.postHolyMantleRemovedHasSubscriptions
@@ -26,7 +26,7 @@ function postPEffectUpdateReordered(self, player)
26
26
  local effects = player:GetEffects()
27
27
  local newNumHolyMantles = effects:GetCollectibleEffectNum(CollectibleType.HOLY_MANTLE)
28
28
  local oldNumHolyMantles = defaultMapGetPlayer(nil, v.run.playersHolyMantleMap, player)
29
- defaultMapSetPlayer(nil, v.run.playersHolyMantleMap, player, newNumHolyMantles)
29
+ mapSetPlayer(nil, v.run.playersHolyMantleMap, player, newNumHolyMantles)
30
30
  if newNumHolyMantles < oldNumHolyMantles then
31
31
  postHolyMantleRemovedFire(nil, player, oldNumHolyMantles, newNumHolyMantles)
32
32
  end
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,95 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Map = ____lualib.Map
3
+ local __TS__New = ____lualib.__TS__New
4
+ local __TS__Spread = ____lualib.__TS__Spread
5
+ local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
6
+ local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
7
+ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
8
+ local ____exports = {}
9
+ local hasSubscriptions, postPEffectUpdate, collectibleCountChanged, v
10
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
11
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
12
+ local ____DefaultMap = require("classes.DefaultMap")
13
+ local DefaultMap = ____DefaultMap.DefaultMap
14
+ local ____exports = require("features.saveDataManager.exports")
15
+ local saveDataManager = ____exports.saveDataManager
16
+ local ____player = require("functions.player")
17
+ local getPlayerCollectibleMap = ____player.getPlayerCollectibleMap
18
+ local ____playerDataStructures = require("functions.playerDataStructures")
19
+ local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
20
+ local mapGetPlayer = ____playerDataStructures.mapGetPlayer
21
+ local mapSetPlayer = ____playerDataStructures.mapSetPlayer
22
+ local ____utils = require("functions.utils")
23
+ local ____repeat = ____utils["repeat"]
24
+ local ____postPlayerCollectibleAdded = require("callbacks.subscriptions.postPlayerCollectibleAdded")
25
+ local postPlayerCollectibleAddedFire = ____postPlayerCollectibleAdded.postPlayerCollectibleAddedFire
26
+ local postPlayerCollectibleAddedHasSubscriptions = ____postPlayerCollectibleAdded.postPlayerCollectibleAddedHasSubscriptions
27
+ local ____postPlayerCollectibleRemoved = require("callbacks.subscriptions.postPlayerCollectibleRemoved")
28
+ local postPlayerCollectibleRemovedFire = ____postPlayerCollectibleRemoved.postPlayerCollectibleRemovedFire
29
+ local postPlayerCollectibleRemovedHasSubscriptions = ____postPlayerCollectibleRemoved.postPlayerCollectibleRemovedHasSubscriptions
30
+ function hasSubscriptions(self)
31
+ return postPlayerCollectibleAddedHasSubscriptions(nil) or postPlayerCollectibleRemovedHasSubscriptions(nil)
32
+ end
33
+ function postPEffectUpdate(self, player)
34
+ if not hasSubscriptions(nil) then
35
+ return
36
+ end
37
+ local oldCollectibleCount = mapGetPlayer(nil, v.run.playersCollectibleCount, player)
38
+ local newCollectibleCount = player:GetCollectibleCount()
39
+ mapSetPlayer(nil, v.run.playersCollectibleCount, player, newCollectibleCount)
40
+ if oldCollectibleCount == nil then
41
+ return
42
+ end
43
+ local difference = newCollectibleCount - oldCollectibleCount
44
+ if difference > 0 then
45
+ collectibleCountChanged(nil, player, difference, true)
46
+ elseif difference < 0 then
47
+ collectibleCountChanged(nil, player, difference * -1, false)
48
+ end
49
+ end
50
+ function collectibleCountChanged(self, player, numCollectiblesChanged, increased)
51
+ local oldCollectibleMap = defaultMapGetPlayer(nil, v.run.playersCollectibleMap, player, player)
52
+ local newCollectibleMap = getPlayerCollectibleMap(nil, player)
53
+ mapSetPlayer(nil, v.run.playersCollectibleMap, player, newCollectibleMap)
54
+ local ____array_0 = __TS__SparseArrayNew(__TS__Spread(oldCollectibleMap:keys()))
55
+ __TS__SparseArrayPush(
56
+ ____array_0,
57
+ __TS__Spread(newCollectibleMap:keys())
58
+ )
59
+ local collectibleTypes = {__TS__SparseArraySpread(____array_0)}
60
+ local numFired = 0
61
+ for ____, collectibleType in ipairs(collectibleTypes) do
62
+ local oldNum = oldCollectibleMap:get(collectibleType) or 0
63
+ local newNum = newCollectibleMap:get(collectibleType) or 0
64
+ local difference = math.abs(newNum - oldNum)
65
+ ____repeat(
66
+ nil,
67
+ difference,
68
+ function()
69
+ if increased then
70
+ postPlayerCollectibleAddedFire(nil, player, collectibleType)
71
+ else
72
+ postPlayerCollectibleRemovedFire(nil, player, collectibleType)
73
+ end
74
+ numFired = numFired + 1
75
+ end
76
+ )
77
+ if numFired == numCollectiblesChanged then
78
+ return
79
+ end
80
+ end
81
+ end
82
+ v = {run = {
83
+ playersCollectibleCount = __TS__New(Map),
84
+ playersCollectibleMap = __TS__New(
85
+ DefaultMap,
86
+ function(____, player) return getPlayerCollectibleMap(nil, player) end
87
+ )
88
+ }}
89
+ ---
90
+ -- @internal
91
+ function ____exports.postPlayerCollectibleCallbackInit(self, mod)
92
+ saveDataManager(nil, "postPlayerCollectible", v, hasSubscriptions)
93
+ mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
94
+ end
95
+ return ____exports
@@ -1,9 +1,11 @@
1
1
  local ____exports = {}
2
- local hasSubscriptions, postUpdate, postNewRoom, v
2
+ local hasSubscriptions, postUpdate, postNewRoomReordered, v
3
3
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
4
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
5
  local ____cachedClasses = require("cachedClasses")
6
6
  local game = ____cachedClasses.game
7
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
8
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
7
9
  local ____exports = require("features.saveDataManager.exports")
8
10
  local saveDataManager = ____exports.saveDataManager
9
11
  local ____postRoomClearChanged = require("callbacks.subscriptions.postRoomClearChanged")
@@ -23,7 +25,7 @@ function postUpdate(self)
23
25
  postRoomClearChangedFire(nil, roomClear)
24
26
  end
25
27
  end
26
- function postNewRoom(self)
28
+ function postNewRoomReordered(self)
27
29
  if not hasSubscriptions(nil) then
28
30
  return
29
31
  end
@@ -37,6 +39,6 @@ v = {room = {cleared = false}}
37
39
  function ____exports.postRoomClearChangedCallbackInit(self, mod)
38
40
  saveDataManager(nil, "postRoomClearChanged", v, hasSubscriptions)
39
41
  mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
40
- mod:AddCallback(ModCallback.POST_NEW_ROOM, postNewRoom)
42
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
41
43
  end
42
44
  return ____exports
@@ -2,9 +2,11 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local hasSubscriptions, postUpdate, postNewRoom, checkNewEntity, v
5
+ local hasSubscriptions, postUpdate, postNewRoomReordered, checkNewEntity, v
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
8
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
9
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
8
10
  local ____exports = require("features.saveDataManager.exports")
9
11
  local saveDataManager = ____exports.saveDataManager
10
12
  local ____entitySpecific = require("functions.entitySpecific")
@@ -27,7 +29,7 @@ function postUpdate(self)
27
29
  postSlotUpdateFire(nil, slot)
28
30
  end
29
31
  end
30
- function postNewRoom(self)
32
+ function postNewRoomReordered(self)
31
33
  if not hasSubscriptions(nil) then
32
34
  return
33
35
  end
@@ -48,6 +50,6 @@ v = {room = {initializedSlots = __TS__New(Set)}}
48
50
  function ____exports.postSlotInitUpdateCallbacksInit(self, mod)
49
51
  saveDataManager(nil, "postSlotInitUpdate", v, hasSubscriptions)
50
52
  mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
51
- mod:AddCallback(ModCallback.POST_NEW_ROOM, postNewRoom)
53
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
52
54
  end
53
55
  return ____exports
@@ -0,0 +1,6 @@
1
+ import { CollectibleType, PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
+ export declare type PostPlayerCollectibleAddedRegisterParameters = [
3
+ callback: (player: EntityPlayer, collectibleType: CollectibleType) => void,
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
6
+ ];
@@ -0,0 +1,34 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ ---
4
+ -- @internal
5
+ function ____exports.postPlayerCollectibleAddedHasSubscriptions(self)
6
+ return #subscriptions > 0
7
+ end
8
+ ---
9
+ -- @internal
10
+ function ____exports.postPlayerCollectibleAddedRegister(self, ...)
11
+ local args = {...}
12
+ subscriptions[#subscriptions + 1] = args
13
+ end
14
+ ---
15
+ -- @internal
16
+ function ____exports.postPlayerCollectibleAddedFire(self, player, collectibleType)
17
+ local character = player:GetPlayerType()
18
+ for ____, ____value in ipairs(subscriptions) do
19
+ local callback = ____value[1]
20
+ local playerVariant = ____value[2]
21
+ local callbackCharacter = ____value[3]
22
+ do
23
+ if playerVariant ~= nil and playerVariant ~= player.Variant then
24
+ goto __continue5
25
+ end
26
+ if callbackCharacter ~= nil and callbackCharacter ~= character then
27
+ goto __continue5
28
+ end
29
+ callback(nil, player, collectibleType)
30
+ end
31
+ ::__continue5::
32
+ end
33
+ end
34
+ return ____exports
@@ -0,0 +1,6 @@
1
+ import { CollectibleType, PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
+ export declare type PostPlayerCollectibleRemovedRegisterParameters = [
3
+ callback: (player: EntityPlayer, collectibleType: CollectibleType) => void,
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
6
+ ];
@@ -0,0 +1,34 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ ---
4
+ -- @internal
5
+ function ____exports.postPlayerCollectibleRemovedHasSubscriptions(self)
6
+ return #subscriptions > 0
7
+ end
8
+ ---
9
+ -- @internal
10
+ function ____exports.postPlayerCollectibleRemovedRegister(self, ...)
11
+ local args = {...}
12
+ subscriptions[#subscriptions + 1] = args
13
+ end
14
+ ---
15
+ -- @internal
16
+ function ____exports.postPlayerCollectibleRemovedFire(self, player, collectibleType)
17
+ local character = player:GetPlayerType()
18
+ for ____, ____value in ipairs(subscriptions) do
19
+ local callback = ____value[1]
20
+ local playerVariant = ____value[2]
21
+ local callbackCharacter = ____value[3]
22
+ do
23
+ if playerVariant ~= nil and playerVariant ~= player.Variant then
24
+ goto __continue5
25
+ end
26
+ if callbackCharacter ~= nil and callbackCharacter ~= character then
27
+ goto __continue5
28
+ end
29
+ callback(nil, player, collectibleType)
30
+ end
31
+ ::__continue5::
32
+ end
33
+ end
34
+ return ____exports
package/constants.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Constants
3
+ */
1
4
  import { ItemPoolType, LevelStage, RoomType } from "isaac-typescript-definitions";
2
5
  /**
3
6
  * The distance of the laser when Azazel does not have any range up items yet. For more info, see
@@ -82,6 +85,11 @@ export declare const LAST_STAGE: LevelStage;
82
85
  /** Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`. */
83
86
  export declare const MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000;
84
87
  export declare const NUM_DIMENSIONS: number;
88
+ /**
89
+ * The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
90
+ * horse pills.)
91
+ */
92
+ export declare const NUM_PILLS_IN_POOL: number;
85
93
  export declare const SECOND_IN_MILLISECONDS = 1000;
86
94
  export declare const MINUTE_IN_MILLISECONDS: number;
87
95
  export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
package/constants.lua CHANGED
@@ -5,6 +5,8 @@ local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
5
5
  local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
6
6
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
7
7
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
8
+ local ____constantsFirstLast = require("constantsFirstLast")
9
+ local NUM_NORMAL_PILL_COLORS = ____constantsFirstLast.NUM_NORMAL_PILL_COLORS
8
10
  local ____enums = require("functions.enums")
9
11
  local getEnumLength = ____enums.getEnumLength
10
12
  local getLastEnumValue = ____enums.getLastEnumValue
@@ -69,6 +71,9 @@ ____exports.LAST_STAGE = getLastEnumValue(nil, LevelStage)
69
71
  --- Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`.
70
72
  ____exports.MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000
71
73
  ____exports.NUM_DIMENSIONS = getEnumLength(nil, Dimension) - 1
74
+ --- The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
75
+ -- horse pills.)
76
+ ____exports.NUM_PILLS_IN_POOL = NUM_NORMAL_PILL_COLORS
72
77
  ____exports.SECOND_IN_MILLISECONDS = 1000
73
78
  ____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
74
79
  ____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Constants (First and Last)
3
+ */
1
4
  import { Card, CollectibleType, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
2
5
  /** Equal to `CollectibleType.SAD_ONION`. */
3
6
  export declare const FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;