isaacscript-common 6.16.2 → 6.18.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.
- package/dist/enums/ModCallbackCustom.d.ts +1 -1
- package/dist/features/customGridEntity.d.ts +3 -3
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +18 -11
- package/dist/features/extraConsoleCommands/listCommands.lua +2 -2
- package/dist/features/persistentEntities.d.ts.map +1 -1
- package/dist/features/persistentEntities.lua +15 -5
- package/dist/features/pickupIndex.d.ts.map +1 -1
- package/dist/features/pickupIndex.lua +5 -6
- package/dist/features/roomHistory.d.ts +11 -4
- package/dist/features/roomHistory.d.ts.map +1 -1
- package/dist/features/roomHistory.lua +18 -5
- package/dist/functions/log.d.ts +1 -1
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +33 -28
- package/dist/functions/npcs.d.ts +9 -0
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.lua +16 -3
- package/dist/functions/playerHealth.d.ts.map +1 -1
- package/dist/functions/playerHealth.lua +29 -12
- package/dist/functions/rockAlt.d.ts +4 -4
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.lua +38 -87
- package/dist/functions/saveFile.d.ts +5 -0
- package/dist/functions/saveFile.d.ts.map +1 -1
- package/dist/functions/saveFile.lua +112 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +1 -9
- package/dist/interfaces/{CustomGridEntityData.d.ts → GridEntityCustomData.d.ts} +2 -2
- package/dist/interfaces/{CustomGridEntityData.d.ts.map → GridEntityCustomData.d.ts.map} +1 -1
- package/dist/interfaces/{CustomGridEntityData.lua → GridEntityCustomData.lua} +0 -0
- package/dist/interfaces/PlayerHealth.d.ts +4 -1
- package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +1 -0
- package/dist/interfaces/RoomDescription.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/enums/ModCallbackCustom.ts +1 -1
- package/src/features/customGridEntity.ts +30 -17
- package/src/features/extraConsoleCommands/listCommands.ts +2 -2
- package/src/features/persistentEntities.ts +19 -5
- package/src/features/pickupIndex.ts +9 -15
- package/src/features/roomHistory.ts +24 -4
- package/src/functions/log.ts +35 -30
- package/src/functions/npcs.ts +27 -2
- package/src/functions/playerHealth.ts +25 -12
- package/src/functions/rockAlt.ts +50 -132
- package/src/functions/saveFile.ts +146 -4
- package/src/index.ts +1 -2
- package/src/interfaces/{CustomGridEntityData.ts → GridEntityCustomData.ts} +1 -1
- package/src/interfaces/PlayerHealth.ts +12 -1
- package/src/interfaces/RoomDescription.ts +1 -0
- package/dist/functions/itemPool.d.ts +0 -10
- package/dist/functions/itemPool.d.ts.map +0 -1
- package/dist/functions/itemPool.lua +0 -116
- package/src/functions/itemPool.ts +0 -153
|
@@ -24,10 +24,10 @@ export declare function getRockAltType(): RockAltType;
|
|
|
24
24
|
* Most of the time, this function will do nothing, similar to how most of the time, when an
|
|
25
25
|
* individual urn is destroyed, nothing will spawn.
|
|
26
26
|
*
|
|
27
|
-
* Note that in vanilla, trinkets will not spawn if they have already been removed
|
|
28
|
-
* pool. This function cannot replicate that behavior because there is no way to
|
|
29
|
-
* trinket is still in the pool. Thus, it will always have a chance
|
|
30
|
-
* (e.g. Swallowed Penny from urns).
|
|
27
|
+
* Note that in vanilla, collectibles and trinkets will not spawn if they have already been removed
|
|
28
|
+
* from the respective pool. This function cannot replicate that behavior because there is no way to
|
|
29
|
+
* check to see if a collectible or trinket is still in the pool. Thus, it will always have a chance
|
|
30
|
+
* to spawn the respective collectible/trinket (e.g. Swallowed Penny from urns).
|
|
31
31
|
*
|
|
32
32
|
* The logic in this function is based on the rewards listed on the wiki:
|
|
33
33
|
* https://bindingofisaacrebirth.fandom.com/wiki/Rocks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rockAlt.d.ts","sourceRoot":"","sources":["../../src/functions/rockAlt.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"rockAlt.d.ts","sourceRoot":"","sources":["../../src/functions/rockAlt.ts"],"names":[],"mappings":";;;AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA8BnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAK5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,OAAO,SAAI,EACX,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,OAAO,CAwBT"}
|
|
@@ -7,7 +7,6 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
|
7
7
|
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
8
8
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
9
9
|
local HeartSubType = ____isaac_2Dtypescript_2Ddefinitions.HeartSubType
|
|
10
|
-
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
11
10
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
12
11
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
13
12
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
@@ -22,8 +21,6 @@ local BACKDROP_TYPE_TO_ROCK_ALT_TYPE = ____backdropTypeToRockAltType.BACKDROP_TY
|
|
|
22
21
|
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
23
22
|
local spawnEffectWithSeed = ____entitiesSpecific.spawnEffectWithSeed
|
|
24
23
|
local spawnNPCWithSeed = ____entitiesSpecific.spawnNPCWithSeed
|
|
25
|
-
local ____itemPool = require("functions.itemPool")
|
|
26
|
-
local isCollectibleInItemPool = ____itemPool.isCollectibleInItemPool
|
|
27
24
|
local ____pickupsSpecific = require("functions.pickupsSpecific")
|
|
28
25
|
local spawnCardWithSeed = ____pickupsSpecific.spawnCardWithSeed
|
|
29
26
|
local spawnCoinWithSeed = ____pickupsSpecific.spawnCoinWithSeed
|
|
@@ -47,11 +44,11 @@ local getRandomVector = ____vector.getRandomVector
|
|
|
47
44
|
function spawnRockAltRewardUrn(self, position, rng)
|
|
48
45
|
local chance = getRandom(nil, rng)
|
|
49
46
|
local totalChance = 0
|
|
50
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
47
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
51
48
|
if chance < totalChance then
|
|
52
49
|
return false
|
|
53
50
|
end
|
|
54
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
51
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.BASIC_DROP
|
|
55
52
|
if chance < totalChance then
|
|
56
53
|
local numCoinsChance = getRandom(nil, rng)
|
|
57
54
|
local numCoins = numCoinsChance < 0.5 and 1 or 2
|
|
@@ -73,19 +70,15 @@ function spawnRockAltRewardUrn(self, position, rng)
|
|
|
73
70
|
)
|
|
74
71
|
return true
|
|
75
72
|
end
|
|
76
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
73
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.TRINKET
|
|
77
74
|
if chance < totalChance then
|
|
78
75
|
spawnTrinketWithSeed(nil, TrinketType.SWALLOWED_PENNY, position, rng)
|
|
79
76
|
return true
|
|
80
77
|
end
|
|
81
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
78
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.COLLECTIBLE
|
|
82
79
|
if chance < totalChance then
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
spawnCollectible(nil, CollectibleType.QUARTER, position, rng)
|
|
86
|
-
return true
|
|
87
|
-
end
|
|
88
|
-
return false
|
|
80
|
+
spawnCollectible(nil, CollectibleType.QUARTER, position, rng)
|
|
81
|
+
return true
|
|
89
82
|
end
|
|
90
83
|
local numSpidersChance = getRandom(nil, rng)
|
|
91
84
|
local numSpiders = numSpidersChance < 0.5 and 1 or 2
|
|
@@ -113,49 +106,33 @@ function spawnRockAltRewardMushroom(self, position, rng)
|
|
|
113
106
|
local roomType = room:GetType()
|
|
114
107
|
local chance = getRandom(nil, rng)
|
|
115
108
|
local totalChance = 0
|
|
116
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
109
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
117
110
|
if chance < totalChance then
|
|
118
111
|
return false
|
|
119
112
|
end
|
|
120
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
113
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.BASIC_DROP
|
|
121
114
|
if chance < totalChance then
|
|
122
115
|
spawnPillWithSeed(nil, PillColor.NULL, position, rng)
|
|
123
116
|
return true
|
|
124
117
|
end
|
|
125
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
118
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.TRINKET
|
|
126
119
|
if chance < totalChance then
|
|
127
120
|
spawnTrinketWithSeed(nil, TrinketType.LIBERTY_CAP, position, rng)
|
|
128
121
|
return true
|
|
129
122
|
end
|
|
130
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
123
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.COLLECTIBLE
|
|
131
124
|
if chance < totalChance then
|
|
132
125
|
if roomType == RoomType.SECRET then
|
|
133
126
|
local wavyCapChance = getRandom(nil, rng)
|
|
134
127
|
if wavyCapChance < 0.0272 then
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
spawnCollectible(nil, CollectibleType.WAVY_CAP, position, rng)
|
|
138
|
-
return true
|
|
139
|
-
end
|
|
128
|
+
spawnCollectible(nil, CollectibleType.WAVY_CAP, position, rng)
|
|
129
|
+
return true
|
|
140
130
|
end
|
|
141
131
|
end
|
|
142
|
-
local
|
|
143
|
-
local
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
local collectibleType = collectibleChance < 0.5 and CollectibleType.MAGIC_MUSHROOM or CollectibleType.MINI_MUSH
|
|
147
|
-
spawnCollectible(nil, collectibleType, position, rng)
|
|
148
|
-
return true
|
|
149
|
-
end
|
|
150
|
-
if magicMushroomStillInPools then
|
|
151
|
-
spawnCollectible(nil, CollectibleType.MINI_MUSH, position, rng)
|
|
152
|
-
return true
|
|
153
|
-
end
|
|
154
|
-
if miniMushStillInPools then
|
|
155
|
-
spawnCollectible(nil, CollectibleType.MAGIC_MUSHROOM, position, rng)
|
|
156
|
-
return true
|
|
157
|
-
end
|
|
158
|
-
return false
|
|
132
|
+
local collectibleChance = getRandom(nil, rng)
|
|
133
|
+
local collectibleType = collectibleChance < 0.5 and CollectibleType.MAGIC_MUSHROOM or CollectibleType.MINI_MUSH
|
|
134
|
+
spawnCollectible(nil, collectibleType, position, rng)
|
|
135
|
+
return true
|
|
159
136
|
end
|
|
160
137
|
spawnEffectWithSeed(
|
|
161
138
|
nil,
|
|
@@ -169,39 +146,26 @@ end
|
|
|
169
146
|
function spawnRockAltRewardSkull(self, position, rng)
|
|
170
147
|
local chance = getRandom(nil, rng)
|
|
171
148
|
local totalChance = 0
|
|
172
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
149
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
173
150
|
if chance < totalChance then
|
|
174
151
|
return false
|
|
175
152
|
end
|
|
176
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
153
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.BASIC_DROP
|
|
177
154
|
if chance < totalChance then
|
|
178
155
|
spawnCardWithSeed(nil, Card.NULL, position, rng)
|
|
179
156
|
return true
|
|
180
157
|
end
|
|
181
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
158
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.TRINKET
|
|
182
159
|
if chance < totalChance then
|
|
183
160
|
spawnHeartWithSeed(nil, HeartSubType.BLACK, position, rng)
|
|
184
161
|
return true
|
|
185
162
|
end
|
|
186
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
163
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.COLLECTIBLE
|
|
187
164
|
if chance < totalChance then
|
|
188
|
-
local
|
|
189
|
-
local
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
local collectibleType = collectibleChance < 0.5 and CollectibleType.GHOST_BABY or CollectibleType.DRY_BABY
|
|
193
|
-
spawnCollectible(nil, collectibleType, position, rng)
|
|
194
|
-
return true
|
|
195
|
-
end
|
|
196
|
-
if ghostBabyStillInPools then
|
|
197
|
-
spawnCollectible(nil, CollectibleType.DRY_BABY, position, rng)
|
|
198
|
-
return true
|
|
199
|
-
end
|
|
200
|
-
if dryBabyStillInPools then
|
|
201
|
-
spawnCollectible(nil, CollectibleType.GHOST_BABY, position, rng)
|
|
202
|
-
return true
|
|
203
|
-
end
|
|
204
|
-
return false
|
|
165
|
+
local collectibleChance = getRandom(nil, rng)
|
|
166
|
+
local collectibleType = collectibleChance < 0.5 and CollectibleType.GHOST_BABY or CollectibleType.DRY_BABY
|
|
167
|
+
spawnCollectible(nil, collectibleType, position, rng)
|
|
168
|
+
return true
|
|
205
169
|
end
|
|
206
170
|
spawnNPCWithSeed(
|
|
207
171
|
nil,
|
|
@@ -216,39 +180,26 @@ end
|
|
|
216
180
|
function spawnRockAltRewardPolyp(self, position, rng)
|
|
217
181
|
local chance = getRandom(nil, rng)
|
|
218
182
|
local totalChance = 0
|
|
219
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
183
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
220
184
|
if chance < totalChance then
|
|
221
185
|
return false
|
|
222
186
|
end
|
|
223
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
187
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.BASIC_DROP
|
|
224
188
|
if chance < totalChance then
|
|
225
189
|
spawnHeartWithSeed(nil, HeartSubType.NULL, position, rng)
|
|
226
190
|
return true
|
|
227
191
|
end
|
|
228
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
192
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.TRINKET
|
|
229
193
|
if chance < totalChance then
|
|
230
194
|
spawnTrinketWithSeed(nil, TrinketType.UMBILICAL_CORD, position, rng)
|
|
231
195
|
return true
|
|
232
196
|
end
|
|
233
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
197
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.COLLECTIBLE
|
|
234
198
|
if chance < totalChance then
|
|
235
|
-
local
|
|
236
|
-
local
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
local collectibleType = collectibleChance < 0.5 and CollectibleType.PLACENTA or CollectibleType.BLOOD_CLOT
|
|
240
|
-
spawnCollectible(nil, collectibleType, position, rng)
|
|
241
|
-
return true
|
|
242
|
-
end
|
|
243
|
-
if bloodClotStillInPools then
|
|
244
|
-
spawnCollectible(nil, CollectibleType.MINI_MUSH, position, rng)
|
|
245
|
-
return true
|
|
246
|
-
end
|
|
247
|
-
if placentaStillInPools then
|
|
248
|
-
spawnCollectible(nil, CollectibleType.MAGIC_MUSHROOM, position, rng)
|
|
249
|
-
return true
|
|
250
|
-
end
|
|
251
|
-
return false
|
|
199
|
+
local collectibleChance = getRandom(nil, rng)
|
|
200
|
+
local collectibleType = collectibleChance < 0.5 and CollectibleType.PLACENTA or CollectibleType.BLOOD_CLOT
|
|
201
|
+
spawnCollectible(nil, collectibleType, position, rng)
|
|
202
|
+
return true
|
|
252
203
|
end
|
|
253
204
|
spawnEffectWithSeed(
|
|
254
205
|
nil,
|
|
@@ -269,13 +220,13 @@ end
|
|
|
269
220
|
function spawnRockAltRewardBucket(self, _position, rng, _variant)
|
|
270
221
|
local chance = getRandom(nil, rng)
|
|
271
222
|
local totalChance = 0
|
|
272
|
-
totalChance = totalChance + ROCK_ALT_CHANCES.
|
|
223
|
+
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
273
224
|
if chance < totalChance then
|
|
274
225
|
return false
|
|
275
226
|
end
|
|
276
227
|
return false
|
|
277
228
|
end
|
|
278
|
-
ROCK_ALT_CHANCES = {
|
|
229
|
+
ROCK_ALT_CHANCES = {NOTHING = 0.68, BASIC_DROP = 0.0967, TRINKET = 0.025, COLLECTIBLE = 0.005}
|
|
279
230
|
POLYP_PROJECTILE_SPEED = 10
|
|
280
231
|
POLYP_NUM_PROJECTILES = 6
|
|
281
232
|
--- Helper function to get the alternate rock type (i.e. urn, mushroom, etc.) that the current room
|
|
@@ -301,10 +252,10 @@ end
|
|
|
301
252
|
-- Most of the time, this function will do nothing, similar to how most of the time, when an
|
|
302
253
|
-- individual urn is destroyed, nothing will spawn.
|
|
303
254
|
--
|
|
304
|
-
-- Note that in vanilla, trinkets will not spawn if they have already been removed
|
|
305
|
-
-- pool. This function cannot replicate that behavior because there is no way to
|
|
306
|
-
-- trinket is still in the pool. Thus, it will always have a chance
|
|
307
|
-
-- (e.g. Swallowed Penny from urns).
|
|
255
|
+
-- Note that in vanilla, collectibles and trinkets will not spawn if they have already been removed
|
|
256
|
+
-- from the respective pool. This function cannot replicate that behavior because there is no way to
|
|
257
|
+
-- check to see if a collectible or trinket is still in the pool. Thus, it will always have a chance
|
|
258
|
+
-- to spawn the respective collectible/trinket (e.g. Swallowed Penny from urns).
|
|
308
259
|
--
|
|
309
260
|
-- The logic in this function is based on the rewards listed on the wiki:
|
|
310
261
|
-- https://bindingofisaacrebirth.fandom.com/wiki/Rocks
|
|
@@ -12,6 +12,11 @@ import { CollectibleType, ItemPoolType } from "isaac-typescript-definitions";
|
|
|
12
12
|
* - If the collectible is non-offensive, any Tainted Losts will be temporarily changed to Isaac and
|
|
13
13
|
* then changed back. (This is because Tainted Lost is not able to retrieve non-offensive
|
|
14
14
|
* collectibles from item pools).
|
|
15
|
+
*
|
|
16
|
+
* Under the hood, this function works by using the `ItemPool.AddRoomBlacklist` method to blacklist
|
|
17
|
+
* every collectible except for the one provided. Unfortunately, this is not a general-purpose
|
|
18
|
+
* "isCollectibleInItemPool" algorithm, because when a pool is depleted, it will automatically pull
|
|
19
|
+
* items from the Treasure Room pool, and there is no way to distinguish when this happens.
|
|
15
20
|
*/
|
|
16
21
|
export declare function isCollectibleUnlocked(collectibleType: CollectibleType, itemPoolType: ItemPoolType): boolean;
|
|
17
22
|
//# sourceMappingURL=saveFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saveFile.d.ts","sourceRoot":"","sources":["../../src/functions/saveFile.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"saveFile.d.ts","sourceRoot":"","sources":["../../src/functions/saveFile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAoBtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,GACzB,OAAO,CA2DT"}
|
|
@@ -1,8 +1,85 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
4
|
+
local __TS__New = ____lualib.__TS__New
|
|
1
5
|
local ____exports = {}
|
|
2
|
-
local
|
|
3
|
-
local
|
|
6
|
+
local removeItemsAndTrinketsThatAffectItemPools, restoreItemsAndTrinketsThatAffectItemPools, COLLECTIBLES_THAT_AFFECT_ITEM_POOLS, TRINKETS_THAT_AFFECT_ITEM_POOLS
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
9
|
+
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
10
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
12
|
+
local ____cachedClasses = require("cachedClasses")
|
|
13
|
+
local game = ____cachedClasses.game
|
|
14
|
+
local ____collectibleSet = require("functions.collectibleSet")
|
|
15
|
+
local getCollectibleSet = ____collectibleSet.getCollectibleSet
|
|
16
|
+
local ____collectibleTag = require("functions.collectibleTag")
|
|
17
|
+
local collectibleHasTag = ____collectibleTag.collectibleHasTag
|
|
18
|
+
local ____playerDataStructures = require("functions.playerDataStructures")
|
|
19
|
+
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
20
|
+
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
21
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
22
|
+
local getPlayers = ____playerIndex.getPlayers
|
|
4
23
|
local ____players = require("functions.players")
|
|
5
24
|
local anyPlayerHasCollectible = ____players.anyPlayerHasCollectible
|
|
25
|
+
local getPlayersOfType = ____players.getPlayersOfType
|
|
26
|
+
local ____utils = require("functions.utils")
|
|
27
|
+
local ____repeat = ____utils["repeat"]
|
|
28
|
+
function removeItemsAndTrinketsThatAffectItemPools(self)
|
|
29
|
+
local removedItemsMap = __TS__New(Map)
|
|
30
|
+
local removedTrinketsMap = __TS__New(Map)
|
|
31
|
+
for ____, player in ipairs(getPlayers(nil)) do
|
|
32
|
+
local removedItems = {}
|
|
33
|
+
for ____, itemToRemove in ipairs(COLLECTIBLES_THAT_AFFECT_ITEM_POOLS) do
|
|
34
|
+
if player:HasCollectible(itemToRemove) then
|
|
35
|
+
local numCollectibles = player:GetCollectibleNum(itemToRemove)
|
|
36
|
+
____repeat(
|
|
37
|
+
nil,
|
|
38
|
+
numCollectibles,
|
|
39
|
+
function()
|
|
40
|
+
player:RemoveCollectible(itemToRemove)
|
|
41
|
+
removedItems[#removedItems + 1] = itemToRemove
|
|
42
|
+
end
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
mapSetPlayer(nil, removedItemsMap, player, removedItems)
|
|
47
|
+
local removedTrinkets = {}
|
|
48
|
+
for ____, trinketToRemove in ipairs(TRINKETS_THAT_AFFECT_ITEM_POOLS) do
|
|
49
|
+
if player:HasTrinket(trinketToRemove) then
|
|
50
|
+
local numTrinkets = player:GetTrinketMultiplier(trinketToRemove)
|
|
51
|
+
____repeat(
|
|
52
|
+
nil,
|
|
53
|
+
numTrinkets,
|
|
54
|
+
function()
|
|
55
|
+
player:TryRemoveTrinket(trinketToRemove)
|
|
56
|
+
removedTrinkets[#removedTrinkets + 1] = trinketToRemove
|
|
57
|
+
end
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
mapSetPlayer(nil, removedTrinketsMap, player, removedTrinkets)
|
|
62
|
+
end
|
|
63
|
+
return {removedItemsMap, removedTrinketsMap}
|
|
64
|
+
end
|
|
65
|
+
function restoreItemsAndTrinketsThatAffectItemPools(self, removedItemsMap, removedTrinketsMap)
|
|
66
|
+
for ____, player in ipairs(getPlayers(nil)) do
|
|
67
|
+
local removedItems = mapGetPlayer(nil, removedItemsMap, player)
|
|
68
|
+
if removedItems ~= nil then
|
|
69
|
+
for ____, collectibleType in ipairs(removedItems) do
|
|
70
|
+
player:AddCollectible(collectibleType, 0, false)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
local removedTrinkets = mapGetPlayer(nil, removedTrinketsMap, player)
|
|
74
|
+
if removedTrinkets ~= nil then
|
|
75
|
+
for ____, trinketType in ipairs(removedTrinkets) do
|
|
76
|
+
player:AddTrinket(trinketType, false)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
COLLECTIBLES_THAT_AFFECT_ITEM_POOLS = {CollectibleType.CHAOS, CollectibleType.SACRED_ORB, CollectibleType.TMTRAINER}
|
|
82
|
+
TRINKETS_THAT_AFFECT_ITEM_POOLS = {TrinketType.NO}
|
|
6
83
|
--- Helper function to see if the given collectible is unlocked on the current save file. This
|
|
7
84
|
-- requires providing the corresponding item pool that the collectible is located in.
|
|
8
85
|
--
|
|
@@ -15,10 +92,42 @@ local anyPlayerHasCollectible = ____players.anyPlayerHasCollectible
|
|
|
15
92
|
-- - If the collectible is non-offensive, any Tainted Losts will be temporarily changed to Isaac and
|
|
16
93
|
-- then changed back. (This is because Tainted Lost is not able to retrieve non-offensive
|
|
17
94
|
-- collectibles from item pools).
|
|
95
|
+
--
|
|
96
|
+
-- Under the hood, this function works by using the `ItemPool.AddRoomBlacklist` method to blacklist
|
|
97
|
+
-- every collectible except for the one provided. Unfortunately, this is not a general-purpose
|
|
98
|
+
-- "isCollectibleInItemPool" algorithm, because when a pool is depleted, it will automatically pull
|
|
99
|
+
-- items from the Treasure Room pool, and there is no way to distinguish when this happens.
|
|
18
100
|
function ____exports.isCollectibleUnlocked(self, collectibleType, itemPoolType)
|
|
19
101
|
if anyPlayerHasCollectible(nil, collectibleType) then
|
|
20
102
|
return true
|
|
21
103
|
end
|
|
22
|
-
|
|
104
|
+
local taintedLosts = getPlayersOfType(nil, PlayerType.THE_LOST_B)
|
|
105
|
+
local isOffensive = collectibleHasTag(nil, collectibleType, ItemConfigTag.OFFENSIVE)
|
|
106
|
+
local changedPlayerTypes = false
|
|
107
|
+
if not isOffensive then
|
|
108
|
+
changedPlayerTypes = true
|
|
109
|
+
for ____, player in ipairs(taintedLosts) do
|
|
110
|
+
player:ChangePlayerType(PlayerType.ISAAC)
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
local removedItemsMap, removedTrinketsMap = table.unpack(removeItemsAndTrinketsThatAffectItemPools(nil))
|
|
114
|
+
local itemPool = game:GetItemPool()
|
|
115
|
+
local collectibleSet = getCollectibleSet(nil)
|
|
116
|
+
for ____, collectibleTypeInSet in __TS__Iterator(collectibleSet:values()) do
|
|
117
|
+
if collectibleTypeInSet ~= collectibleType then
|
|
118
|
+
itemPool:AddRoomBlacklist(collectibleTypeInSet)
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
local seed = 1
|
|
122
|
+
local retrievedCollectibleType = itemPool:GetCollectible(itemPoolType, false, seed)
|
|
123
|
+
local collectibleUnlocked = retrievedCollectibleType == collectibleType
|
|
124
|
+
itemPool:ResetRoomBlacklist()
|
|
125
|
+
restoreItemsAndTrinketsThatAffectItemPools(nil, removedItemsMap, removedTrinketsMap)
|
|
126
|
+
if changedPlayerTypes then
|
|
127
|
+
for ____, player in ipairs(taintedLosts) do
|
|
128
|
+
player:ChangePlayerType(PlayerType.THE_LOST_B)
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
return collectibleUnlocked
|
|
23
132
|
end
|
|
24
133
|
return ____exports
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export * from "./enums/SerializationType";
|
|
|
12
12
|
export { ConversionHeartSubType, registerCharacterHealthConversion, } from "./features/characterHealthConversion";
|
|
13
13
|
export { registerCharacterStats } from "./features/characterStats";
|
|
14
14
|
export { getCollectibleItemPoolType } from "./features/collectibleItemPoolType";
|
|
15
|
-
export { removeCustomGrid, spawnCustomGridEntity as spawnCustomGrid, } from "./features/customGridEntity";
|
|
15
|
+
export { removeCustomGridEntity as removeCustomGrid, spawnCustomGridEntity as spawnCustomGrid, } from "./features/customGridEntity";
|
|
16
16
|
export * from "./features/customStage/exports";
|
|
17
17
|
export * from "./features/customTrapdoor/exports";
|
|
18
18
|
export * from "./features/debugDisplay/exports";
|
|
@@ -74,7 +74,6 @@ export * from "./functions/gridEntities";
|
|
|
74
74
|
export * from "./functions/gridEntitiesSpecific";
|
|
75
75
|
export * from "./functions/input";
|
|
76
76
|
export * from "./functions/isaacAPIClass";
|
|
77
|
-
export * from "./functions/itemPool";
|
|
78
77
|
export * from "./functions/jsonHelpers";
|
|
79
78
|
export * from "./functions/jsonRoom";
|
|
80
79
|
export * from "./functions/kColor";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,iCAAiC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;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC"}
|
package/dist/index.lua
CHANGED
|
@@ -104,7 +104,7 @@ do
|
|
|
104
104
|
end
|
|
105
105
|
do
|
|
106
106
|
local ____customGridEntity = require("features.customGridEntity")
|
|
107
|
-
local removeCustomGrid = ____customGridEntity.
|
|
107
|
+
local removeCustomGrid = ____customGridEntity.removeCustomGridEntity
|
|
108
108
|
local spawnCustomGrid = ____customGridEntity.spawnCustomGridEntity
|
|
109
109
|
____exports.removeCustomGrid = removeCustomGrid
|
|
110
110
|
____exports.spawnCustomGrid = spawnCustomGrid
|
|
@@ -590,14 +590,6 @@ do
|
|
|
590
590
|
end
|
|
591
591
|
end
|
|
592
592
|
end
|
|
593
|
-
do
|
|
594
|
-
local ____export = require("functions.itemPool")
|
|
595
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
596
|
-
if ____exportKey ~= "default" then
|
|
597
|
-
____exports[____exportKey] = ____exportValue
|
|
598
|
-
end
|
|
599
|
-
end
|
|
600
|
-
end
|
|
601
593
|
do
|
|
602
594
|
local ____export = require("functions.jsonHelpers")
|
|
603
595
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridCollisionClass, GridEntityType } from "isaac-typescript-definitions";
|
|
2
|
-
export interface
|
|
2
|
+
export interface GridEntityCustomData {
|
|
3
3
|
/**
|
|
4
4
|
* This is not a real `GridEntityType`; rather it is an arbitrary integer selected by end-user
|
|
5
5
|
* mods.
|
|
@@ -11,4 +11,4 @@ export interface CustomGridEntityData {
|
|
|
11
11
|
defaultAnimation?: string;
|
|
12
12
|
gridCollisionClass: GridCollisionClass;
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=GridEntityCustomData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"GridEntityCustomData.d.ts","sourceRoot":"","sources":["../../src/interfaces/GridEntityCustomData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,oBAAoB,EAAE,cAAc,CAAC;IAErC,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,kBAAkB,CAAC;CACxC"}
|
|
File without changes
|
|
@@ -4,13 +4,16 @@ export interface PlayerHealth {
|
|
|
4
4
|
maxHearts: int;
|
|
5
5
|
hearts: int;
|
|
6
6
|
eternalHearts: int;
|
|
7
|
+
/** For soul hearts to apply, they also have to be specified in the `soulHeartTypes` array. */
|
|
7
8
|
soulHearts: int;
|
|
9
|
+
/** For bone hearts to apply, they also have to be specified in the `soulHeartTypes` array. */
|
|
8
10
|
boneHearts: int;
|
|
9
11
|
goldenHearts: int;
|
|
10
12
|
rottenHearts: int;
|
|
11
13
|
brokenHearts: int;
|
|
12
14
|
soulCharges: int;
|
|
13
15
|
bloodCharges: int;
|
|
14
|
-
soulHeartTypes:
|
|
16
|
+
soulHeartTypes: SoulHeartType[];
|
|
15
17
|
}
|
|
18
|
+
export declare type SoulHeartType = HeartSubType.SOUL | HeartSubType.BLACK | HeartSubType.BONE;
|
|
16
19
|
//# sourceMappingURL=PlayerHealth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerHealth.d.ts","sourceRoot":"","sources":["../../src/interfaces/PlayerHealth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"PlayerHealth.d.ts","sourceRoot":"","sources":["../../src/interfaces/PlayerHealth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,GAAG,CAAC;IAEnB,8FAA8F;IAC9F,UAAU,EAAE,GAAG,CAAC;IAEhB,8FAA8F;IAC9F,UAAU,EAAE,GAAG,CAAC;IAEhB,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,GAAG,CAAC;IAClB,WAAW,EAAE,GAAG,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC;IAElB,cAAc,EAAE,aAAa,EAAE,CAAC;CACjC;AAED,oBAAY,aAAa,GACrB,YAAY,CAAC,IAAI,GACjB,YAAY,CAAC,KAAK,GAClB,YAAY,CAAC,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomDescription.d.ts","sourceRoot":"","sources":["../../src/interfaces/RoomDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,8BAA8B,CAAC;AAEtC,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"RoomDescription.d.ts","sourceRoot":"","sources":["../../src/interfaces/RoomDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,8BAA8B,CAAC;AAEtC,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,EAAE,GAAG,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -564,7 +564,7 @@ export enum ModCallbackCustom {
|
|
|
564
564
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
565
565
|
* only fire if it matches the `ItemType` provided.
|
|
566
566
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
567
|
-
* only fire if the `CollectibleType` or the `TrinketType` matches the
|
|
567
|
+
* only fire if the `CollectibleType` or the `TrinketType` matches the sub-type provided.
|
|
568
568
|
*
|
|
569
569
|
* ```ts
|
|
570
570
|
* function postItemPickup(
|