isaacscript-common 13.3.4 → 14.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 (668) hide show
  1. package/dist/index.d.ts +1644 -441
  2. package/dist/isaacscript-common.lua +19643 -16276
  3. package/dist/src/callbacks/customRevive.lua +10 -1
  4. package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
  5. package/dist/src/callbacks/postAmbush.lua +7 -12
  6. package/dist/src/callbacks/postBombExploded.lua +3 -3
  7. package/dist/src/callbacks/postDoorRender.lua +2 -2
  8. package/dist/src/callbacks/postEffectStateChanged.lua +3 -3
  9. package/dist/src/callbacks/postFamiliarStateChanged.lua +3 -3
  10. package/dist/src/callbacks/postFlip.lua +1 -1
  11. package/dist/src/callbacks/postGridEntity.lua +2 -2
  12. package/dist/src/callbacks/postNPCStateChanged.lua +3 -3
  13. package/dist/src/callbacks/postPickupStateChanged.lua +3 -3
  14. package/dist/src/callbacks/postPlayerCollectible.d.ts.map +1 -1
  15. package/dist/src/callbacks/postPlayerCollectible.lua +5 -9
  16. package/dist/src/callbacks/postRoomClearChanged.d.ts.map +1 -1
  17. package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
  18. package/dist/src/callbacks/reorderedCallbacks.lua +7 -7
  19. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
  20. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
  21. package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
  22. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
  23. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
  24. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
  25. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
  26. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
  27. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
  28. package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
  29. package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts +1 -1
  30. package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts.map +1 -1
  31. package/dist/src/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
  32. package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts +1 -1
  33. package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts.map +1 -1
  34. package/dist/src/callbacks/subscriptions/postGridEntityInit.lua +3 -3
  35. package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts +3 -3
  36. package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts.map +1 -1
  37. package/dist/src/callbacks/subscriptions/postGridEntityRemove.lua +4 -4
  38. package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts +1 -1
  39. package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts.map +1 -1
  40. package/dist/src/callbacks/subscriptions/postGridEntityRender.lua +3 -3
  41. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts +1 -1
  42. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts.map +1 -1
  43. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.lua +3 -3
  44. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts +1 -1
  45. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts.map +1 -1
  46. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
  47. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -1
  48. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
  49. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
  50. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
  51. package/dist/src/callbacks/subscriptions/postRockRender.d.ts +1 -1
  52. package/dist/src/callbacks/subscriptions/postRockRender.d.ts.map +1 -1
  53. package/dist/src/callbacks/subscriptions/postRockRender.lua +3 -3
  54. package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts +1 -1
  55. package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts.map +1 -1
  56. package/dist/src/callbacks/subscriptions/postRockUpdate.lua +3 -3
  57. package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts +1 -1
  58. package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts.map +1 -1
  59. package/dist/src/callbacks/subscriptions/postSpikesRender.lua +3 -3
  60. package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts +1 -1
  61. package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts.map +1 -1
  62. package/dist/src/callbacks/subscriptions/postSpikesUpdate.lua +3 -3
  63. package/dist/src/callbacks/subscriptions/postTNTRender.d.ts +1 -1
  64. package/dist/src/callbacks/subscriptions/postTNTRender.d.ts.map +1 -1
  65. package/dist/src/callbacks/subscriptions/postTNTRender.lua +3 -3
  66. package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts +1 -1
  67. package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts.map +1 -1
  68. package/dist/src/callbacks/subscriptions/postTNTUpdate.lua +3 -3
  69. package/dist/src/callbacks.d.ts +106 -0
  70. package/dist/src/callbacks.d.ts.map +1 -0
  71. package/dist/src/callbacks.lua +176 -0
  72. package/dist/src/classes/DefaultMap.d.ts.map +1 -1
  73. package/dist/src/classes/ModFeature.d.ts +11 -0
  74. package/dist/src/classes/ModFeature.d.ts.map +1 -0
  75. package/dist/src/classes/ModFeature.lua +13 -0
  76. package/dist/src/classes/ModUpgraded.d.ts +49 -11
  77. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  78. package/dist/src/classes/ModUpgraded.lua +118 -16
  79. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
  80. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
  81. package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
  82. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
  83. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
  84. package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
  85. package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
  86. package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
  87. package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
  88. package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
  89. package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
  90. package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
  91. package/dist/src/classes/callbacks/PostBoneSwing.d.ts +14 -0
  92. package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
  93. package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
  94. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
  95. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
  96. package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
  97. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
  98. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
  99. package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
  100. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +20 -0
  101. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
  102. package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
  103. package/dist/src/classes/callbacks/PostCustomRevive.d.ts +6 -0
  104. package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -0
  105. package/dist/src/classes/callbacks/PostCustomRevive.lua +17 -0
  106. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts +15 -0
  107. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -0
  108. package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +44 -0
  109. package/dist/src/classes/callbacks/PostDoorRender.d.ts +7 -0
  110. package/dist/src/classes/callbacks/PostDoorRender.d.ts.map +1 -0
  111. package/dist/src/classes/callbacks/PostDoorRender.lua +24 -0
  112. package/dist/src/classes/callbacks/PostDoorUpdate.d.ts +7 -0
  113. package/dist/src/classes/callbacks/PostDoorUpdate.d.ts.map +1 -0
  114. package/dist/src/classes/callbacks/PostDoorUpdate.lua +24 -0
  115. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts +12 -0
  116. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts.map +1 -0
  117. package/dist/src/classes/callbacks/PostEffectInitLate.lua +27 -0
  118. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts +13 -0
  119. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts.map +1 -0
  120. package/dist/src/classes/callbacks/PostEffectStateChanged.lua +33 -0
  121. package/dist/src/classes/callbacks/PostEsauJr.d.ts +6 -0
  122. package/dist/src/classes/callbacks/PostEsauJr.d.ts.map +1 -0
  123. package/dist/src/classes/callbacks/PostEsauJr.lua +17 -0
  124. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts +12 -0
  125. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts.map +1 -0
  126. package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +27 -0
  127. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts +13 -0
  128. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts.map +1 -0
  129. package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +33 -0
  130. package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts +6 -0
  131. package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts.map +1 -0
  132. package/dist/src/classes/callbacks/PostFirstEsauJr.lua +17 -0
  133. package/dist/src/classes/callbacks/PostFirstFlip.d.ts +6 -0
  134. package/dist/src/classes/callbacks/PostFirstFlip.d.ts.map +1 -0
  135. package/dist/src/classes/callbacks/PostFirstFlip.lua +17 -0
  136. package/dist/src/classes/callbacks/PostFlip.d.ts +6 -0
  137. package/dist/src/classes/callbacks/PostFlip.d.ts.map +1 -0
  138. package/dist/src/classes/callbacks/PostFlip.lua +17 -0
  139. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts +6 -0
  140. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts.map +1 -0
  141. package/dist/src/classes/callbacks/PostGameStartedReordered.lua +17 -0
  142. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts +6 -0
  143. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts.map +1 -0
  144. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.lua +17 -0
  145. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts +12 -0
  146. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -0
  147. package/dist/src/classes/callbacks/PostGreedModeWave.lua +34 -0
  148. package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts +6 -0
  149. package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts.map +1 -0
  150. package/dist/src/classes/callbacks/PostGridEntityBroken.lua +17 -0
  151. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +9 -0
  152. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -0
  153. package/dist/src/classes/callbacks/PostGridEntityCollision.lua +36 -0
  154. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts +6 -0
  155. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts.map +1 -0
  156. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.lua +17 -0
  157. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +9 -0
  158. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -0
  159. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.lua +31 -0
  160. package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts +6 -0
  161. package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts.map +1 -0
  162. package/dist/src/classes/callbacks/PostGridEntityCustomInit.lua +17 -0
  163. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts +9 -0
  164. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -0
  165. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.lua +25 -0
  166. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts +6 -0
  167. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts.map +1 -0
  168. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.lua +17 -0
  169. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts +6 -0
  170. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts.map +1 -0
  171. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.lua +17 -0
  172. package/dist/src/classes/callbacks/PostGridEntityInit.d.ts +6 -0
  173. package/dist/src/classes/callbacks/PostGridEntityInit.d.ts.map +1 -0
  174. package/dist/src/classes/callbacks/PostGridEntityInit.lua +17 -0
  175. package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts +9 -0
  176. package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -0
  177. package/dist/src/classes/callbacks/PostGridEntityRemove.lua +28 -0
  178. package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts +6 -0
  179. package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts.map +1 -0
  180. package/dist/src/classes/callbacks/PostGridEntityStateChanged.lua +17 -0
  181. package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts +6 -0
  182. package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts.map +1 -0
  183. package/dist/src/classes/callbacks/PostGridEntityUpdate.lua +17 -0
  184. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts +14 -0
  185. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -0
  186. package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +35 -0
  187. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +12 -0
  188. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
  189. package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
  190. package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts +6 -0
  191. package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts.map +1 -0
  192. package/dist/src/classes/callbacks/PostNewLevelReordered.lua +17 -0
  193. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +13 -0
  194. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
  195. package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
  196. package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts +6 -0
  197. package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts.map +1 -0
  198. package/dist/src/classes/callbacks/PostNewRoomReordered.lua +17 -0
  199. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts +6 -0
  200. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts.map +1 -0
  201. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.lua +17 -0
  202. package/dist/src/classes/callbacks/PostPitRender.d.ts +7 -0
  203. package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
  204. package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
  205. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts +15 -0
  206. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -0
  207. package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +87 -0
  208. package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts +6 -0
  209. package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts.map +1 -0
  210. package/dist/src/classes/callbacks/PostPlayerRenderReordered.lua +17 -0
  211. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts +6 -0
  212. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts.map +1 -0
  213. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.lua +17 -0
  214. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +13 -0
  215. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
  216. package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
  217. package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
  218. package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
  219. package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
  220. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts +7 -0
  221. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts.map +1 -0
  222. package/dist/src/classes/callbacks/PreBerserkDeath.lua +36 -0
  223. package/dist/src/classes/callbacks/PreCustomRevive.d.ts +6 -0
  224. package/dist/src/classes/callbacks/PreCustomRevive.d.ts.map +1 -0
  225. package/dist/src/classes/callbacks/PreCustomRevive.lua +17 -0
  226. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +10 -0
  227. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
  228. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
  229. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
  230. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
  231. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
  232. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
  233. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
  234. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
  235. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts +10 -0
  236. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts.map +1 -0
  237. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.lua +20 -0
  238. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts +11 -0
  239. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts.map +1 -0
  240. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.lua +19 -0
  241. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts +11 -0
  242. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts.map +1 -0
  243. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.lua +19 -0
  244. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts +11 -0
  245. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts.map +1 -0
  246. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.lua +24 -0
  247. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts +10 -0
  248. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts.map +1 -0
  249. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.lua +19 -0
  250. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +10 -0
  251. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
  252. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
  253. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
  254. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
  255. package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
  256. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
  257. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
  258. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
  259. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts +11 -0
  260. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts.map +1 -0
  261. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.lua +19 -0
  262. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +10 -0
  263. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
  264. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
  265. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +134 -0
  266. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -0
  267. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +220 -0
  268. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +39 -0
  269. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -0
  270. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +140 -0
  271. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts +19 -0
  272. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -0
  273. package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +52 -0
  274. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts +16 -0
  275. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -0
  276. package/dist/src/classes/features/callbackLogic/FlipDetection.lua +58 -0
  277. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +27 -0
  278. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -0
  279. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +108 -0
  280. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts +19 -0
  281. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -0
  282. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +69 -0
  283. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts +46 -0
  284. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts.map +1 -0
  285. package/dist/src/classes/features/callbackLogic/GridEntityDetection.lua +126 -0
  286. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts +24 -0
  287. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -0
  288. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +72 -0
  289. package/dist/src/classes/features/other/RunInNFrames.d.ts +123 -0
  290. package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -0
  291. package/dist/src/classes/features/other/RunInNFrames.lua +109 -0
  292. package/dist/src/classes/private/CustomCallback.d.ts +26 -0
  293. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
  294. package/dist/src/classes/private/CustomCallback.lua +63 -0
  295. package/dist/src/classes/private/Feature.d.ts +19 -0
  296. package/dist/src/classes/private/Feature.d.ts.map +1 -0
  297. package/dist/src/classes/private/Feature.lua +16 -0
  298. package/dist/src/core/upgradeMod.d.ts +18 -1
  299. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  300. package/dist/src/core/upgradeMod.lua +44 -9
  301. package/dist/src/decorators.d.ts +9 -0
  302. package/dist/src/decorators.d.ts.map +1 -0
  303. package/dist/src/decorators.lua +12 -0
  304. package/dist/src/enums/ISCFeature.d.ts +12 -0
  305. package/dist/src/enums/ISCFeature.d.ts.map +1 -0
  306. package/dist/src/enums/ISCFeature.lua +12 -0
  307. package/dist/src/enums/LadderSubTypeCustom.d.ts +17 -0
  308. package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
  309. package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
  310. package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
  311. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  312. package/dist/src/enums/ModCallbackCustom.lua +85 -87
  313. package/dist/src/enums/ModCallbackCustom2.d.ts +53 -0
  314. package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
  315. package/dist/src/enums/ModCallbackCustom2.lua +102 -0
  316. package/dist/src/features/customGridEntity.d.ts.map +1 -1
  317. package/dist/src/features/customGridEntity.lua +6 -8
  318. package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
  319. package/dist/src/features/customHotkeys.d.ts.map +1 -0
  320. package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
  321. package/dist/src/features/customPickup.d.ts.map +1 -1
  322. package/dist/src/features/customPickup.lua +6 -2
  323. package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
  324. package/dist/src/features/customStage/backdrop.lua +3 -1
  325. package/dist/src/features/customStage/shadows.d.ts.map +1 -1
  326. package/dist/src/features/customStage/shadows.lua +3 -1
  327. package/dist/src/features/customTrapdoor/init.lua +1 -7
  328. package/dist/src/features/customTrapdoor/touched.lua +1 -1
  329. package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
  330. package/dist/src/features/deployJSONRoom.lua +6 -8
  331. package/dist/src/features/firstLast.d.ts.map +1 -1
  332. package/dist/src/features/firstLast.lua +3 -3
  333. package/dist/src/features/saveDataManager/constants.d.ts +1 -1
  334. package/dist/src/features/saveDataManager/constants.d.ts.map +1 -1
  335. package/dist/src/features/saveDataManager/exports.d.ts +5 -0
  336. package/dist/src/features/saveDataManager/exports.d.ts.map +1 -1
  337. package/dist/src/features/saveDataManager/exports.lua +16 -0
  338. package/dist/src/features/saveDataManager/main.d.ts +8 -2
  339. package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
  340. package/dist/src/features/saveDataManager/main.lua +3 -5
  341. package/dist/src/features/saveDataManager/save.lua +2 -3
  342. package/dist/src/features.d.ts +34 -0
  343. package/dist/src/features.d.ts.map +1 -0
  344. package/dist/src/features.lua +68 -0
  345. package/dist/src/functions/ambush.d.ts +6 -0
  346. package/dist/src/functions/ambush.d.ts.map +1 -1
  347. package/dist/src/functions/ambush.lua +31 -0
  348. package/dist/src/functions/characters.lua +3 -3
  349. package/dist/src/functions/charge.d.ts +30 -8
  350. package/dist/src/functions/charge.d.ts.map +1 -1
  351. package/dist/src/functions/charge.lua +38 -2
  352. package/dist/src/functions/chargeBar.d.ts +6 -0
  353. package/dist/src/functions/chargeBar.d.ts.map +1 -1
  354. package/dist/src/functions/chargeBar.lua +6 -0
  355. package/dist/src/functions/decorators.d.ts +19 -0
  356. package/dist/src/functions/decorators.d.ts.map +1 -0
  357. package/dist/src/functions/decorators.lua +32 -0
  358. package/dist/src/functions/flying.lua +4 -4
  359. package/dist/src/functions/gridEntities.lua +5 -5
  360. package/dist/src/functions/gridEntitiesSpecific.lua +12 -12
  361. package/dist/src/functions/itemPool.lua +2 -2
  362. package/dist/src/functions/minimap.d.ts +4 -0
  363. package/dist/src/functions/minimap.d.ts.map +1 -1
  364. package/dist/src/functions/minimap.lua +4 -0
  365. package/dist/src/functions/playerHealth.lua +6 -6
  366. package/dist/src/functions/playerIndex.lua +2 -2
  367. package/dist/src/functions/players.d.ts +14 -3
  368. package/dist/src/functions/players.d.ts.map +1 -1
  369. package/dist/src/functions/players.lua +35 -16
  370. package/dist/src/functions/pocketItems.lua +1 -1
  371. package/dist/src/functions/roomTransition.d.ts +3 -4
  372. package/dist/src/functions/roomTransition.d.ts.map +1 -1
  373. package/dist/src/functions/roomTransition.lua +4 -32
  374. package/dist/src/functions/rooms.d.ts +1 -1
  375. package/dist/src/functions/rooms.d.ts.map +1 -1
  376. package/dist/src/functions/rooms.lua +1 -1
  377. package/dist/src/functions/run.d.ts +5 -0
  378. package/dist/src/functions/run.d.ts.map +1 -1
  379. package/dist/src/functions/run.lua +6 -0
  380. package/dist/src/functions/spawnCollectible.d.ts +24 -5
  381. package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
  382. package/dist/src/functions/spawnCollectible.lua +44 -4
  383. package/dist/src/functions/table.d.ts +2 -0
  384. package/dist/src/functions/table.d.ts.map +1 -1
  385. package/dist/src/functions/table.lua +7 -0
  386. package/dist/src/functions/trinkets.lua +1 -1
  387. package/dist/src/functions/tstlClass.d.ts +21 -9
  388. package/dist/src/functions/tstlClass.d.ts.map +1 -1
  389. package/dist/src/functions/tstlClass.lua +49 -24
  390. package/dist/src/functions/utils.d.ts +44 -2
  391. package/dist/src/functions/utils.d.ts.map +1 -1
  392. package/dist/src/functions/utils.lua +43 -2
  393. package/dist/src/index.d.ts +15 -2
  394. package/dist/src/index.d.ts.map +1 -1
  395. package/dist/src/index.lua +42 -10
  396. package/dist/src/initCustomCallbacks.d.ts.map +1 -1
  397. package/dist/src/initCustomCallbacks.lua +0 -3
  398. package/dist/src/initFeatures.lua +3 -3
  399. package/dist/src/interfaces/SaveData.d.ts.map +1 -1
  400. package/dist/src/interfaces/{private/TSTLClassMetatable.d.ts → TSTLClassMetatable.d.ts} +0 -0
  401. package/dist/src/interfaces/TSTLClassMetatable.d.ts.map +1 -0
  402. package/dist/src/interfaces/{private/TSTLClassMetatable.lua → TSTLClassMetatable.lua} +0 -0
  403. package/dist/src/interfaces/private/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
  404. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
  405. package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +3 -0
  406. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +201 -0
  407. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
  408. package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +7 -0
  409. package/dist/src/maps/characterNameToTypeMap.lua +12 -12
  410. package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
  411. package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
  412. package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
  413. package/dist/src/objects/characterDamageMultipliers.lua +6 -6
  414. package/dist/src/objects/characterNames.lua +6 -6
  415. package/dist/src/objects/playerNamePNGFileNames.lua +6 -6
  416. package/dist/src/objects/playerPortraitPNGFileNames.lua +6 -6
  417. package/dist/src/sets/charactersThatStartWithAnActiveItemSet.lua +1 -1
  418. package/dist/src/sets/charactersWithFreeDevilDealsSet.d.ts.map +1 -1
  419. package/dist/src/sets/charactersWithFreeDevilDealsSet.lua +1 -1
  420. package/dist/src/sets/charactersWithNoRedHeartsSet.lua +3 -3
  421. package/dist/src/sets/charactersWithNoSoulHeartsSet.lua +2 -2
  422. package/dist/src/sets/lostStyleCharactersSet.lua +4 -4
  423. package/dist/src/types/AllButFirst.d.ts +5 -0
  424. package/dist/src/types/AllButFirst.d.ts.map +1 -0
  425. package/dist/src/types/AllButFirst.lua +2 -0
  426. package/dist/src/types/AllButLast.d.ts +2 -0
  427. package/dist/src/types/AllButLast.d.ts.map +1 -0
  428. package/dist/src/types/AllButLast.lua +2 -0
  429. package/dist/src/types/Constructor.d.ts +2 -0
  430. package/dist/src/types/Constructor.d.ts.map +1 -0
  431. package/dist/src/types/Constructor.lua +2 -0
  432. package/dist/src/types/FunctionTuple.d.ts +5 -0
  433. package/dist/src/types/FunctionTuple.d.ts.map +1 -0
  434. package/dist/src/types/FunctionTuple.lua +2 -0
  435. package/dist/src/types/HasAllEnumKeys.d.ts +26 -0
  436. package/dist/src/types/HasAllEnumKeys.d.ts.map +1 -0
  437. package/dist/src/types/HasAllEnumKeys.lua +2 -0
  438. package/dist/src/types/LowercaseKeys.d.ts +3 -0
  439. package/dist/src/types/LowercaseKeys.d.ts.map +1 -0
  440. package/dist/src/types/LowercaseKeys.lua +2 -0
  441. package/dist/src/types/StartsWithLowercase.d.ts +2 -0
  442. package/dist/src/types/StartsWithLowercase.d.ts.map +1 -0
  443. package/dist/src/types/StartsWithLowercase.lua +2 -0
  444. package/dist/src/types/StartsWithUppercase.d.ts +2 -0
  445. package/dist/src/types/StartsWithUppercase.d.ts.map +1 -0
  446. package/dist/src/types/StartsWithUppercase.lua +2 -0
  447. package/dist/src/types/UnionToIntersection.d.ts +3 -0
  448. package/dist/src/types/UnionToIntersection.d.ts.map +1 -0
  449. package/dist/src/types/UnionToIntersection.lua +2 -0
  450. package/dist/src/types/UppercaseKeys.d.ts +3 -0
  451. package/dist/src/types/UppercaseKeys.d.ts.map +1 -0
  452. package/dist/src/types/UppercaseKeys.lua +2 -0
  453. package/dist/src/types/private/AllButFirst.d.ts +5 -0
  454. package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
  455. package/dist/src/types/private/AllButFirst.lua +2 -0
  456. package/dist/src/types/private/CallbackTuple.d.ts +20 -0
  457. package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
  458. package/dist/src/types/private/CallbackTuple.lua +2 -0
  459. package/dist/src/types/private/MatchingCallbackCustom.d.ts +16 -0
  460. package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
  461. package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
  462. package/package.json +2 -2
  463. package/src/callbacks/customRevive.ts +13 -1
  464. package/src/callbacks/postAmbush.ts +7 -14
  465. package/src/callbacks/postBombExploded.ts +1 -1
  466. package/src/callbacks/postBoneSwing.ts +2 -1
  467. package/src/callbacks/postCollectibleEmpty.ts +2 -0
  468. package/src/callbacks/postCollectibleInitFirst.ts +2 -0
  469. package/src/callbacks/postDoorRender.ts +2 -2
  470. package/src/callbacks/postEffectStateChanged.ts +3 -6
  471. package/src/callbacks/postFamiliarStateChanged.ts +3 -3
  472. package/src/callbacks/postFlip.ts +2 -2
  473. package/src/callbacks/postGridEntity.ts +3 -7
  474. package/src/callbacks/postNPCStateChanged.ts +3 -3
  475. package/src/callbacks/postNewRoomEarly.ts +1 -1
  476. package/src/callbacks/postPickupStateChanged.ts +3 -6
  477. package/src/callbacks/postPlayerCollectible.ts +8 -12
  478. package/src/callbacks/postRoomClearChanged.ts +3 -7
  479. package/src/callbacks/reorderedCallbacks.ts +6 -6
  480. package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
  481. package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
  482. package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
  483. package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
  484. package/src/callbacks/subscriptions/postGridEntityBroken.ts +4 -7
  485. package/src/callbacks/subscriptions/postGridEntityCollision.ts +4 -4
  486. package/src/callbacks/subscriptions/postGridEntityInit.ts +4 -7
  487. package/src/callbacks/subscriptions/postGridEntityRemove.ts +10 -9
  488. package/src/callbacks/subscriptions/postGridEntityRender.ts +4 -7
  489. package/src/callbacks/subscriptions/postGridEntityStateChanged.ts +4 -7
  490. package/src/callbacks/subscriptions/postGridEntityUpdate.ts +4 -7
  491. package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +9 -2
  492. package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
  493. package/src/callbacks/subscriptions/postRockRender.ts +6 -7
  494. package/src/callbacks/subscriptions/postRockUpdate.ts +6 -7
  495. package/src/callbacks/subscriptions/postSpikesRender.ts +4 -7
  496. package/src/callbacks/subscriptions/postSpikesUpdate.ts +4 -7
  497. package/src/callbacks/subscriptions/postTNTRender.ts +4 -7
  498. package/src/callbacks/subscriptions/postTNTUpdate.ts +4 -7
  499. package/src/callbacks.ts +134 -0
  500. package/src/classes/DefaultMap.ts +3 -3
  501. package/src/classes/ModFeature.ts +14 -0
  502. package/src/classes/ModUpgraded.ts +205 -45
  503. package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
  504. package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
  505. package/src/classes/callbacks/PostBombExploded.ts +21 -0
  506. package/src/classes/callbacks/PostBombInitLate.ts +28 -0
  507. package/src/classes/callbacks/PostBoneSwing.ts +61 -0
  508. package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
  509. package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
  510. package/src/classes/callbacks/PostCursedTeleport.ts +186 -0
  511. package/src/classes/callbacks/PostCustomRevive.ts +11 -0
  512. package/src/classes/callbacks/PostDiceRoomActivated.ts +68 -0
  513. package/src/classes/callbacks/PostDoorRender.ts +19 -0
  514. package/src/classes/callbacks/PostDoorUpdate.ts +19 -0
  515. package/src/classes/callbacks/PostEffectInitLate.ts +28 -0
  516. package/src/classes/callbacks/PostEffectStateChanged.ts +35 -0
  517. package/src/classes/callbacks/PostEsauJr.ts +11 -0
  518. package/src/classes/callbacks/PostFamiliarInitLate.ts +28 -0
  519. package/src/classes/callbacks/PostFamiliarStateChanged.ts +35 -0
  520. package/src/classes/callbacks/PostFirstEsauJr.ts +11 -0
  521. package/src/classes/callbacks/PostFirstFlip.ts +11 -0
  522. package/src/classes/callbacks/PostFlip.ts +11 -0
  523. package/src/classes/callbacks/PostGameStartedReordered.ts +11 -0
  524. package/src/classes/callbacks/PostGameStartedReorderedLast.ts +11 -0
  525. package/src/classes/callbacks/PostGreedModeWave.ts +37 -0
  526. package/src/classes/callbacks/PostGridEntityBroken.ts +11 -0
  527. package/src/classes/callbacks/PostGridEntityCollision.ts +65 -0
  528. package/src/classes/callbacks/PostGridEntityCustomBroken.ts +11 -0
  529. package/src/classes/callbacks/PostGridEntityCustomCollision.ts +53 -0
  530. package/src/classes/callbacks/PostGridEntityCustomInit.ts +11 -0
  531. package/src/classes/callbacks/PostGridEntityCustomRemove.ts +32 -0
  532. package/src/classes/callbacks/PostGridEntityCustomStateChanged.ts +11 -0
  533. package/src/classes/callbacks/PostGridEntityCustomUpdate.ts +11 -0
  534. package/src/classes/callbacks/PostGridEntityInit.ts +11 -0
  535. package/src/classes/callbacks/PostGridEntityRemove.ts +39 -0
  536. package/src/classes/callbacks/PostGridEntityStateChanged.ts +11 -0
  537. package/src/classes/callbacks/PostGridEntityUpdate.ts +11 -0
  538. package/src/classes/callbacks/PostHolyMantleRemoved.ts +45 -0
  539. package/src/classes/callbacks/PostKnifeInitLate.ts +28 -0
  540. package/src/classes/callbacks/PostNewLevelReordered.ts +11 -0
  541. package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
  542. package/src/classes/callbacks/PostNewRoomReordered.ts +11 -0
  543. package/src/classes/callbacks/PostPEffectUpdateReordered.ts +11 -0
  544. package/src/classes/callbacks/PostPitRender.ts +21 -0
  545. package/src/classes/callbacks/PostPlayerFatalDamage.ts +127 -0
  546. package/src/classes/callbacks/PostPlayerRenderReordered.ts +11 -0
  547. package/src/classes/callbacks/PostPlayerUpdateReordered.ts +11 -0
  548. package/src/classes/callbacks/PostRoomClearChanged.ts +40 -0
  549. package/src/classes/callbacks/PostSpikesRender.ts +21 -0
  550. package/src/classes/callbacks/PreBerserkDeath.ts +42 -0
  551. package/src/classes/callbacks/PreCustomRevive.ts +11 -0
  552. package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
  553. package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
  554. package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
  555. package/src/classes/callbacks/validation/CustomCallbackDoor.ts +28 -0
  556. package/src/classes/callbacks/validation/CustomCallbackEffect.ts +29 -0
  557. package/src/classes/callbacks/validation/CustomCallbackFamiliar.ts +30 -0
  558. package/src/classes/callbacks/validation/CustomCallbackGridEntity.ts +42 -0
  559. package/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.ts +36 -0
  560. package/src/classes/callbacks/validation/CustomCallbackKnife.ts +27 -0
  561. package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
  562. package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +47 -0
  563. package/src/classes/callbacks/validation/CustomCallbackRevive.ts +27 -0
  564. package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
  565. package/src/classes/features/callbackLogic/CustomGridEntities.ts +398 -0
  566. package/src/classes/features/callbackLogic/CustomRevive.ts +214 -0
  567. package/src/classes/features/callbackLogic/EsauJrDetection.ts +98 -0
  568. package/src/classes/features/callbackLogic/FlipDetection.ts +82 -0
  569. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +160 -0
  570. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +90 -0
  571. package/src/classes/features/callbackLogic/GridEntityDetection.ts +231 -0
  572. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +126 -0
  573. package/src/classes/features/other/RunInNFrames.ts +256 -0
  574. package/src/classes/private/CustomCallback.ts +82 -0
  575. package/src/classes/private/Feature.ts +24 -0
  576. package/src/core/upgradeMod.ts +77 -17
  577. package/src/decorators.ts +13 -0
  578. package/src/enums/ISCFeature.ts +47 -0
  579. package/src/enums/LadderSubTypeCustom.ts +17 -0
  580. package/src/enums/ModCallbackCustom.ts +314 -243
  581. package/src/enums/ModCallbackCustom2.ts +57 -0
  582. package/src/features/customGridEntity.ts +3 -7
  583. package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
  584. package/src/features/customPickup.ts +4 -2
  585. package/src/features/customStage/backdrop.ts +2 -1
  586. package/src/features/customStage/shadows.ts +2 -1
  587. package/src/features/customTrapdoor/init.ts +0 -1
  588. package/src/features/customTrapdoor/touched.ts +1 -1
  589. package/src/features/deployJSONRoom.ts +3 -7
  590. package/src/features/extraConsoleCommands/listCommands.ts +1 -1
  591. package/src/features/firstLast.ts +3 -7
  592. package/src/features/saveDataManager/constants.ts +1 -1
  593. package/src/features/saveDataManager/exports.ts +27 -0
  594. package/src/features/saveDataManager/main.ts +30 -21
  595. package/src/features/saveDataManager/save.ts +2 -2
  596. package/src/features.ts +90 -0
  597. package/src/functions/ambush.ts +26 -1
  598. package/src/functions/characters.ts +3 -3
  599. package/src/functions/charge.ts +30 -8
  600. package/src/functions/chargeBar.ts +6 -0
  601. package/src/functions/decorators.ts +45 -0
  602. package/src/functions/flying.ts +4 -4
  603. package/src/functions/gridEntities.ts +5 -5
  604. package/src/functions/gridEntitiesSpecific.ts +12 -12
  605. package/src/functions/itemPool.ts +2 -2
  606. package/src/functions/minimap.ts +4 -0
  607. package/src/functions/playerHealth.ts +6 -6
  608. package/src/functions/playerIndex.ts +2 -2
  609. package/src/functions/players.ts +26 -7
  610. package/src/functions/pocketItems.ts +1 -1
  611. package/src/functions/roomTransition.ts +3 -27
  612. package/src/functions/rooms.ts +1 -1
  613. package/src/functions/run.ts +12 -0
  614. package/src/functions/spawnCollectible.ts +44 -4
  615. package/src/functions/table.ts +11 -0
  616. package/src/functions/trinkets.ts +1 -1
  617. package/src/functions/tstlClass.ts +48 -24
  618. package/src/functions/utils.ts +56 -2
  619. package/src/index.ts +15 -2
  620. package/src/initCustomCallbacks.ts +1 -2
  621. package/src/initFeatures.ts +2 -2
  622. package/src/interfaces/SaveData.ts +4 -2
  623. package/src/interfaces/{private/TSTLClassMetatable.ts → TSTLClassMetatable.ts} +0 -0
  624. package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +4 -23
  625. package/src/interfaces/private/AddCallbackParametersCustom2.ts +343 -0
  626. package/src/maps/characterNameToTypeMap.ts +12 -12
  627. package/src/objects/callbackRegisterFunctions.ts +2 -4
  628. package/src/objects/characterDamageMultipliers.ts +6 -6
  629. package/src/objects/characterNames.ts +6 -6
  630. package/src/objects/playerNamePNGFileNames.ts +6 -6
  631. package/src/objects/playerPortraitPNGFileNames.ts +6 -6
  632. package/src/sets/charactersThatStartWithAnActiveItemSet.ts +1 -1
  633. package/src/sets/charactersWithFreeDevilDealsSet.ts +1 -1
  634. package/src/sets/charactersWithNoRedHeartsSet.ts +3 -3
  635. package/src/sets/charactersWithNoSoulHeartsSet.ts +2 -2
  636. package/src/sets/lostStyleCharactersSet.ts +4 -4
  637. package/src/types/AllButFirst.ts +6 -0
  638. package/src/types/AllButLast.ts +3 -0
  639. package/src/types/Constructor.ts +2 -0
  640. package/src/types/FunctionTuple.ts +4 -0
  641. package/src/types/HasAllEnumKeys.ts +25 -0
  642. package/src/types/LowercaseKeys.ts +3 -0
  643. package/src/types/StartsWithLowercase.ts +3 -0
  644. package/src/types/StartsWithUppercase.ts +3 -0
  645. package/src/types/UnionToIntersection.ts +6 -0
  646. package/src/types/UppercaseKeys.ts +3 -0
  647. package/src/types/private/AllButFirst.ts +6 -0
  648. package/src/types/private/CallbackTuple.ts +21 -0
  649. package/src/types/private/MatchingCallbackCustom.ts +32 -0
  650. package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
  651. package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
  652. package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
  653. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
  654. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
  655. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
  656. package/dist/src/classes/CustomCallback.d.ts +0 -8
  657. package/dist/src/classes/CustomCallback.d.ts.map +0 -1
  658. package/dist/src/classes/CustomCallback.lua +0 -28
  659. package/dist/src/features/customDoor.d.ts +0 -51
  660. package/dist/src/features/customDoor.d.ts.map +0 -1
  661. package/dist/src/features/customDoor.lua +0 -53
  662. package/dist/src/features/setHotkey.d.ts.map +0 -1
  663. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
  664. package/dist/src/interfaces/private/TSTLClassMetatable.d.ts.map +0 -1
  665. package/src/callbacks/postCustomDoorEnter.ts +0 -250
  666. package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
  667. package/src/classes/CustomCallback.ts +0 -23
  668. package/src/features/customDoor.ts +0 -66
@@ -25,7 +25,7 @@ import { getRoomShapeCharges } from "./roomShape";
25
25
  * - AAA Battery
26
26
  *
27
27
  * @param player The player to grant the charges to.
28
- * @param activeSlot The slot to grant the charges to.
28
+ * @param activeSlot Optional. The slot to grant the charges to. Default is `ActiveSlot.PRIMARY`.
29
29
  * @param numCharges Optional. The amount of charges to grant. Default is 1.
30
30
  * @param playSoundEffect Optional. Whether to play a charge-related sound effect. Default is true.
31
31
  * @returns The amount of charges that were actually granted. For example, if the active item was
@@ -34,7 +34,7 @@ import { getRoomShapeCharges } from "./roomShape";
34
34
  */
35
35
  export function addCharge(
36
36
  player: EntityPlayer,
37
- activeSlot: ActiveSlot,
37
+ activeSlot = ActiveSlot.PRIMARY,
38
38
  numCharges = 1,
39
39
  playSoundEffect = true,
40
40
  ): int {
@@ -116,7 +116,8 @@ export function addRoomClearCharge(
116
116
  * - Not charging active items with `chargetype="special"`
117
117
  *
118
118
  * @param player The player to grant the charges to.
119
- * @param activeSlot The active item slot to grant the charges to.
119
+ * @param activeSlot Optional. The active item slot to grant the charges to. Default is
120
+ * `ActiveSlot.PRIMARY`.
120
121
  * @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
121
122
  * room for the purposes of calculating how much charge to grant. Default
122
123
  * is true.
@@ -124,7 +125,7 @@ export function addRoomClearCharge(
124
125
  */
125
126
  export function addRoomClearChargeToSlot(
126
127
  player: EntityPlayer,
127
- activeSlot: ActiveSlot,
128
+ activeSlot = ActiveSlot.PRIMARY,
128
129
  bigRoomDoubleCharge = true,
129
130
  playSoundEffect = true,
130
131
  ): void {
@@ -202,10 +203,13 @@ export function addRoomClearCharges(bigRoomDoubleCharge = true): void {
202
203
  * This function accounts for The Battery. For example, if the player has 2/6 charges on a D6, this
203
204
  * function will return 10 (because there are 4 charges remaining on the base charge and 6 charges
204
205
  * remaining on The Battery charge).
206
+ *
207
+ * @param player The player to get the charges from.
208
+ * @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
205
209
  */
206
210
  export function getChargesAwayFromMax(
207
211
  player: EntityPlayer,
208
- activeSlot: ActiveSlot,
212
+ activeSlot = ActiveSlot.PRIMARY,
209
213
  ): int {
210
214
  const totalCharge = getTotalCharge(player, activeSlot);
211
215
  const activeItem = player.GetActiveItem(activeSlot);
@@ -220,10 +224,13 @@ export function getChargesAwayFromMax(
220
224
  * Helper function to get the combined normal charge and the battery charge for the player's active
221
225
  * item. This is useful because you have to add these two values together when setting the active
222
226
  * charge.
227
+ *
228
+ * @param player The player to get the charges from.
229
+ * @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
223
230
  */
224
231
  export function getTotalCharge(
225
232
  player: EntityPlayer,
226
- activeSlot: ActiveSlot,
233
+ activeSlot = ActiveSlot.PRIMARY,
227
234
  ): int {
228
235
  const activeCharge = player.GetActiveCharge(activeSlot);
229
236
  const batteryCharge = player.GetBatteryCharge(activeSlot);
@@ -231,9 +238,16 @@ export function getTotalCharge(
231
238
  return activeCharge + batteryCharge;
232
239
  }
233
240
 
241
+ /**
242
+ * Helper function to check if a player's active item is "double charged", meaning that it has both
243
+ * a full normal charge and a full charge from The Battery.
244
+ *
245
+ * @param player The player to check.
246
+ * @param activeSlot Optional. The slot to check. Default is `ActiveSlot.PRIMARY`.
247
+ */
234
248
  export function isActiveSlotDoubleCharged(
235
249
  player: EntityPlayer,
236
- activeSlot: ActiveSlot,
250
+ activeSlot = ActiveSlot.PRIMARY,
237
251
  ): boolean {
238
252
  const collectibleType = player.GetActiveItem(activeSlot);
239
253
  const batteryCharge = player.GetBatteryCharge(activeSlot);
@@ -242,9 +256,17 @@ export function isActiveSlotDoubleCharged(
242
256
  return batteryCharge >= maxCharges;
243
257
  }
244
258
 
259
+ /**
260
+ * Helper function to play the appropriate sound effect for a player after getting one or more
261
+ * charges on their active item. (There is a different sound depending on whether the item is fully
262
+ * charged or not.)
263
+ *
264
+ * @param player The player to play the sound effect for.
265
+ * @param activeSlot Optional. The slot that was just charged. Default is `ActiveSlot.PRIMARY`.
266
+ */
245
267
  export function playChargeSoundEffect(
246
268
  player: EntityPlayer,
247
- activeSlot: ActiveSlot,
269
+ activeSlot = ActiveSlot.PRIMARY,
248
270
  ): void {
249
271
  for (const soundEffect of [
250
272
  SoundEffect.BATTERY_CHARGE, // 170
@@ -5,6 +5,9 @@ const CHARGE_BAR_ANM2 = "gfx/ui/ui_chargebar.anm2";
5
5
  /**
6
6
  * Constructor for a `ChargeBarSprites` object. For more information, see the `renderChargeBar`
7
7
  * helper function.
8
+ *
9
+ * Note that this is for the vertical charge bar that represents the number of charges that an
10
+ * active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
8
11
  */
9
12
  export function newChargeBarSprites(maxCharges: int): ChargeBarSprites {
10
13
  const back = Sprite();
@@ -35,6 +38,9 @@ export function newChargeBarSprites(maxCharges: int): ChargeBarSprites {
35
38
  /**
36
39
  * Helper function to render a charge bar on the screen. First, call the `newChargeBarSprites`
37
40
  * function to initialize the sprites, and then call this function on every render frame.
41
+ *
42
+ * Note that this is for the vertical charge bar that represents the number of charges that an
43
+ * active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
38
44
  */
39
45
  export function renderChargeBar(
40
46
  sprites: ChargeBarSprites,
@@ -0,0 +1,45 @@
1
+ import { ModCallback } from "isaac-typescript-definitions";
2
+ import { ModFeature } from "../classes/ModFeature";
3
+ import { ModUpgraded } from "../classes/ModUpgraded";
4
+ import { ModCallbackCustom2 } from "../enums/ModCallbackCustom2";
5
+ import { AddCallbackParametersCustom2 } from "../interfaces/private/AddCallbackParametersCustom2";
6
+ import { AllButFirst } from "../types/AllButFirst";
7
+
8
+ /**
9
+ * A decorator function that signifies that the decorated class method should be automatically
10
+ * registered with `Mod.AddCallback`.
11
+ */
12
+ export function Callback<T extends ModCallback>(
13
+ modCallback: T,
14
+ ...optionalArgs: AllButFirst<AddCallbackParameters[T]>
15
+ ) {
16
+ return <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(
17
+ target: Class,
18
+ propertyKey: string,
19
+ _descriptor: TypedPropertyDescriptor<Fn>,
20
+ ): void => {
21
+ const methodName = propertyKey as keyof Class;
22
+ const method = target[methodName] as AddCallbackParameters[T][0];
23
+ // @ts-expect-error The compiler is not smart enough to join the types together.
24
+ target.mod.AddCallback(modCallback, method, ...optionalArgs);
25
+ };
26
+ }
27
+
28
+ /**
29
+ * A decorator function that signifies that the decorated class method should be automatically
30
+ * registered with `ModUpgraded.AddCallbackCustom`.
31
+ */
32
+ export function CallbackCustom<T extends ModCallbackCustom2>(
33
+ modCallbackCustom: T,
34
+ ...optionalArgs: AllButFirst<AddCallbackParametersCustom2[T]>
35
+ ) {
36
+ return <Class extends { mod: ModUpgraded }>(
37
+ target: Class,
38
+ propertyKey: string,
39
+ ): void => {
40
+ const methodName = propertyKey as keyof Class;
41
+ const method = target[methodName] as AddCallbackParametersCustom2[T][0];
42
+ // @ts-expect-error The compiler is not smart enough to join the types together.
43
+ target.mod.AddCallbackCustom2(modCallbackCustom, method, ...optionalArgs);
44
+ };
45
+ }
@@ -10,11 +10,11 @@ import { copySet, deleteSetsFromSet } from "./set";
10
10
 
11
11
  const FLYING_CHARACTERS: ReadonlySet<PlayerType> = new Set([
12
12
  PlayerType.AZAZEL, // 7
13
- PlayerType.THE_LOST, // 10
14
- PlayerType.THE_SOUL, // 17
15
- PlayerType.THE_LOST_B, // 31
13
+ PlayerType.LOST, // 10
14
+ PlayerType.SOUL, // 17
15
+ PlayerType.LOST_B, // 31
16
16
  PlayerType.JACOB_2_B, // 39
17
- PlayerType.THE_SOUL_B, // 40
17
+ PlayerType.SOUL_B, // 40
18
18
  ]);
19
19
 
20
20
  const FLYING_TRINKETS: ReadonlySet<TrinketType> = new Set([
@@ -63,7 +63,7 @@ export function convertXMLGridEntityType(
63
63
  );
64
64
  }
65
65
  const gridEntityType = gridEntityArray[0];
66
- let gridEntityVariant = gridEntityArray[1];
66
+ let variant = gridEntityArray[1];
67
67
 
68
68
  // For some specific grid entities, the variant defined in the XML is what is used by the actual
69
69
  // game (which is not the case for e.g. poops).
@@ -72,10 +72,10 @@ export function convertXMLGridEntityType(
72
72
  gridEntityType === GridEntityType.PRESSURE_PLATE || // 20
73
73
  gridEntityType === GridEntityType.TELEPORTER // 23
74
74
  ) {
75
- gridEntityVariant = gridEntityXMLVariant;
75
+ variant = gridEntityXMLVariant;
76
76
  }
77
77
 
78
- return [gridEntityType, gridEntityVariant];
78
+ return [gridEntityType, variant];
79
79
  }
80
80
 
81
81
  /**
@@ -323,8 +323,8 @@ export function isGridEntityBreakableByExplosion(
323
323
  gridEntity: GridEntity,
324
324
  ): boolean {
325
325
  const gridEntityType = gridEntity.GetType();
326
- const gridEntityVariant = gridEntity.GetVariant();
327
- const gridEntityTypeVariant = `${gridEntityType}.${gridEntityVariant}`;
326
+ const variant = gridEntity.GetVariant();
327
+ const gridEntityTypeVariant = `${gridEntityType}.${variant}`;
328
328
 
329
329
  return (
330
330
  BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS.has(gridEntityType) ||
@@ -47,8 +47,8 @@ export function getPits(pitVariant: PitVariant = -1): GridEntityPit[] {
47
47
  for (const gridEntity of getGridEntities()) {
48
48
  const pit = gridEntity.ToPit();
49
49
  if (pit !== undefined) {
50
- const gridEntityVariant = pit.GetVariant();
51
- if (asNumber(pitVariant) === -1 || pitVariant === gridEntityVariant) {
50
+ const thisPitVariant = pit.GetVariant();
51
+ if (asNumber(pitVariant) === -1 || pitVariant === thisPitVariant) {
52
52
  pits.push(pit);
53
53
  }
54
54
  }
@@ -70,8 +70,8 @@ export function getPoops(
70
70
  for (const gridEntity of getGridEntities()) {
71
71
  const poop = gridEntity.ToPoop();
72
72
  if (poop !== undefined) {
73
- const gridEntityVariant = poop.GetVariant();
74
- if (asNumber(poopVariant) === -1 || poopVariant === gridEntityVariant) {
73
+ const thisPoopVariant = poop.GetVariant();
74
+ if (asNumber(poopVariant) === -1 || poopVariant === thisPoopVariant) {
75
75
  poops.push(poop);
76
76
  }
77
77
  }
@@ -93,10 +93,10 @@ export function getPressurePlates(
93
93
  for (const gridEntity of getGridEntities()) {
94
94
  const pressurePlate = gridEntity.ToPressurePlate();
95
95
  if (pressurePlate !== undefined) {
96
- const gridEntityVariant = pressurePlate.GetVariant();
96
+ const thisPressurePlateVariant = pressurePlate.GetVariant();
97
97
  if (
98
98
  asNumber(pressurePlateVariant) === -1 ||
99
- pressurePlateVariant === gridEntityVariant
99
+ pressurePlateVariant === thisPressurePlateVariant
100
100
  ) {
101
101
  pressurePlates.push(pressurePlate);
102
102
  }
@@ -119,8 +119,8 @@ export function getRocks(variant = -1): GridEntityRock[] {
119
119
  for (const gridEntity of getGridEntities()) {
120
120
  const rock = gridEntity.ToRock();
121
121
  if (rock !== undefined) {
122
- const gridEntityVariant = rock.GetVariant();
123
- if (variant === -1 || variant === gridEntityVariant) {
122
+ const thisVariant = rock.GetVariant();
123
+ if (variant === -1 || variant === thisVariant) {
124
124
  rocks.push(rock);
125
125
  }
126
126
  }
@@ -135,8 +135,8 @@ export function getSpikes(variant = -1): GridEntitySpikes[] {
135
135
  for (const gridEntity of getGridEntities()) {
136
136
  const spike = gridEntity.ToSpikes();
137
137
  if (spike !== undefined) {
138
- const gridEntityVariant = spike.GetVariant();
139
- if (variant === -1 || variant === gridEntityVariant) {
138
+ const thisVariant = spike.GetVariant();
139
+ if (variant === -1 || variant === thisVariant) {
140
140
  spikes.push(spike);
141
141
  }
142
142
  }
@@ -151,8 +151,8 @@ export function getTNT(variant = -1): GridEntityTNT[] {
151
151
  for (const gridEntity of getGridEntities()) {
152
152
  const tnt = gridEntity.ToTNT();
153
153
  if (tnt !== undefined) {
154
- const gridEntityVariant = tnt.GetVariant();
155
- if (variant === -1 || variant === gridEntityVariant) {
154
+ const thisVariant = tnt.GetVariant();
155
+ if (variant === -1 || variant === thisVariant) {
156
156
  tntArray.push(tnt);
157
157
  }
158
158
  }
@@ -61,7 +61,7 @@ export function isCollectibleInItemPool(
61
61
 
62
62
  // On Tainted Lost, it is impossible to retrieve non-offensive collectibles from pools, so we
63
63
  // temporarily change the character to Isaac.
64
- const taintedLosts = getPlayersOfType(PlayerType.THE_LOST_B);
64
+ const taintedLosts = getPlayersOfType(PlayerType.LOST_B);
65
65
  const isOffensive = collectibleHasTag(
66
66
  collectibleType,
67
67
  ItemConfigTag.OFFENSIVE,
@@ -108,7 +108,7 @@ export function isCollectibleInItemPool(
108
108
  // Change any players back to Tainted Lost, if necessary.
109
109
  if (changedPlayerTypes) {
110
110
  for (const player of taintedLosts) {
111
- player.ChangePlayerType(PlayerType.THE_LOST_B);
111
+ player.ChangePlayerType(PlayerType.LOST_B);
112
112
  }
113
113
  }
114
114
 
@@ -8,6 +8,8 @@ import { getRoomsInsideGrid } from "./rooms";
8
8
  * Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
9
9
  * or not it is visible and so on).
10
10
  *
11
+ * This function automatically accounts for whether or not MinimapAPI is being used.
12
+ *
11
13
  * @param roomGridIndex Set to undefined to use the current room index.
12
14
  * @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
13
15
  * @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
@@ -97,6 +99,8 @@ export function getRoomDisplayFlags(
97
99
  * This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
98
100
  * the changes will be immediately visible.
99
101
  *
102
+ * This function automatically accounts for whether or not MinimapAPI is being used.
103
+ *
100
104
  * @param displayFlagsMap A map of the display flags that is indexed by the room's safe grid index.
101
105
  */
102
106
  export function setDisplayFlags(
@@ -177,7 +177,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
177
177
  const bloodCharges = player.GetEffectiveBloodCharge();
178
178
 
179
179
  // The Forgotten and The Soul has special health, so we need to account for this.
180
- if (character === PlayerType.THE_FORGOTTEN && subPlayer !== undefined) {
180
+ if (character === PlayerType.FORGOTTEN && subPlayer !== undefined) {
181
181
  // The Forgotten does not have red heart containers.
182
182
  maxHearts = boneHearts * 2;
183
183
  boneHearts = 0;
@@ -185,7 +185,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
185
185
  // The Forgotten will always have 0 soul hearts; we need to get the soul heart amount from the
186
186
  // sub player.
187
187
  soulHearts = subPlayer.GetSoulHearts();
188
- } else if (character === PlayerType.THE_SOUL && subPlayer !== undefined) {
188
+ } else if (character === PlayerType.SOUL && subPlayer !== undefined) {
189
189
  // The Soul will always have 0 bone hearts; we need to get the bone heart amount from the sub
190
190
  // player. We need to store it as "maxHearts" instead of "boneHearts".
191
191
  maxHearts = subPlayer.GetBoneHearts() * 2;
@@ -202,7 +202,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
202
202
  const soulHeartTypes: SoulHeartType[] = [];
203
203
  for (let i = 0; i < extraHearts; i++) {
204
204
  let isBoneHeart = player.IsBoneHeart(i);
205
- if (character === PlayerType.THE_FORGOTTEN && subPlayer !== undefined) {
205
+ if (character === PlayerType.FORGOTTEN && subPlayer !== undefined) {
206
206
  isBoneHeart = subPlayer.IsBoneHeart(i);
207
207
  }
208
208
  if (isBoneHeart) {
@@ -210,7 +210,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
210
210
  } else {
211
211
  // We need to add 1 here because only the second half of a black heart is considered black.
212
212
  let isBlackHeart = player.IsBlackHeart(currentSoulHeart + 1);
213
- if (character === PlayerType.THE_FORGOTTEN && subPlayer !== undefined) {
213
+ if (character === PlayerType.FORGOTTEN && subPlayer !== undefined) {
214
214
  isBlackHeart = subPlayer.IsBlackHeart(currentSoulHeart + 1);
215
215
  }
216
216
  if (isBlackHeart) {
@@ -520,7 +520,7 @@ export function removeAllPlayerHealth(player: EntityPlayer): void {
520
520
 
521
521
  // If we are The Soul, the `EntityPlayer.AddBoneHearts` method will not remove Forgotten's bone
522
522
  // hearts, so we need to explicitly handle this.
523
- if (isCharacter(player, PlayerType.THE_SOUL)) {
523
+ if (isCharacter(player, PlayerType.SOUL)) {
524
524
  const forgotten = player.GetSubPlayer();
525
525
  if (forgotten !== undefined) {
526
526
  const forgottenBoneHearts = forgotten.GetBoneHearts();
@@ -559,7 +559,7 @@ export function setPlayerHealth(
559
559
  }
560
560
 
561
561
  // Add the red heart containers.
562
- if (character === PlayerType.THE_SOUL && subPlayer !== undefined) {
562
+ if (character === PlayerType.SOUL && subPlayer !== undefined) {
563
563
  // Adding health to The Soul is a special case.
564
564
  subPlayer.AddMaxHearts(playerHealth.maxHearts, false);
565
565
  } else {
@@ -6,7 +6,7 @@ const DEFAULT_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
6
6
 
7
7
  const EXCLUDED_CHARACTERS: ReadonlySet<PlayerType> = new Set([
8
8
  PlayerType.ESAU, // 20
9
- PlayerType.THE_SOUL_B, // 40
9
+ PlayerType.SOUL_B, // 40
10
10
  ]);
11
11
 
12
12
  /**
@@ -122,7 +122,7 @@ function getPlayerIndexCollectibleType(
122
122
  ) {
123
123
  const character = player.GetPlayerType();
124
124
 
125
- if (character === PlayerType.THE_SOUL) {
125
+ if (character === PlayerType.SOUL) {
126
126
  return differentiateForgottenAndSoul
127
127
  ? CollectibleType.INNER_EYE
128
128
  : DEFAULT_COLLECTIBLE_TYPE;
@@ -299,6 +299,21 @@ export function getPlayerFromEntity(entity: Entity): EntityPlayer | undefined {
299
299
  return entity.ToPlayer();
300
300
  }
301
301
 
302
+ /**
303
+ * Helper function to get an `EntityPlayer` object from an `EntityPtr`. Returns undefined if the
304
+ * entity has gone out of scope or if the associated entity is not a player.
305
+ */
306
+ export function getPlayerFromPtr(
307
+ entityPtr: EntityPtr,
308
+ ): EntityPlayer | undefined {
309
+ const entity = entityPtr.Ref;
310
+ if (entity === undefined) {
311
+ return undefined;
312
+ }
313
+
314
+ return entity.ToPlayer();
315
+ }
316
+
302
317
  /**
303
318
  * Helper function to get the proper name of the player. Use this instead of the
304
319
  * `EntityPlayer.GetName` method because it accounts for Blue Baby, Lazarus II, and Tainted
@@ -442,7 +457,7 @@ export function hasLostCurse(player: EntityPlayer): boolean {
442
457
  * items. (Only Tainted Forgotten can pick up items.)
443
458
  */
444
459
  export function hasOpenActiveItemSlot(player: EntityPlayer): boolean {
445
- if (isCharacter(player, PlayerType.THE_SOUL_B)) {
460
+ if (isCharacter(player, PlayerType.SOUL_B)) {
446
461
  return false;
447
462
  }
448
463
 
@@ -460,9 +475,15 @@ export function hasOpenActiveItemSlot(player: EntityPlayer): boolean {
460
475
  return activeItemPrimary === CollectibleType.NULL;
461
476
  }
462
477
 
478
+ /**
479
+ * Helper function to check if the active slot of a particular player is empty.
480
+ *
481
+ * @param player The player to check.
482
+ * @param activeSlot Optional. The active slot to check. Default is `ActiveSlot.PRIMARY`.
483
+ */
463
484
  export function isActiveSlotEmpty(
464
485
  player: EntityPlayer,
465
- activeSlot: ActiveSlot,
486
+ activeSlot = ActiveSlot.PRIMARY,
466
487
  ): boolean {
467
488
  const activeCollectibleType = player.GetActiveItem(activeSlot);
468
489
  return activeCollectibleType === CollectibleType.NULL;
@@ -546,9 +567,7 @@ export function isKeeper(player: EntityPlayer): boolean {
546
567
  export function isLost(player: EntityPlayer): boolean {
547
568
  const character = player.GetPlayerType();
548
569
 
549
- return (
550
- character === PlayerType.THE_LOST || character === PlayerType.THE_LOST_B
551
- );
570
+ return character === PlayerType.LOST || character === PlayerType.LOST_B;
552
571
  }
553
572
 
554
573
  export function isModdedPlayer(player: EntityPlayer): boolean {
@@ -714,7 +733,7 @@ export function removeTrinketCostume(
714
733
  *
715
734
  * @param player The player to give the item to.
716
735
  * @param collectibleType The collectible type of the item to give.
717
- * @param activeSlot The slot to set.
736
+ * @param activeSlot Optional. The slot to set. Default is `ActiveSlot.PRIMARY`.
718
737
  * @param charge Optional. The argument of charges to set. If not specified, the item will be set
719
738
  * with maximum charges.
720
739
  * @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
@@ -722,7 +741,7 @@ export function removeTrinketCostume(
722
741
  export function setActiveItem(
723
742
  player: EntityPlayer,
724
743
  collectibleType: CollectibleType,
725
- activeSlot: ActiveSlot,
744
+ activeSlot = ActiveSlot.PRIMARY,
726
745
  charge?: int,
727
746
  keepInPools = false,
728
747
  ): void {
@@ -124,7 +124,7 @@ export function getPocketItems(player: EntityPlayer): PocketItemDescription[] {
124
124
  * items. (Only Tainted Forgotten can pick up items.)
125
125
  */
126
126
  export function hasOpenPocketItemSlot(player: EntityPlayer): boolean {
127
- if (isCharacter(player, PlayerType.THE_SOUL_B)) {
127
+ if (isCharacter(player, PlayerType.SOUL_B)) {
128
128
  return false;
129
129
  }
130
130
 
@@ -1,12 +1,9 @@
1
1
  import {
2
2
  Direction,
3
3
  DoorSlot,
4
- LevelCurse,
5
4
  RoomTransitionAnim,
6
5
  } from "isaac-typescript-definitions";
7
6
  import { game } from "../core/cachedClasses";
8
- import { runNextRoom } from "../features/runNextRoom";
9
- import { hasCurse } from "./curses";
10
7
  import { getRoomData, getRoomGridIndex } from "./roomData";
11
8
 
12
9
  /**
@@ -17,12 +14,7 @@ import { getRoomData, getRoomGridIndex } from "./roomData";
17
14
  */
18
15
  export function reloadRoom(): void {
19
16
  const roomGridIndex = getRoomGridIndex();
20
- teleport(
21
- roomGridIndex,
22
- Direction.NO_DIRECTION,
23
- RoomTransitionAnim.FADE,
24
- true,
25
- );
17
+ teleport(roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.FADE);
26
18
  }
27
19
 
28
20
  /**
@@ -33,29 +25,20 @@ export function reloadRoom(): void {
33
25
  * Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
34
26
  * - you do not forget to set the `Level.LeaveDoor` field
35
27
  * - to prevent crashing on invalid room grid indexes
36
- * - to automatically handle Curse of the Maze
28
+ *
29
+ * Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
37
30
  *
38
31
  * @param roomGridIndex The room grid index of the destination room.
39
32
  * @param direction Optional. Default is `Direction.NO_DIRECTION`.
40
33
  * @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
41
- * @param force Optional. Whether to temporarily disable Curse of the Maze. Default is false. If set
42
- * to false, then this function may not go to the provided room grid index.
43
34
  */
44
35
  export function teleport(
45
36
  roomGridIndex: int,
46
37
  direction = Direction.NO_DIRECTION,
47
38
  roomTransitionAnim = RoomTransitionAnim.TELEPORT,
48
- force = false,
49
39
  ): void {
50
40
  const level = game.GetLevel();
51
41
 
52
- // Before starting a room transition, we must ensure that Curse of the Maze is not in effect, or
53
- // else the room transition might send us to the wrong room.
54
- const shouldTempDisableCurse = force && hasCurse(LevelCurse.MAZE);
55
- if (shouldTempDisableCurse) {
56
- level.RemoveCurses(LevelCurse.MAZE);
57
- }
58
-
59
42
  const roomData = getRoomData(roomGridIndex);
60
43
  if (roomData === undefined) {
61
44
  error(
@@ -68,11 +51,4 @@ export function teleport(
68
51
  level.LeaveDoor = DoorSlot.NO_DOOR_SLOT;
69
52
 
70
53
  game.StartRoomTransition(roomGridIndex, direction, roomTransitionAnim);
71
-
72
- if (shouldTempDisableCurse) {
73
- runNextRoom(() => {
74
- const futureLevel = game.GetLevel();
75
- futureLevel.AddCurse(LevelCurse.MAZE, false);
76
- });
77
- }
78
54
  }
@@ -546,7 +546,7 @@ export function roomUpdateSafe(): void {
546
546
  setEntityVelocities(entityVelocities, entities);
547
547
  }
548
548
 
549
- /** Helper function to set the backdrop of the current room. */
549
+ /** Helper function to set the backdrop (i.e. background) of the current room. */
550
550
  export function setBackdrop(backdropType: BackdropType): void {
551
551
  game.ShowHallucination(0, backdropType);
552
552
  sfxManager.Stop(SoundEffect.DEATH_CARD);
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  Challenge,
3
+ Difficulty,
3
4
  PlayerType,
4
5
  SlotVariant,
5
6
  } from "isaac-typescript-definitions";
@@ -26,6 +27,17 @@ export function canRunUnlockAchievements(): boolean {
26
27
  return canUnlockAchievements;
27
28
  }
28
29
 
30
+ /**
31
+ * Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
32
+ * `Difficulty.GREEDIER`.
33
+ */
34
+ export function isGreedMode(): boolean {
35
+ return (
36
+ game.Difficulty === Difficulty.GREED ||
37
+ game.Difficulty === Difficulty.GREEDIER
38
+ );
39
+ }
40
+
29
41
  /**
30
42
  * Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
31
43
  * pressing tab on the character selection screen). When the player resets the game on a set seed,
@@ -1,8 +1,10 @@
1
1
  import {
2
2
  CollectibleType,
3
+ ItemPoolType,
3
4
  PickupVariant,
4
5
  PlayerType,
5
6
  } from "isaac-typescript-definitions";
7
+ import { game } from "../core/cachedClasses";
6
8
  import { VectorZero } from "../core/constants";
7
9
  import { preventCollectibleRotation } from "../features/preventCollectibleRotation";
8
10
  import { areFeaturesInitialized } from "../featuresInitialized";
@@ -13,10 +15,11 @@ import { anyPlayerIs } from "./players";
13
15
  import { getRandomSeed, isRNG } from "./rng";
14
16
 
15
17
  /**
16
- * Helper function to spawn a collectible. Use this instead of the `Game.Spawn` method because it
17
- * handles the cases of Tainted Keeper collectibles costing coins and preventing quest items from
18
- * being rotated by Tainted Isaac's rotation mechanic. (Rotation prevention will only occur in
19
- * upgraded mods.)
18
+ * Helper function to spawn a collectible.
19
+ *
20
+ * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
21
+ * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
22
+ * rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
20
23
  *
21
24
  * @param collectibleType The collectible type to spawn.
22
25
  * @param position The position to spawn the collectible at.
@@ -74,6 +77,43 @@ export function spawnCollectible(
74
77
  return collectible;
75
78
  }
76
79
 
80
+ /**
81
+ * Helper function to spawn a collectible from a specific item pool.
82
+ *
83
+ * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
84
+ * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
85
+ * rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
86
+ *
87
+ * @param itemPoolType The item pool to draw the collectible type from.
88
+ * @param position The position to spawn the collectible at.
89
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
90
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
91
+ * @param options Optional. Set to true to make the collectible a "There's Options" style
92
+ * collectible. Default is false.
93
+ * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
94
+ * Tainted Keeper. Default is false.
95
+ * @param spawner Optional.
96
+ */
97
+ export function spawnCollectibleFromPool(
98
+ itemPoolType: ItemPoolType,
99
+ position: Vector,
100
+ seedOrRNG: Seed | RNG = getRandomSeed(),
101
+ options = false,
102
+ forceFreeItem = false,
103
+ spawner?: Entity,
104
+ ): EntityPickupCollectible {
105
+ const itemPool = game.GetItemPool();
106
+ const collectibleType = itemPool.GetCollectible(itemPoolType);
107
+ return spawnCollectible(
108
+ collectibleType,
109
+ position,
110
+ seedOrRNG,
111
+ options,
112
+ forceFreeItem,
113
+ spawner,
114
+ );
115
+ }
116
+
77
117
  /**
78
118
  * Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
79
119
  * with `CollectibleType.NULL` will result in spawning a collectible with a random type from the