isaacscript-common 8.4.6 → 8.5.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 (63) hide show
  1. package/dist/features/characterStats.d.ts.map +1 -1
  2. package/dist/features/characterStats.lua +1 -2
  3. package/dist/features/firstLast.d.ts +6 -3
  4. package/dist/features/firstLast.d.ts.map +1 -1
  5. package/dist/features/firstLast.lua +6 -3
  6. package/dist/functions/bosses.d.ts +5 -2
  7. package/dist/functions/bosses.d.ts.map +1 -1
  8. package/dist/functions/bosses.lua +11 -6
  9. package/dist/functions/collectibleCacheFlag.d.ts +1 -1
  10. package/dist/functions/collectibleCacheFlag.d.ts.map +1 -1
  11. package/dist/functions/collectibleCacheFlag.lua +1 -2
  12. package/dist/functions/collectibleSet.lua +32 -32
  13. package/dist/functions/collectibleTag.d.ts +1 -1
  14. package/dist/functions/collectibleTag.d.ts.map +1 -1
  15. package/dist/functions/collectibleTag.lua +1 -3
  16. package/dist/functions/eden.d.ts +1 -1
  17. package/dist/functions/eden.d.ts.map +1 -1
  18. package/dist/functions/eden.lua +1 -2
  19. package/dist/functions/flying.d.ts +1 -1
  20. package/dist/functions/flying.d.ts.map +1 -1
  21. package/dist/functions/flying.lua +5 -2
  22. package/dist/functions/input.d.ts +2 -2
  23. package/dist/functions/input.d.ts.map +1 -1
  24. package/dist/functions/input.lua +2 -4
  25. package/dist/functions/playerHealth.d.ts +93 -0
  26. package/dist/functions/playerHealth.d.ts.map +1 -1
  27. package/dist/functions/playerHealth.lua +216 -33
  28. package/dist/functions/players.d.ts +1 -111
  29. package/dist/functions/players.d.ts.map +1 -1
  30. package/dist/functions/players.lua +20 -279
  31. package/dist/functions/revive.d.ts.map +1 -1
  32. package/dist/functions/revive.lua +2 -1
  33. package/dist/functions/stats.d.ts +16 -0
  34. package/dist/functions/stats.d.ts.map +1 -1
  35. package/dist/functions/stats.lua +78 -0
  36. package/dist/functions/transformations.d.ts +1 -1
  37. package/dist/functions/transformations.d.ts.map +1 -1
  38. package/dist/functions/trinketCacheFlag.d.ts +1 -1
  39. package/dist/functions/trinketCacheFlag.d.ts.map +1 -1
  40. package/dist/functions/trinketCacheFlag.lua +1 -3
  41. package/dist/functions/trinketSet.lua +32 -32
  42. package/dist/index.d.ts +19 -30
  43. package/dist/sets/bossSets.d.ts +1 -0
  44. package/dist/sets/bossSets.d.ts.map +1 -1
  45. package/dist/sets/bossSets.lua +19 -0
  46. package/package.json +1 -1
  47. package/src/features/characterStats.ts +1 -2
  48. package/src/features/firstLast.ts +6 -3
  49. package/src/functions/bosses.ts +15 -6
  50. package/src/functions/collectibleCacheFlag.ts +3 -3
  51. package/src/functions/collectibleSet.ts +32 -32
  52. package/src/functions/collectibleTag.ts +2 -3
  53. package/src/functions/eden.ts +3 -3
  54. package/src/functions/flying.ts +4 -4
  55. package/src/functions/input.ts +4 -5
  56. package/src/functions/playerHealth.ts +269 -7
  57. package/src/functions/players.ts +1 -348
  58. package/src/functions/revive.ts +2 -6
  59. package/src/functions/stats.ts +75 -0
  60. package/src/functions/transformations.ts +1 -1
  61. package/src/functions/trinketCacheFlag.ts +2 -3
  62. package/src/functions/trinketSet.ts +32 -32
  63. package/src/sets/bossSets.ts +24 -0
@@ -1 +1 @@
1
- {"version":3,"file":"characterStats.d.ts","sourceRoot":"","sources":["../../src/features/characterStats.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAET,UAAU,EACX,MAAM,8BAA8B,CAAC;AAiCtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/D,IAAI,CAGN"}
1
+ {"version":3,"file":"characterStats.d.ts","sourceRoot":"","sources":["../../src/features/characterStats.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAET,UAAU,EACX,MAAM,8BAA8B,CAAC;AAgCtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/D,IAAI,CAGN"}
@@ -7,9 +7,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
7
7
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
8
8
  local ____featuresInitialized = require("featuresInitialized")
9
9
  local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
10
- local ____players = require("functions.players")
11
- local addStat = ____players.addStat
12
10
  local ____stats = require("functions.stats")
11
+ local addStat = ____stats.addStat
13
12
  local getDefaultPlayerStat = ____stats.getDefaultPlayerStat
14
13
  function evaluateCache(self, player, cacheFlag)
15
14
  local character = player:GetPlayerType()
@@ -19,11 +19,11 @@ export declare function getLastCollectibleType(): CollectibleType;
19
19
  /**
20
20
  * Helper function to get an array that represents the all modded collectible types.
21
21
  *
22
- * This function is only useful when building collectible type objects. For most purposes, you
23
- * should use the `getModdedCollectibleSet` helper function instead.
24
- *
25
22
  * Returns an empty array if there are no modded collectible types.
26
23
  *
24
+ * This function is only useful when building collectible type objects. For most purposes, you
25
+ * should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
26
+ *
27
27
  * (This function is named differently from the `getVanillaCollectibleTypeRange` function because
28
28
  * all modded collectible types are contiguous. Thus, each value represents a real
29
29
  * `CollectibleType`.)
@@ -66,6 +66,9 @@ export declare function getLastTrinketType(): TrinketType;
66
66
  *
67
67
  * Returns an empty array if there are no modded trinket types.
68
68
  *
69
+ * This function is only useful when building collectible type objects. For most purposes, you
70
+ * should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
71
+ *
69
72
  * This function can only be called if at least one callback has been executed. This is because not
70
73
  * all trinkets will necessarily be present when a mod first loads (due to mod load order).
71
74
  */
@@ -1 +1 @@
1
- {"version":3,"file":"firstLast.d.ts","sourceRoot":"","sources":["../../src/features/firstLast.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAwDtC;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,eAAe,GAAG,SAAS,CAS3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,CAKxD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,IAAI,eAAe,EAAE,CAW7D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,GAAG,CAM5C;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,GAAG,CAMlD;AAMD;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,WAAW,GAAG,SAAS,CASnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,WAAW,CAMhD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAQrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,GAAG,CAKxC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,GAAG,CAM9C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,WAAW,EAAE,CAG/C;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,EAAE,CAGpC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,GAAG,SAAS,CAOrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,IAAI,EAAE,CAQvC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAKjC;AAED;;;G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B,eAAe,IAAI,WAAW,EAAE,CAG/C;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,EAAE,CAGpC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,GAAG,SAAS,CAOrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,IAAI,EAAE,CAQvC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAKjC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAMvC;AAMD;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,EAAE,CAGhD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,UAAU,GAAG,SAAS,CASjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAM9C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,EAAE,CAQnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAKvC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,GAAG,CAM7C"}
@@ -146,11 +146,11 @@ function ____exports.getFirstModdedCollectibleType(self)
146
146
  end
147
147
  --- Helper function to get an array that represents the all modded collectible types.
148
148
  --
149
- -- This function is only useful when building collectible type objects. For most purposes, you
150
- -- should use the `getModdedCollectibleSet` helper function instead.
151
- --
152
149
  -- Returns an empty array if there are no modded collectible types.
153
150
  --
151
+ -- This function is only useful when building collectible type objects. For most purposes, you
152
+ -- should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
153
+ --
154
154
  -- (This function is named differently from the `getVanillaCollectibleTypeRange` function because
155
155
  -- all modded collectible types are contiguous. Thus, each value represents a real
156
156
  -- `CollectibleType`.)
@@ -212,6 +212,9 @@ end
212
212
  --
213
213
  -- Returns an empty array if there are no modded trinket types.
214
214
  --
215
+ -- This function is only useful when building collectible type objects. For most purposes, you
216
+ -- should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
217
+ --
215
218
  -- This function can only be called if at least one callback has been executed. This is because not
216
219
  -- all trinkets will necessarily be present when a mod first loads (due to mod load order).
217
220
  function ____exports.getModdedTrinketTypes(self)
@@ -20,8 +20,11 @@ export declare function getAliveBosses(entityType?: EntityType, variant?: number
20
20
  * The set contains strings with the entity type and variant, separated by a period.
21
21
  *
22
22
  * Also see the `getBossSet` and `getCombinedBossSet` functions.
23
+ *
24
+ * @param includeStoryBosses Optional. Whether to include "story" bosses like Mom and It Lives!
25
+ * Default is true.
23
26
  */
24
- export declare function getAllBossesSet(): Set<string>;
27
+ export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<string>;
25
28
  /**
26
29
  * Helper function to get the set of vanilla bosses for a particular stage and stage type
27
30
  * combination.
@@ -52,7 +55,7 @@ export declare function getBosses(entityType?: EntityType, variant?: int, subTyp
52
55
  *
53
56
  * Also see the `getAllBossesSet` and `getBossSet` functions.
54
57
  */
55
- export declare function getCombinedBossSet(stage: int): Set<string> | undefined;
58
+ export declare function getCombinedBossSet(stage: int): ReadonlySet<string> | undefined;
56
59
  /** Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust. */
57
60
  export declare function isSin(npc: EntityNPC): boolean;
58
61
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAyBtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,GAAG,CAAC,MAAM,CAAC,CA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AAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAYX"}
@@ -10,6 +10,7 @@ local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
10
10
  local ____constants = require("core.constants")
11
11
  local VectorZero = ____constants.VectorZero
12
12
  local ____bossSets = require("sets.bossSets")
13
+ local ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = ____bossSets.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
13
14
  local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
14
15
  local STAGE_TO_COMBINED_BOSS_SET_MAP = ____bossSets.STAGE_TO_COMBINED_BOSS_SET_MAP
15
16
  local STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = ____bossSets.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP
@@ -22,8 +23,6 @@ local ____npcs = require("functions.npcs")
22
23
  local getAliveNPCs = ____npcs.getAliveNPCs
23
24
  local ____rng = require("functions.rng")
24
25
  local isRNG = ____rng.isRNG
25
- local ____set = require("functions.set")
26
- local copySet = ____set.copySet
27
26
  local ____types = require("functions.types")
28
27
  local asNumber = ____types.asNumber
29
28
  local ____utils = require("functions.utils")
@@ -109,8 +108,14 @@ end
109
108
  -- The set contains strings with the entity type and variant, separated by a period.
110
109
  --
111
110
  -- Also see the `getBossSet` and `getCombinedBossSet` functions.
112
- function ____exports.getAllBossesSet(self)
113
- return copySet(nil, ALL_BOSSES_SET)
111
+ --
112
+ -- @param includeStoryBosses Optional. Whether to include "story" bosses like Mom and It Lives!
113
+ -- Default is true.
114
+ function ____exports.getAllBossesSet(self, includeStoryBosses)
115
+ if includeStoryBosses == nil then
116
+ includeStoryBosses = true
117
+ end
118
+ return includeStoryBosses and ALL_BOSSES_SET or ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
114
119
  end
115
120
  --- Helper function to get the set of vanilla bosses for a particular stage and stage type
116
121
  -- combination.
@@ -127,7 +132,7 @@ function ____exports.getBossSet(self, stage, stageType)
127
132
  if bossSet == nil then
128
133
  return nil
129
134
  end
130
- return copySet(nil, bossSet)
135
+ return bossSet
131
136
  end
132
137
  --- Helper function to get all of the bosses in the room.
133
138
  --
@@ -166,7 +171,7 @@ function ____exports.getCombinedBossSet(self, stage)
166
171
  if bossSet == nil then
167
172
  return nil
168
173
  end
169
- return copySet(nil, bossSet)
174
+ return bossSet
170
175
  end
171
176
  --- Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust.
172
177
  function ____exports.isSin(self, npc)
@@ -8,7 +8,7 @@ export declare function collectibleHasCacheFlag(collectibleType: CollectibleType
8
8
  * This function can only be called if at least one callback has been executed. This is because not
9
9
  * all collectibles will necessarily be present when a mod first loads (due to mod load order).
10
10
  */
11
- export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<CollectibleType>;
11
+ export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
12
12
  /**
13
13
  * Returns an array containing every collectible type that the player has that matches the provided
14
14
  * CacheFlag.
@@ -1 +1 @@
1
- {"version":3,"file":"collectibleCacheFlag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleCacheFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA+B1E,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GACnB,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GACnB,GAAG,CAAC,eAAe,CAAC,CAStB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,GACnB,eAAe,EAAE,CAYnB"}
1
+ {"version":3,"file":"collectibleCacheFlag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleCacheFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA+B1E,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GACnB,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,eAAe,CAAC,CAS9B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,GACnB,eAAe,EAAE,CAYnB"}
@@ -14,7 +14,6 @@ local getEnumValues = ____enums.getEnumValues
14
14
  local ____flag = require("functions.flag")
15
15
  local hasFlag = ____flag.hasFlag
16
16
  local ____set = require("functions.set")
17
- local copySet = ____set.copySet
18
17
  local getSortedSetValues = ____set.getSortedSetValues
19
18
  local ____utils = require("functions.utils")
20
19
  local ____repeat = ____utils["repeat"]
@@ -52,7 +51,7 @@ function ____exports.getCollectiblesForCacheFlag(self, cacheFlag)
52
51
  if collectiblesSet == nil then
53
52
  return __TS__New(Set)
54
53
  end
55
- return copySet(nil, collectiblesSet)
54
+ return collectiblesSet
56
55
  end
57
56
  --- Returns an array containing every collectible type that the player has that matches the provided
58
57
  -- CacheFlag.
@@ -8,42 +8,42 @@ local ____firstLast = require("features.firstLast")
8
8
  local getModdedCollectibleTypes = ____firstLast.getModdedCollectibleTypes
9
9
  local ____collectibles = require("functions.collectibles")
10
10
  local getVanillaCollectibleTypeRange = ____collectibles.getVanillaCollectibleTypeRange
11
- local ALL_COLLECTIBLES_ARRAY = {}
12
- local ALL_COLLECTIBLES_SET = __TS__New(Set)
13
- local VANILLA_COLLECTIBLES_ARRAY = {}
14
- local VANILLA_COLLECTIBLES_SET = __TS__New(Set)
15
- local MODDED_COLLECTIBLES_ARRAY = {}
16
- local MODDED_COLLECTIBLES_SET = __TS__New(Set)
17
- local function lazyInitVanillaCollectibles(self)
18
- if #VANILLA_COLLECTIBLES_ARRAY > 0 then
11
+ local ALL_COLLECTIBLE_TYPES_ARRAY = {}
12
+ local ALL_COLLECTIBLE_TYPES_SET = __TS__New(Set)
13
+ local VANILLA_COLLECTIBLE_TYPES_ARRAY = {}
14
+ local VANILLA_COLLECTIBLE_TYPES_SET = __TS__New(Set)
15
+ local MODDED_COLLECTIBLE_TYPES_ARRAY = {}
16
+ local MODDED_COLLECTIBLE_TYPES_SET = __TS__New(Set)
17
+ local function lazyInitVanillaCollectibleTypes(self)
18
+ if #VANILLA_COLLECTIBLE_TYPES_ARRAY > 0 then
19
19
  return
20
20
  end
21
21
  local vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange(nil)
22
22
  for ____, collectibleType in ipairs(vanillaCollectibleTypeRange) do
23
23
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
24
24
  if itemConfigItem ~= nil then
25
- VANILLA_COLLECTIBLES_ARRAY[#VANILLA_COLLECTIBLES_ARRAY + 1] = collectibleType
26
- VANILLA_COLLECTIBLES_SET:add(collectibleType)
25
+ VANILLA_COLLECTIBLE_TYPES_ARRAY[#VANILLA_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
26
+ VANILLA_COLLECTIBLE_TYPES_SET:add(collectibleType)
27
27
  end
28
28
  end
29
29
  end
30
- local function lazyInitModdedCollectibles(self)
31
- if #MODDED_COLLECTIBLES_ARRAY > 0 then
30
+ local function lazyInitModdedCollectibleTypes(self)
31
+ if #MODDED_COLLECTIBLE_TYPES_ARRAY > 0 then
32
32
  return
33
33
  end
34
- lazyInitVanillaCollectibles(nil)
35
- for ____, collectibleType in ipairs(VANILLA_COLLECTIBLES_ARRAY) do
36
- ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
37
- ALL_COLLECTIBLES_SET:add(collectibleType)
34
+ lazyInitVanillaCollectibleTypes(nil)
35
+ for ____, collectibleType in ipairs(VANILLA_COLLECTIBLE_TYPES_ARRAY) do
36
+ ALL_COLLECTIBLE_TYPES_ARRAY[#ALL_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
37
+ ALL_COLLECTIBLE_TYPES_SET:add(collectibleType)
38
38
  end
39
39
  local moddedCollectibleTypes = getModdedCollectibleTypes(nil)
40
40
  for ____, collectibleType in ipairs(moddedCollectibleTypes) do
41
41
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
42
42
  if itemConfigItem ~= nil then
43
- MODDED_COLLECTIBLES_ARRAY[#MODDED_COLLECTIBLES_ARRAY + 1] = collectibleType
44
- MODDED_COLLECTIBLES_SET:add(collectibleType)
45
- ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
46
- ALL_COLLECTIBLES_SET:add(collectibleType)
43
+ MODDED_COLLECTIBLE_TYPES_ARRAY[#MODDED_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
44
+ MODDED_COLLECTIBLE_TYPES_SET:add(collectibleType)
45
+ ALL_COLLECTIBLE_TYPES_ARRAY[#ALL_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
46
+ ALL_COLLECTIBLE_TYPES_SET:add(collectibleType)
47
47
  end
48
48
  end
49
49
  end
@@ -56,8 +56,8 @@ end
56
56
  -- This function can only be called if at least one callback has been executed. This is because not
57
57
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
58
58
  function ____exports.getCollectibleArray(self)
59
- lazyInitModdedCollectibles(nil)
60
- return ALL_COLLECTIBLES_ARRAY
59
+ lazyInitModdedCollectibleTypes(nil)
60
+ return ALL_COLLECTIBLE_TYPES_ARRAY
61
61
  end
62
62
  --- Returns a set containing every valid collectible type in the game, including modded collectibles.
63
63
  --
@@ -67,8 +67,8 @@ end
67
67
  -- This function can only be called if at least one callback has been executed. This is because not
68
68
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
69
69
  function ____exports.getCollectibleSet(self)
70
- lazyInitModdedCollectibles(nil)
71
- return ALL_COLLECTIBLES_SET
70
+ lazyInitModdedCollectibleTypes(nil)
71
+ return ALL_COLLECTIBLE_TYPES_SET
72
72
  end
73
73
  --- Returns an array containing every modded collectible type in the game.
74
74
  --
@@ -78,8 +78,8 @@ end
78
78
  -- This function can only be called if at least one callback has been executed. This is because not
79
79
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
80
80
  function ____exports.getModdedCollectibleArray(self)
81
- lazyInitModdedCollectibles(nil)
82
- return MODDED_COLLECTIBLES_ARRAY
81
+ lazyInitModdedCollectibleTypes(nil)
82
+ return MODDED_COLLECTIBLE_TYPES_ARRAY
83
83
  end
84
84
  --- Returns a set containing every modded collectible type in the game.
85
85
  --
@@ -89,23 +89,23 @@ end
89
89
  -- This function can only be called if at least one callback has been executed. This is because not
90
90
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
91
91
  function ____exports.getModdedCollectibleSet(self)
92
- lazyInitModdedCollectibles(nil)
93
- return MODDED_COLLECTIBLES_SET
92
+ lazyInitModdedCollectibleTypes(nil)
93
+ return MODDED_COLLECTIBLE_TYPES_SET
94
94
  end
95
95
  --- Returns an array containing every valid vanilla collectible type in the game.
96
96
  --
97
97
  -- Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
98
98
  -- then use the `getVanillaCollectibleSet` helper function instead.
99
99
  function ____exports.getVanillaCollectibleArray(self)
100
- lazyInitVanillaCollectibles(nil)
101
- return VANILLA_COLLECTIBLES_ARRAY
100
+ lazyInitVanillaCollectibleTypes(nil)
101
+ return VANILLA_COLLECTIBLE_TYPES_ARRAY
102
102
  end
103
103
  --- Returns a set containing every valid vanilla collectible type in the game.
104
104
  --
105
105
  -- Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
106
106
  -- then use the `getVanillaCollectibleArray` helper function instead.
107
107
  function ____exports.getVanillaCollectibleSet(self)
108
- lazyInitVanillaCollectibles(nil)
109
- return VANILLA_COLLECTIBLES_SET
108
+ lazyInitVanillaCollectibleTypes(nil)
109
+ return VANILLA_COLLECTIBLE_TYPES_SET
110
110
  end
111
111
  return ____exports
@@ -10,7 +10,7 @@ export declare function collectibleHasTag(collectibleType: CollectibleType, tag:
10
10
  * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
11
11
  * ```
12
12
  */
13
- export declare function getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): Set<CollectibleType>;
13
+ export declare function getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
14
14
  /** Returns the number of items that a player has towards a particular transformation. */
15
15
  export declare function getPlayerNumCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): int;
16
16
  export declare function isQuestCollectible(collectibleType: CollectibleType): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"collectibleTag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAqC9E,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,aAAa,GACjB,OAAO,CAOT;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,GAC3B,GAAG,CAAC,eAAe,CAAC,CActB;AAED,yFAAyF;AACzF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,aAAa,GAC3B,GAAG,CAGL;AAED,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAE5E"}
1
+ {"version":3,"file":"collectibleTag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAoC9E,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,aAAa,GACjB,OAAO,CAOT;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,GAC3B,WAAW,CAAC,eAAe,CAAC,CAc9B;AAED,yFAAyF;AACzF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,aAAa,GAC3B,GAAG,CAGL;AAED,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAE5E"}
@@ -16,8 +16,6 @@ local ____flag = require("functions.flag")
16
16
  local getFlagName = ____flag.getFlagName
17
17
  local ____players = require("functions.players")
18
18
  local getPlayerCollectibleCount = ____players.getPlayerCollectibleCount
19
- local ____set = require("functions.set")
20
- local copySet = ____set.copySet
21
19
  function ____exports.collectibleHasTag(self, collectibleType, tag)
22
20
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
23
21
  if itemConfigItem == nil then
@@ -66,7 +64,7 @@ function ____exports.getCollectibleTypesWithTag(self, itemConfigTag)
66
64
  if collectibleTypes == nil then
67
65
  error(("The item config tag of " .. tostring(itemConfigTag)) .. " is not a valid value of the ItemConfigTag enum.")
68
66
  end
69
- return copySet(nil, collectibleTypes)
67
+ return collectibleTypes
70
68
  end
71
69
  --- Returns the number of items that a player has towards a particular transformation.
72
70
  function ____exports.getPlayerNumCollectiblesWithTag(self, player, itemConfigTag)
@@ -1,4 +1,4 @@
1
1
  import { CollectibleType } from "isaac-typescript-definitions";
2
- export declare function getEdenPassives(): Set<CollectibleType>;
2
+ export declare function getEdenPassives(): ReadonlySet<CollectibleType>;
3
3
  export declare function getRandomEdenPassive(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
4
4
  //# sourceMappingURL=eden.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eden.d.ts","sourceRoot":"","sources":["../../src/functions/eden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,8BAA8B,CAAC;AAqB9E,wBAAgB,eAAe,IAAI,GAAG,CAAC,eAAe,CAAC,CAOtD;AAED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe,CAWjB"}
1
+ {"version":3,"file":"eden.d.ts","sourceRoot":"","sources":["../../src/functions/eden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,8BAA8B,CAAC;AAqB9E,wBAAgB,eAAe,IAAI,WAAW,CAAC,eAAe,CAAC,CAO9D;AAED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe,CAWjB"}
@@ -14,7 +14,6 @@ local collectibleHasTag = ____collectibleTag.collectibleHasTag
14
14
  local ____rng = require("functions.rng")
15
15
  local getRandomSeed = ____rng.getRandomSeed
16
16
  local ____set = require("functions.set")
17
- local copySet = ____set.copySet
18
17
  local getRandomSetElement = ____set.getRandomSetElement
19
18
  local EDEN_PASSIVE_COLLECTIBLES_SET = __TS__New(Set)
20
19
  local function initCollectibleSet(self)
@@ -28,7 +27,7 @@ function ____exports.getEdenPassives(self)
28
27
  if EDEN_PASSIVE_COLLECTIBLES_SET.size == 0 then
29
28
  initCollectibleSet(nil)
30
29
  end
31
- return copySet(nil, EDEN_PASSIVE_COLLECTIBLES_SET)
30
+ return EDEN_PASSIVE_COLLECTIBLES_SET
32
31
  end
33
32
  function ____exports.getRandomEdenPassive(self, seedOrRNG, exceptions)
34
33
  if seedOrRNG == nil then
@@ -9,7 +9,7 @@ import { CollectibleType, TrinketType } from "isaac-typescript-definitions";
9
9
  * @param pruneConditionalItems Whether or not collectibles that only grant flight conditionally
10
10
  * should be included in the set (like Empty Vessel).
11
11
  */
12
- export declare function getFlyingCollectibles(pruneConditionalItems: boolean): Set<CollectibleType>;
12
+ export declare function getFlyingCollectibles(pruneConditionalItems: boolean): ReadonlySet<CollectibleType>;
13
13
  /**
14
14
  * Returns a set of all of the trinkets that grant flight. (All trinkets that grant flight do so
15
15
  * conditionally, like Bat Wing.)
@@ -1 +1 @@
1
- {"version":3,"file":"flying.d.ts","sourceRoot":"","sources":["../../src/functions/flying.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AA+BtC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,qBAAqB,EAAE,OAAO,GAC7B,GAAG,CAAC,eAAe,CAAC,CAwBtB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,WAAW,CAAC,CAI5D;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CA0BtE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAG/D"}
1
+ {"version":3,"file":"flying.d.ts","sourceRoot":"","sources":["../../src/functions/flying.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AA+BtC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,qBAAqB,EAAE,OAAO,GAC7B,WAAW,CAAC,eAAe,CAAC,CAwB9B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,WAAW,CAAC,CAI5D;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CA0BtE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAG/D"}
@@ -34,7 +34,10 @@ local CONDITIONAL_FLYING_COLLECTIBLE_TYPES = {CollectibleType.BIBLE, Collectible
34
34
  -- @param pruneConditionalItems Whether or not collectibles that only grant flight conditionally
35
35
  -- should be included in the set (like Empty Vessel).
36
36
  function ____exports.getFlyingCollectibles(self, pruneConditionalItems)
37
- local collectiblesWithFlyingCacheFlag = getCollectiblesForCacheFlag(nil, CacheFlag.FLYING)
37
+ local collectiblesWithFlyingCacheFlag = copySet(
38
+ nil,
39
+ getCollectiblesForCacheFlag(nil, CacheFlag.FLYING)
40
+ )
38
41
  local collectiblesWithAllCacheFlag = getCollectiblesForCacheFlag(nil, CacheFlag.ALL)
39
42
  deleteSetsFromSet(nil, collectiblesWithFlyingCacheFlag, collectiblesWithAllCacheFlag)
40
43
  if pruneConditionalItems then
@@ -47,7 +50,7 @@ end
47
50
  --- Returns a set of all of the trinkets that grant flight. (All trinkets that grant flight do so
48
51
  -- conditionally, like Bat Wing.)
49
52
  function ____exports.getFlyingTrinkets(self)
50
- return copySet(nil, FLYING_TRINKETS)
53
+ return FLYING_TRINKETS
51
54
  end
52
55
  function ____exports.hasFlyingTemporaryEffect(self, player)
53
56
  local effects = player:GetEffects()
@@ -1,8 +1,8 @@
1
1
  import { ButtonAction, Controller, Keyboard } from "isaac-typescript-definitions";
2
2
  /** Helper function to get the enum name for the specified `Controller` value. */
3
3
  export declare function controllerToString(controller: Controller): string | undefined;
4
- export declare function getMoveActions(): Set<ButtonAction>;
5
- export declare function getShootActions(): Set<ButtonAction>;
4
+ export declare function getMoveActions(): ReadonlySet<ButtonAction>;
5
+ export declare function getShootActions(): ReadonlySet<ButtonAction>;
6
6
  /** Iterates over all inputs to determine if a particular button is pressed (i.e. held down). */
7
7
  export declare function isActionPressedOnAnyInput(buttonAction: ButtonAction): boolean;
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/functions/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuCtC,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAO7E;AAED,wB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AG,OAAO,CAK7E;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,YAAY,GACzB,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI9D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEhE;AAED,wBAAgB,6BAA6B,IAAI,OAAO,CAIvD;AAED,wBAAgB,+BAA+B,IAAI,OAAO,CAIzD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEjE;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAIxD;AAED,wBAAgB,gCAAgC,IAAI,OAAO,CAI1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,GACjB,MAAM,GAAG,SAAS,CAQpB"}
@@ -12,8 +12,6 @@ local ____keyboardToString = require("maps.keyboardToString")
12
12
  local KEYBOARD_TO_STRING = ____keyboardToString.KEYBOARD_TO_STRING
13
13
  local ____enums = require("functions.enums")
14
14
  local getEnumValues = ____enums.getEnumValues
15
- local ____set = require("functions.set")
16
- local copySet = ____set.copySet
17
15
  local ____string = require("functions.string")
18
16
  local trimPrefix = ____string.trimPrefix
19
17
  local MODIFIER_KEYS = {
@@ -39,10 +37,10 @@ function ____exports.controllerToString(self, controller)
39
37
  return trimPrefix(nil, key, "BUTTON_")
40
38
  end
41
39
  function ____exports.getMoveActions(self)
42
- return copySet(nil, MOVEMENT_ACTIONS_SET)
40
+ return MOVEMENT_ACTIONS_SET
43
41
  end
44
42
  function ____exports.getShootActions(self)
45
- return copySet(nil, SHOOTING_ACTIONS_SET)
43
+ return SHOOTING_ACTIONS_SET
46
44
  end
47
45
  --- Iterates over all inputs to determine if a particular button is pressed (i.e. held down).
48
46
  function ____exports.isActionPressedOnAnyInput(self, buttonAction)
@@ -3,6 +3,47 @@
3
3
  import { HealthType } from "../enums/HealthType";
4
4
  import { PlayerHealth } from "../interfaces/PlayerHealth";
5
5
  export declare function addPlayerHealthType(player: EntityPlayer, healthType: HealthType, numHearts: int): void;
6
+ /**
7
+ * Returns whether or not all of the player's soul-heart-type hearts are black hearts.
8
+ *
9
+ * Note that this function does not consider red heart containers.
10
+ *
11
+ * For example:
12
+ *
13
+ * - If the player has one black heart, this function would return true.
14
+ * - If the player has one soul heart and two black hearts, this function would return false.
15
+ * - If the player has no black hearts, this function will return false.
16
+ * - If the player has one red heart container and three black hearts, this function would return
17
+ * true.
18
+ */
19
+ export declare function doesPlayerHaveAllBlackHearts(player: EntityPlayer): boolean;
20
+ /**
21
+ * Returns whether or not all of the player's soul-heart-type hearts are soul hearts.
22
+ *
23
+ * Note that this function does not consider red heart containers.
24
+ *
25
+ * For example:
26
+ *
27
+ * - If the player has two soul hearts and one black heart, this function would return false.
28
+ * - If the player has no soul hearts, this function will return false.
29
+ * - If the player has one red heart container and three soul hearts, this function would return
30
+ * true.
31
+ */
32
+ export declare function doesPlayerHaveAllSoulHearts(player: EntityPlayer): boolean;
33
+ /**
34
+ * Returns the number of slots that the player has remaining for new heart containers, accounting
35
+ * for broken hearts. For example, if the player is Judas and has 1 red heart containers and 2 full
36
+ * soul hearts and 3 broken hearts, then this function would return 6 (i.e. 12 - 1 - 2 - 3).
37
+ */
38
+ export declare function getPlayerAvailableHeartSlots(player: EntityPlayer): int;
39
+ /**
40
+ * Returns the number of black hearts that the player has, excluding any soul hearts. For example,
41
+ * if the player has one full black heart, one full soul heart, and one half black heart, this
42
+ * function returns 3.
43
+ *
44
+ * This is different from the `EntityPlayer.GetBlackHearts` method, since that returns a bitmask.
45
+ */
46
+ export declare function getPlayerBlackHearts(player: EntityPlayer): int;
6
47
  /**
7
48
  * Helper function to get an object representing the player's health. You can use this in
8
49
  * combination with the `setPlayerHealth` function to restore the player's health back to a certain
@@ -12,6 +53,47 @@ export declare function addPlayerHealthType(player: EntityPlayer, healthType: He
12
53
  */
13
54
  export declare function getPlayerHealth(player: EntityPlayer): PlayerHealth;
14
55
  export declare function getPlayerHealthType(player: EntityPlayer, healthType: HealthType): int;
56
+ /**
57
+ * Returns the number of red hearts that the player has, excluding any rotten hearts. For example,
58
+ * if the player has one full black heart, one full soul heart, and one half black heart, this
59
+ * function returns 3.
60
+ *
61
+ * This is different from the `EntityPlayer.GetHearts` method, since that returns a value that
62
+ * includes rotten hearts.
63
+ */
64
+ export declare function getPlayerHearts(player: EntityPlayer): int;
65
+ /**
66
+ * Helper function that returns the type of the rightmost heart. This does not including golden
67
+ * hearts or broken hearts, since they cannot be damaged directly.
68
+ */
69
+ export declare function getPlayerLastHeart(player: EntityPlayer): HealthType;
70
+ /**
71
+ * Returns the maximum heart containers that the provided player can have. Normally, this is 12, but
72
+ * it can change depending on the character (e.g. Keeper) and other things (e.g. Mother's Kiss).
73
+ * This function does not account for Broken Hearts; use the `getPlayerAvailableHeartSlots` helper
74
+ * function for that.
75
+ */
76
+ export declare function getPlayerMaxHeartContainers(player: EntityPlayer): int;
77
+ /**
78
+ * Returns the number of soul hearts that the player has, excluding any black hearts. For example,
79
+ * if the player has one full black heart, one full soul heart, and one half black heart, this
80
+ * function returns 2.
81
+ *
82
+ * This is different from the `EntityPlayer.GetSoulHearts` method, since that returns the combined
83
+ * number of soul hearts and black hearts.
84
+ */
85
+ export declare function getPlayerSoulHearts(player: EntityPlayer): int;
86
+ /**
87
+ * Helper function to determine how many heart containers that Tainted Magdalene has that will not
88
+ * be automatically depleted over time. By default, this is 2, but this function will return 4 so
89
+ * that it is consistent with the `player.GetHearts` and `player.GetMaxHearts` methods.
90
+ *
91
+ * If Tainted Magdalene has Birthright, she will gained an additional non-temporary heart container.
92
+ *
93
+ * This function does not validate whether or not the provided player is Tainted Magdalene; that
94
+ * should be accomplished before invoking this function.
95
+ */
96
+ export declare function getTaintedMagdaleneNonTemporaryMaxHearts(player: EntityPlayer): int;
15
97
  /** Returns a `PlayerHealth` object with all zeros. */
16
98
  export declare function newPlayerHealth(): PlayerHealth;
17
99
  export declare function playerConvertBlackHeartsToSoulHearts(player: EntityPlayer): void;
@@ -32,4 +114,15 @@ export declare function removeAllPlayerHealth(player: EntityPlayer): void;
32
114
  * Based on the `REVEL.LoadHealth` function in the Revelations mod.
33
115
  */
34
116
  export declare function setPlayerHealth(player: EntityPlayer, playerHealth: PlayerHealth): void;
117
+ /**
118
+ * Helper function to see if a certain damage amount would deal "permanent" damage to Tainted
119
+ * Magdalene.
120
+ *
121
+ * Tainted Magdalene has "permanent" health and "temporary" health. When standing still and doing
122
+ * nothing, all of Tainted Magdalene's temporary health will eventually go away.
123
+ *
124
+ * Before using this function, it is expected that you check to see if the player is Tainted
125
+ * Magdalene first, or else it will give a nonsensical result.
126
+ */
127
+ export declare function wouldDamageTaintedMagdaleneNonTemporaryHeartContainers(player: EntityPlayer, damageAmount: float): boolean;
35
128
  //# sourceMappingURL=playerHealth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"playerHealth.d.ts","sourceRoot":"","sources":["../../src/functions/playerHealth.ts"],"names":[],"mappings":";;AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAiB,MAAM,4BAA4B,CAAC;AAYzE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,GAAG,GACb,IAAI,CA+CN;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CA2ElE;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,GAAG,CAmDL;AAED,sDAAsD;AACtD,wBAAgB,eAAe,IAAI,YAAY,CAc9C;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,YA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