isaacscript-common 82.0.2 → 83.0.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/functions/bosses.d.ts +25 -22
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.lua +36 -36
- package/dist/index.rollup.d.ts +28 -24
- package/dist/isaacscript-common.lua +232 -154
- package/dist/sets/bossSets.d.ts +3 -3
- package/dist/sets/bossSets.d.ts.map +1 -1
- package/dist/sets/bossSets.lua +195 -117
- package/package.json +1 -1
- package/src/functions/bosses.ts +42 -38
- package/src/sets/bossSets.ts +141 -134
package/dist/sets/bossSets.lua
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
|
|
3
|
+
local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
|
|
4
|
+
local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
|
|
2
5
|
local __TS__New = ____lualib.__TS__New
|
|
3
6
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
4
|
-
local __TS__Spread = ____lualib.__TS__Spread
|
|
5
7
|
local Set = ____lualib.Set
|
|
8
|
+
local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
|
|
6
9
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
7
10
|
local ____exports = {}
|
|
8
11
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
@@ -11,8 +14,6 @@ local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
|
11
14
|
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
12
15
|
local ____cachedEnumValues = require("arrays.cachedEnumValues")
|
|
13
16
|
local BOSS_ID_VALUES = ____cachedEnumValues.BOSS_ID_VALUES
|
|
14
|
-
local ____set = require("functions.set")
|
|
15
|
-
local combineSets = ____set.combineSets
|
|
16
17
|
local ____storyBosses = require("functions.storyBosses")
|
|
17
18
|
local isStoryBossID = ____storyBosses.isStoryBossID
|
|
18
19
|
local ____ReadonlyMap = require("types.ReadonlyMap")
|
|
@@ -20,7 +21,7 @@ local ReadonlyMap = ____ReadonlyMap.ReadonlyMap
|
|
|
20
21
|
local ____ReadonlySet = require("types.ReadonlySet")
|
|
21
22
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22
23
|
--- For `StageID.BASEMENT` (1).
|
|
23
|
-
local
|
|
24
|
+
local BASEMENT_BOSSES = {
|
|
24
25
|
BossID.MONSTRO,
|
|
25
26
|
BossID.LARRY_JR,
|
|
26
27
|
BossID.FAMINE,
|
|
@@ -35,9 +36,9 @@ local BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
35
36
|
BossID.DANGLE,
|
|
36
37
|
BossID.TURDLING,
|
|
37
38
|
BossID.BABY_PLUM
|
|
38
|
-
}
|
|
39
|
+
}
|
|
39
40
|
--- For `StageID.CELLAR` (2).
|
|
40
|
-
local
|
|
41
|
+
local CELLAR_BOSSES = {
|
|
41
42
|
BossID.FAMINE,
|
|
42
43
|
BossID.DUKE_OF_FLIES,
|
|
43
44
|
BossID.HEADLESS_HORSEMAN,
|
|
@@ -49,9 +50,9 @@ local CELLAR_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
49
50
|
BossID.LITTLE_HORN,
|
|
50
51
|
BossID.RAG_MAN,
|
|
51
52
|
BossID.BABY_PLUM
|
|
52
|
-
}
|
|
53
|
+
}
|
|
53
54
|
--- For `StageID.BURNING_BASEMENT` (3).
|
|
54
|
-
local
|
|
55
|
+
local BURNING_BASEMENT_BOSSES = {
|
|
55
56
|
BossID.MONSTRO,
|
|
56
57
|
BossID.LARRY_JR,
|
|
57
58
|
BossID.FAMINE,
|
|
@@ -67,28 +68,42 @@ local BURNING_BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
67
68
|
BossID.DANGLE,
|
|
68
69
|
BossID.TURDLING,
|
|
69
70
|
BossID.BABY_PLUM
|
|
70
|
-
}
|
|
71
|
+
}
|
|
71
72
|
--- For `StageID.DOWNPOUR` (27).
|
|
72
|
-
local
|
|
73
|
+
local DOWNPOUR_BOSSES = {BossID.LIL_BLUB, BossID.WORMWOOD, BossID.RAINMAKER, BossID.MIN_MIN}
|
|
73
74
|
--- For `StageID.DROSS` (28).
|
|
74
|
-
local
|
|
75
|
+
local DROSS_BOSSES = {
|
|
75
76
|
BossID.LIL_BLUB,
|
|
76
77
|
BossID.WORMWOOD,
|
|
77
78
|
BossID.CLOG,
|
|
78
79
|
BossID.COLOSTOMIA,
|
|
79
80
|
BossID.TURDLET
|
|
80
|
-
}
|
|
81
|
+
}
|
|
82
|
+
local ____ReadonlySet_1 = ReadonlySet
|
|
83
|
+
local ____array_0 = __TS__SparseArrayNew(table.unpack(BASEMENT_BOSSES))
|
|
84
|
+
__TS__SparseArrayPush(
|
|
85
|
+
____array_0,
|
|
86
|
+
table.unpack(CELLAR_BOSSES)
|
|
87
|
+
)
|
|
88
|
+
__TS__SparseArrayPush(
|
|
89
|
+
____array_0,
|
|
90
|
+
table.unpack(BURNING_BASEMENT_BOSSES)
|
|
91
|
+
)
|
|
92
|
+
__TS__SparseArrayPush(
|
|
93
|
+
____array_0,
|
|
94
|
+
table.unpack(DOWNPOUR_BOSSES)
|
|
95
|
+
)
|
|
96
|
+
__TS__SparseArrayPush(
|
|
97
|
+
____array_0,
|
|
98
|
+
table.unpack(DROSS_BOSSES)
|
|
99
|
+
)
|
|
81
100
|
--- The set of unique bosses for Basement, Cellar, Burning Basement, Downpour, and Dross.
|
|
82
|
-
local ALL_BASEMENT_BOSSES_SET =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
CELLAR_BOSSES_SET,
|
|
86
|
-
BURNING_BASEMENT_BOSSES_SET,
|
|
87
|
-
DOWNPOUR_BOSSES_SET,
|
|
88
|
-
DROSS_BOSSES_SET
|
|
101
|
+
local ALL_BASEMENT_BOSSES_SET = __TS__New(
|
|
102
|
+
____ReadonlySet_1,
|
|
103
|
+
{__TS__SparseArraySpread(____array_0)}
|
|
89
104
|
)
|
|
90
105
|
--- For `StageID.CAVES` (4).
|
|
91
|
-
local
|
|
106
|
+
local CAVES_BOSSES = {
|
|
92
107
|
BossID.CHUB,
|
|
93
108
|
BossID.GURDY,
|
|
94
109
|
BossID.PESTILENCE,
|
|
@@ -104,9 +119,9 @@ local CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
104
119
|
BossID.RAG_MEGA,
|
|
105
120
|
BossID.BIG_HORN,
|
|
106
121
|
BossID.BUMBINO
|
|
107
|
-
}
|
|
122
|
+
}
|
|
108
123
|
--- For `StageID.CATACOMBS` (5).
|
|
109
|
-
local
|
|
124
|
+
local CATACOMBS_BOSSES = {
|
|
110
125
|
BossID.PESTILENCE,
|
|
111
126
|
BossID.PEEP,
|
|
112
127
|
BossID.HEADLESS_HORSEMAN,
|
|
@@ -123,9 +138,9 @@ local CATACOMBS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
123
138
|
BossID.RAG_MEGA,
|
|
124
139
|
BossID.BIG_HORN,
|
|
125
140
|
BossID.BUMBINO
|
|
126
|
-
}
|
|
141
|
+
}
|
|
127
142
|
--- For `StageID.FLOODED_CAVES` (6).
|
|
128
|
-
local
|
|
143
|
+
local FLOODED_CAVES_BOSSES = {
|
|
129
144
|
BossID.CHUB,
|
|
130
145
|
BossID.GURDY,
|
|
131
146
|
BossID.PESTILENCE,
|
|
@@ -143,30 +158,44 @@ local FLOODED_CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
143
158
|
BossID.RAG_MEGA,
|
|
144
159
|
BossID.BIG_HORN,
|
|
145
160
|
BossID.BUMBINO
|
|
146
|
-
}
|
|
161
|
+
}
|
|
147
162
|
--- For `StageID.MINES` (29).
|
|
148
|
-
local
|
|
163
|
+
local MINES_BOSSES = {BossID.REAP_CREEP, BossID.TUFF_TWINS, BossID.HORNFEL, BossID.GREAT_GIDEON}
|
|
149
164
|
--- For `StageID.ASHPIT` (30).
|
|
150
|
-
local
|
|
165
|
+
local ASHPIT_BOSSES = {
|
|
151
166
|
BossID.PILE,
|
|
152
167
|
BossID.GREAT_GIDEON,
|
|
153
168
|
BossID.SINGE,
|
|
154
169
|
BossID.SHELL,
|
|
155
170
|
BossID.CLUTCH
|
|
156
|
-
}
|
|
171
|
+
}
|
|
172
|
+
local ____ReadonlySet_3 = ReadonlySet
|
|
173
|
+
local ____array_2 = __TS__SparseArrayNew(table.unpack(CAVES_BOSSES))
|
|
174
|
+
__TS__SparseArrayPush(
|
|
175
|
+
____array_2,
|
|
176
|
+
table.unpack(CATACOMBS_BOSSES)
|
|
177
|
+
)
|
|
178
|
+
__TS__SparseArrayPush(
|
|
179
|
+
____array_2,
|
|
180
|
+
table.unpack(FLOODED_CAVES_BOSSES)
|
|
181
|
+
)
|
|
182
|
+
__TS__SparseArrayPush(
|
|
183
|
+
____array_2,
|
|
184
|
+
table.unpack(MINES_BOSSES)
|
|
185
|
+
)
|
|
186
|
+
__TS__SparseArrayPush(
|
|
187
|
+
____array_2,
|
|
188
|
+
table.unpack(ASHPIT_BOSSES)
|
|
189
|
+
)
|
|
157
190
|
--- The set of unique bosses for Caves, Catacombs, Flooded Caves, Mines, and Ashpit.
|
|
158
|
-
local ALL_CAVES_BOSSES_SET =
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
CATACOMBS_BOSSES_SET,
|
|
162
|
-
FLOODED_CAVES_BOSSES_SET,
|
|
163
|
-
MINES_BOSSES_SET,
|
|
164
|
-
ASHPIT_BOSSES_SET
|
|
191
|
+
local ALL_CAVES_BOSSES_SET = __TS__New(
|
|
192
|
+
____ReadonlySet_3,
|
|
193
|
+
{__TS__SparseArraySpread(____array_2)}
|
|
165
194
|
)
|
|
166
195
|
--- For `StageID.DEPTHS` (7).
|
|
167
196
|
--
|
|
168
197
|
-- Note that this set includes Mom, even though they are not technically in the boss pool.
|
|
169
|
-
local
|
|
198
|
+
local DEPTHS_BOSSES = {
|
|
170
199
|
BossID.MONSTRO_2,
|
|
171
200
|
BossID.MOM,
|
|
172
201
|
BossID.WAR,
|
|
@@ -179,11 +208,11 @@ local DEPTHS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
179
208
|
BossID.BROWNIE,
|
|
180
209
|
BossID.SISTERS_VIS,
|
|
181
210
|
BossID.REAP_CREEP
|
|
182
|
-
}
|
|
211
|
+
}
|
|
183
212
|
--- For `StageID.NECROPOLIS` (8).
|
|
184
213
|
--
|
|
185
214
|
-- Note that this set includes Mom, even though they are not technically in the boss pool.
|
|
186
|
-
local
|
|
215
|
+
local NECROPOLIS_BOSSES = {
|
|
187
216
|
BossID.MOM,
|
|
188
217
|
BossID.WAR,
|
|
189
218
|
BossID.LOKI,
|
|
@@ -195,11 +224,11 @@ local NECROPOLIS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
195
224
|
BossID.BROWNIE,
|
|
196
225
|
BossID.SISTERS_VIS,
|
|
197
226
|
BossID.PILE
|
|
198
|
-
}
|
|
227
|
+
}
|
|
199
228
|
--- For `StageID.DANK_DEPTHS` (9).
|
|
200
229
|
--
|
|
201
230
|
-- Note that this set includes Mom, even though they are not technically in the boss pool.
|
|
202
|
-
local
|
|
231
|
+
local DANK_DEPTHS_BOSSES = {
|
|
203
232
|
BossID.MONSTRO_2,
|
|
204
233
|
BossID.MOM,
|
|
205
234
|
BossID.WAR,
|
|
@@ -212,29 +241,43 @@ local DANK_DEPTHS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
212
241
|
BossID.BROWNIE,
|
|
213
242
|
BossID.SISTERS_VIS,
|
|
214
243
|
BossID.REAP_CREEP
|
|
215
|
-
}
|
|
244
|
+
}
|
|
216
245
|
--- For `StageID.MAUSOLEUM` (31).
|
|
217
246
|
--
|
|
218
247
|
-- Note that this set includes Mausoleum Mom, even though they are not technically in the boss pool.
|
|
219
|
-
local
|
|
248
|
+
local MAUSOLEUM_BOSSES = {BossID.SIREN, BossID.HERETIC, BossID.MAUSOLEUM_MOM}
|
|
220
249
|
--- For `StageID.GEHENNA` (32).
|
|
221
250
|
--
|
|
222
251
|
-- Note that this set includes Mausoleum Mom, even though they are not technically in the boss pool.
|
|
223
|
-
local
|
|
252
|
+
local GEHENNA_BOSSES = {BossID.VISAGE, BossID.MAUSOLEUM_MOM, BossID.HORNY_BOYS}
|
|
253
|
+
local ____ReadonlySet_5 = ReadonlySet
|
|
254
|
+
local ____array_4 = __TS__SparseArrayNew(table.unpack(DEPTHS_BOSSES))
|
|
255
|
+
__TS__SparseArrayPush(
|
|
256
|
+
____array_4,
|
|
257
|
+
table.unpack(NECROPOLIS_BOSSES)
|
|
258
|
+
)
|
|
259
|
+
__TS__SparseArrayPush(
|
|
260
|
+
____array_4,
|
|
261
|
+
table.unpack(DANK_DEPTHS_BOSSES)
|
|
262
|
+
)
|
|
263
|
+
__TS__SparseArrayPush(
|
|
264
|
+
____array_4,
|
|
265
|
+
table.unpack(MAUSOLEUM_BOSSES)
|
|
266
|
+
)
|
|
267
|
+
__TS__SparseArrayPush(
|
|
268
|
+
____array_4,
|
|
269
|
+
table.unpack(GEHENNA_BOSSES)
|
|
270
|
+
)
|
|
224
271
|
--- The set of unique bosses for Depths, Necropolis, Dank Depths, Mausoleum, and Gehenna.
|
|
225
|
-
local ALL_DEPTHS_BOSSES_SET =
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
NECROPOLIS_BOSSES_SET,
|
|
229
|
-
DANK_DEPTHS_BOSSES_SET,
|
|
230
|
-
MAUSOLEUM_BOSSES_SET,
|
|
231
|
-
GEHENNA_BOSSES_SET
|
|
272
|
+
local ALL_DEPTHS_BOSSES_SET = __TS__New(
|
|
273
|
+
____ReadonlySet_5,
|
|
274
|
+
{__TS__SparseArraySpread(____array_4)}
|
|
232
275
|
)
|
|
233
276
|
--- For `StageID.WOMB` (10).
|
|
234
277
|
--
|
|
235
278
|
-- Note that this set includes Mom's Heart & It Lives, even though they are not technically in the
|
|
236
279
|
-- boss pool.
|
|
237
|
-
local
|
|
280
|
+
local WOMB_BOSSES = {
|
|
238
281
|
BossID.SCOLEX,
|
|
239
282
|
BossID.MOMS_HEART,
|
|
240
283
|
BossID.DEATH,
|
|
@@ -247,12 +290,12 @@ local WOMB_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
247
290
|
BossID.MAMA_GURDY,
|
|
248
291
|
BossID.MR_FRED,
|
|
249
292
|
BossID.MATRIARCH
|
|
250
|
-
}
|
|
293
|
+
}
|
|
251
294
|
--- For `StageID.UTERO` (11).
|
|
252
295
|
--
|
|
253
296
|
-- Note that this set includes Mom's Heart & It Lives, even though they are not technically in the
|
|
254
297
|
-- boss pool.
|
|
255
|
-
local
|
|
298
|
+
local UTERO_BOSSES = {
|
|
256
299
|
BossID.MOMS_HEART,
|
|
257
300
|
BossID.DEATH,
|
|
258
301
|
BossID.HEADLESS_HORSEMAN,
|
|
@@ -264,12 +307,12 @@ local UTERO_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
264
307
|
BossID.CONQUEST,
|
|
265
308
|
BossID.DADDY_LONG_LEGS,
|
|
266
309
|
BossID.TRIACHNID
|
|
267
|
-
}
|
|
310
|
+
}
|
|
268
311
|
--- For `StageID.SCARRED_WOMB` (12).
|
|
269
312
|
--
|
|
270
313
|
-- Note that this set includes Mom's Heart & It Lives, even though they are not technically in the
|
|
271
314
|
-- boss pool.
|
|
272
|
-
local
|
|
315
|
+
local SCARRED_WOMB_BOSSES = {
|
|
273
316
|
BossID.SCOLEX,
|
|
274
317
|
BossID.MOMS_HEART,
|
|
275
318
|
BossID.DEATH,
|
|
@@ -283,59 +326,100 @@ local SCARRED_WOMB_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
283
326
|
BossID.MAMA_GURDY,
|
|
284
327
|
BossID.MR_FRED,
|
|
285
328
|
BossID.MATRIARCH
|
|
286
|
-
}
|
|
329
|
+
}
|
|
287
330
|
--- For `StageID.CORPSE` (33).
|
|
288
331
|
--
|
|
289
332
|
-- Note that this set includes Mother, even though she is not technically in the boss pool.
|
|
290
|
-
local
|
|
333
|
+
local CORPSE_BOSSES = {BossID.SCOURGE, BossID.CHIMERA, BossID.ROTGUT, BossID.MOTHER}
|
|
334
|
+
local ____ReadonlySet_7 = ReadonlySet
|
|
335
|
+
local ____array_6 = __TS__SparseArrayNew(table.unpack(WOMB_BOSSES))
|
|
336
|
+
__TS__SparseArrayPush(
|
|
337
|
+
____array_6,
|
|
338
|
+
table.unpack(UTERO_BOSSES)
|
|
339
|
+
)
|
|
340
|
+
__TS__SparseArrayPush(
|
|
341
|
+
____array_6,
|
|
342
|
+
table.unpack(SCARRED_WOMB_BOSSES)
|
|
343
|
+
)
|
|
344
|
+
__TS__SparseArrayPush(
|
|
345
|
+
____array_6,
|
|
346
|
+
table.unpack(CORPSE_BOSSES)
|
|
347
|
+
)
|
|
291
348
|
--- The set of unique bosses for Womb, Utero, Scarred Womb, and Corpse.
|
|
292
|
-
local ALL_WOMB_BOSSES_SET =
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
349
|
+
local ALL_WOMB_BOSSES_SET = __TS__New(
|
|
350
|
+
____ReadonlySet_7,
|
|
351
|
+
{__TS__SparseArraySpread(____array_6)}
|
|
352
|
+
)
|
|
353
|
+
local BLUE_WOMB_BOSSES = {BossID.HUSH}
|
|
354
|
+
local ALL_BLUE_WOMB_BOSSES_SET = __TS__New(
|
|
355
|
+
ReadonlySet,
|
|
356
|
+
{table.unpack(BLUE_WOMB_BOSSES)}
|
|
357
|
+
)
|
|
358
|
+
local SHEOL_BOSSES = {BossID.SATAN}
|
|
359
|
+
local CATHEDRAL_BOSSES = {BossID.ISAAC}
|
|
360
|
+
local ____ReadonlySet_9 = ReadonlySet
|
|
361
|
+
local ____array_8 = __TS__SparseArrayNew(table.unpack(SHEOL_BOSSES))
|
|
362
|
+
__TS__SparseArrayPush(
|
|
363
|
+
____array_8,
|
|
364
|
+
table.unpack(CATHEDRAL_BOSSES)
|
|
365
|
+
)
|
|
366
|
+
local ALL_STAGE_10_BOSSES_SET = __TS__New(
|
|
367
|
+
____ReadonlySet_9,
|
|
368
|
+
{__TS__SparseArraySpread(____array_8)}
|
|
298
369
|
)
|
|
299
|
-
local BLUE_WOMB_BOSSES_SET = __TS__New(ReadonlySet, {BossID.HUSH})
|
|
300
|
-
local SHEOL_BOSSES_SET = __TS__New(ReadonlySet, {BossID.SATAN})
|
|
301
|
-
local CATHEDRAL_BOSSES_SET = __TS__New(ReadonlySet, {BossID.ISAAC})
|
|
302
|
-
local ALL_STAGE_10_BOSSES_SET = combineSets(nil, SHEOL_BOSSES_SET, CATHEDRAL_BOSSES_SET)
|
|
303
370
|
--- Note that this set includes Mega Satan, even though they are not technically in the boss pool.
|
|
304
|
-
local
|
|
371
|
+
local DARK_ROOM_BOSSES = {BossID.LAMB, BossID.MEGA_SATAN}
|
|
305
372
|
--- Note that this set includes Mega Satan, even though they are not technically in the boss pool.
|
|
306
|
-
local
|
|
307
|
-
local
|
|
308
|
-
local
|
|
373
|
+
local CHEST_BOSSES = {BossID.BLUE_BABY, BossID.MEGA_SATAN}
|
|
374
|
+
local ____ReadonlySet_11 = ReadonlySet
|
|
375
|
+
local ____array_10 = __TS__SparseArrayNew(table.unpack(DARK_ROOM_BOSSES))
|
|
376
|
+
__TS__SparseArrayPush(
|
|
377
|
+
____array_10,
|
|
378
|
+
table.unpack(CHEST_BOSSES)
|
|
379
|
+
)
|
|
380
|
+
local ALL_STAGE_11_BOSSES_SET = __TS__New(
|
|
381
|
+
____ReadonlySet_11,
|
|
382
|
+
{__TS__SparseArraySpread(____array_10)}
|
|
383
|
+
)
|
|
384
|
+
local VOID_BOSSES = {BossID.DELIRIUM}
|
|
385
|
+
local ALL_VOID_BOSSES_SET = __TS__New(
|
|
386
|
+
ReadonlySet,
|
|
387
|
+
{table.unpack(VOID_BOSSES)}
|
|
388
|
+
)
|
|
309
389
|
--- Includes Dogma and The Beast. Does not include Ultra Famine, Ultra Pestilence, Ultra War, and
|
|
310
390
|
-- Ultra Death (since they do not have boss IDs).
|
|
311
|
-
local
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
{
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
{StageID.
|
|
318
|
-
{StageID.
|
|
319
|
-
{StageID.
|
|
320
|
-
{StageID.
|
|
321
|
-
{StageID.
|
|
322
|
-
{StageID.
|
|
323
|
-
{StageID.
|
|
324
|
-
{StageID.
|
|
325
|
-
{StageID.
|
|
326
|
-
{StageID.
|
|
327
|
-
{StageID.
|
|
328
|
-
{StageID.
|
|
329
|
-
{StageID.
|
|
330
|
-
{StageID.
|
|
331
|
-
{StageID.
|
|
332
|
-
{StageID.
|
|
333
|
-
{StageID.
|
|
334
|
-
{StageID.
|
|
335
|
-
{StageID.
|
|
336
|
-
{StageID.
|
|
337
|
-
{StageID.
|
|
338
|
-
{StageID.
|
|
391
|
+
local HOME_BOSSES = {BossID.DOGMA, BossID.BEAST}
|
|
392
|
+
local ALL_HOME_BOSSES_SET = __TS__New(
|
|
393
|
+
ReadonlySet,
|
|
394
|
+
{table.unpack(HOME_BOSSES)}
|
|
395
|
+
)
|
|
396
|
+
____exports.STAGE_ID_TO_BOSS_IDS = __TS__New(ReadonlyMap, {
|
|
397
|
+
{StageID.BASEMENT, BASEMENT_BOSSES},
|
|
398
|
+
{StageID.CELLAR, CELLAR_BOSSES},
|
|
399
|
+
{StageID.BURNING_BASEMENT, BURNING_BASEMENT_BOSSES},
|
|
400
|
+
{StageID.DOWNPOUR, DOWNPOUR_BOSSES},
|
|
401
|
+
{StageID.DROSS, DROSS_BOSSES},
|
|
402
|
+
{StageID.CAVES, CAVES_BOSSES},
|
|
403
|
+
{StageID.CATACOMBS, CATACOMBS_BOSSES},
|
|
404
|
+
{StageID.FLOODED_CAVES, FLOODED_CAVES_BOSSES},
|
|
405
|
+
{StageID.MINES, MINES_BOSSES},
|
|
406
|
+
{StageID.ASHPIT, ASHPIT_BOSSES},
|
|
407
|
+
{StageID.DEPTHS, DEPTHS_BOSSES},
|
|
408
|
+
{StageID.NECROPOLIS, NECROPOLIS_BOSSES},
|
|
409
|
+
{StageID.DANK_DEPTHS, DANK_DEPTHS_BOSSES},
|
|
410
|
+
{StageID.MAUSOLEUM, MAUSOLEUM_BOSSES},
|
|
411
|
+
{StageID.GEHENNA, GEHENNA_BOSSES},
|
|
412
|
+
{StageID.WOMB, WOMB_BOSSES},
|
|
413
|
+
{StageID.UTERO, UTERO_BOSSES},
|
|
414
|
+
{StageID.SCARRED_WOMB, SCARRED_WOMB_BOSSES},
|
|
415
|
+
{StageID.CORPSE, CORPSE_BOSSES},
|
|
416
|
+
{StageID.BLUE_WOMB, BLUE_WOMB_BOSSES},
|
|
417
|
+
{StageID.SHEOL, SHEOL_BOSSES},
|
|
418
|
+
{StageID.CATHEDRAL, CATHEDRAL_BOSSES},
|
|
419
|
+
{StageID.DARK_ROOM, DARK_ROOM_BOSSES},
|
|
420
|
+
{StageID.CHEST, CHEST_BOSSES},
|
|
421
|
+
{StageID.VOID, VOID_BOSSES},
|
|
422
|
+
{StageID.HOME, HOME_BOSSES}
|
|
339
423
|
})
|
|
340
424
|
____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
|
|
341
425
|
{LevelStage.BASEMENT_1, ALL_BASEMENT_BOSSES_SET},
|
|
@@ -346,34 +430,28 @@ ____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
|
|
|
346
430
|
{LevelStage.DEPTHS_2, ALL_DEPTHS_BOSSES_SET},
|
|
347
431
|
{LevelStage.WOMB_1, ALL_WOMB_BOSSES_SET},
|
|
348
432
|
{LevelStage.WOMB_2, ALL_WOMB_BOSSES_SET},
|
|
349
|
-
{LevelStage.BLUE_WOMB,
|
|
433
|
+
{LevelStage.BLUE_WOMB, ALL_BLUE_WOMB_BOSSES_SET},
|
|
350
434
|
{LevelStage.SHEOL_CATHEDRAL, ALL_STAGE_10_BOSSES_SET},
|
|
351
435
|
{LevelStage.DARK_ROOM_CHEST, ALL_STAGE_11_BOSSES_SET},
|
|
352
|
-
{LevelStage.VOID,
|
|
353
|
-
{LevelStage.HOME,
|
|
436
|
+
{LevelStage.VOID, ALL_VOID_BOSSES_SET},
|
|
437
|
+
{LevelStage.HOME, ALL_HOME_BOSSES_SET}
|
|
354
438
|
})
|
|
355
|
-
____exports.
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
BOSS_ID_VALUES,
|
|
359
|
-
function(____, bossID) return bossID ~= BossID.RAGLICH end
|
|
360
|
-
)
|
|
439
|
+
____exports.ALL_BOSSES = __TS__ArrayFilter(
|
|
440
|
+
BOSS_ID_VALUES,
|
|
441
|
+
function(____, bossID) return bossID ~= BossID.RAGLICH end
|
|
361
442
|
)
|
|
362
|
-
____exports.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
{__TS__Spread(____exports.ALL_BOSSES_SET)},
|
|
366
|
-
function(____, bossID) return not isStoryBossID(nil, bossID) end
|
|
367
|
-
)
|
|
443
|
+
____exports.NON_STORY_BOSSES = __TS__ArrayFilter(
|
|
444
|
+
____exports.ALL_BOSSES,
|
|
445
|
+
function(____, bossID) return not isStoryBossID(nil, bossID) end
|
|
368
446
|
)
|
|
369
447
|
____exports.BOSS_ID_TO_STAGE_IDS = (function()
|
|
370
448
|
local partialBossIDsToStageIDs = {}
|
|
371
449
|
for ____, bossID in ipairs(BOSS_ID_VALUES) do
|
|
372
450
|
local stageIDs = __TS__New(Set)
|
|
373
|
-
for ____, ____value in __TS__Iterator(____exports.
|
|
451
|
+
for ____, ____value in __TS__Iterator(____exports.STAGE_ID_TO_BOSS_IDS) do
|
|
374
452
|
local stageID = ____value[1]
|
|
375
|
-
local
|
|
376
|
-
if
|
|
453
|
+
local bossIDs = ____value[2]
|
|
454
|
+
if __TS__ArrayIncludes(bossIDs, bossID) then
|
|
377
455
|
stageIDs:add(stageID)
|
|
378
456
|
end
|
|
379
457
|
end
|
package/package.json
CHANGED
package/src/functions/bosses.ts
CHANGED
|
@@ -11,10 +11,10 @@ import { ENTITY_TYPE_VARIANT_TO_BOSS_ID_MAP } from "../maps/entityTypeVariantToB
|
|
|
11
11
|
import { BOSS_ID_TO_ENTITY_TYPE_VARIANT } from "../objects/bossIDToEntityTypeVariant";
|
|
12
12
|
import { BOSS_NAMES, DEFAULT_BOSS_NAME } from "../objects/bossNames";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
ALL_BOSSES_SET,
|
|
14
|
+
ALL_BOSSES,
|
|
16
15
|
BOSS_ID_TO_STAGE_IDS,
|
|
17
|
-
|
|
16
|
+
NON_STORY_BOSSES,
|
|
17
|
+
STAGE_ID_TO_BOSS_IDS,
|
|
18
18
|
STAGE_TO_COMBINED_BOSS_SET_MAP,
|
|
19
19
|
} from "../sets/bossSets";
|
|
20
20
|
import { REPENTANCE_ONLY_BOSS_IDS_SET } from "../sets/repentanceBossIDsSet";
|
|
@@ -62,8 +62,8 @@ export function getAliveBosses(
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* Helper function to get
|
|
66
|
-
* enum
|
|
65
|
+
* Helper function to get an array with every boss in the game. This is derived from the `BossID`
|
|
66
|
+
* enum.
|
|
67
67
|
*
|
|
68
68
|
* This includes:
|
|
69
69
|
* - Ultra Greed
|
|
@@ -76,17 +76,19 @@ export function getAliveBosses(
|
|
|
76
76
|
* - sub-bosses of The Beast fight (e.g. Ultra Famine, Ultra Pestilence, Ultra War, Ultra Death)
|
|
77
77
|
* - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
78
78
|
*
|
|
79
|
-
* Also see the `
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
* Also see the `getAllNonStoryBosses` function.
|
|
80
|
+
*/
|
|
81
|
+
export function getAllBosses(): readonly BossID[] {
|
|
82
|
+
return ALL_BOSSES;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Helper function to get an array with every boss in the game. This is derived from the `BossID`
|
|
87
|
+
* enum. This is the same thing as the `getAllBosses` helper function, but with story bosses
|
|
88
|
+
* filtered out.
|
|
83
89
|
*/
|
|
84
|
-
export function
|
|
85
|
-
|
|
86
|
-
): ReadonlySet<BossID> {
|
|
87
|
-
return includeStoryBosses
|
|
88
|
-
? ALL_BOSSES_SET
|
|
89
|
-
: ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET;
|
|
90
|
+
export function getAllNonStoryBosses(): readonly BossID[] {
|
|
91
|
+
return NON_STORY_BOSSES;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
/**
|
|
@@ -132,6 +134,31 @@ export function getBossIDFromEntityTypeVariant(
|
|
|
132
134
|
return ENTITY_TYPE_VARIANT_TO_BOSS_ID_MAP.get(entityTypeVariant);
|
|
133
135
|
}
|
|
134
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Helper function to get the set of vanilla bosses for a particular stage across all of the stage
|
|
139
|
+
* types. For example, specifying `LevelStage.BASEMENT_2` will return a set with all of the bosses
|
|
140
|
+
* for Basement, Cellar, Burning Basement, Downpour, and Dross.
|
|
141
|
+
*
|
|
142
|
+
* Also see the `getAllBossesSet` and `getBossIDsForStageID` functions.
|
|
143
|
+
*/
|
|
144
|
+
export function getBossIDsForStage(
|
|
145
|
+
stage: LevelStage,
|
|
146
|
+
): ReadonlySet<BossID> | undefined {
|
|
147
|
+
return STAGE_TO_COMBINED_BOSS_SET_MAP.get(stage);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Helper function to get the set of vanilla bosses that can randomly appear on a particular stage
|
|
152
|
+
* ID.
|
|
153
|
+
*
|
|
154
|
+
* Also see the `getAllBossesSet` and `getBossIDsForStage` functions.
|
|
155
|
+
*/
|
|
156
|
+
export function getBossIDsForStageID(
|
|
157
|
+
stageID: StageID,
|
|
158
|
+
): readonly BossID[] | undefined {
|
|
159
|
+
return STAGE_ID_TO_BOSS_IDS.get(stageID);
|
|
160
|
+
}
|
|
161
|
+
|
|
135
162
|
/**
|
|
136
163
|
* Helper function to get the proper English name for a boss. For example, the name for
|
|
137
164
|
* `BossID.WRETCHED` (36) is "The Wretched".
|
|
@@ -142,16 +169,6 @@ export function getBossName(bossID: BossID): string {
|
|
|
142
169
|
return BOSS_NAMES[bossID] ?? DEFAULT_BOSS_NAME;
|
|
143
170
|
}
|
|
144
171
|
|
|
145
|
-
/**
|
|
146
|
-
* Helper function to get the set of vanilla bosses for a particular stage and stage type
|
|
147
|
-
* combination.
|
|
148
|
-
*
|
|
149
|
-
* Also see the `getAllBossesSet` and `getCombinedBossSet` functions.
|
|
150
|
-
*/
|
|
151
|
-
export function getBossSet(stageID: StageID): ReadonlySet<BossID> | undefined {
|
|
152
|
-
return STAGE_ID_TO_BOSS_SET_MAP.get(stageID);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
172
|
/** Helper function to get the set of stage IDs that a particular boss naturally appears in. */
|
|
156
173
|
export function getBossStageIDs(bossID: BossID): ReadonlySet<StageID> {
|
|
157
174
|
return BOSS_ID_TO_STAGE_IDS[bossID];
|
|
@@ -178,19 +195,6 @@ export function getBosses(
|
|
|
178
195
|
return npcs.filter((npc) => npc.IsBoss());
|
|
179
196
|
}
|
|
180
197
|
|
|
181
|
-
/**
|
|
182
|
-
* Helper function to get the set of vanilla bosses for a particular stage across all of the stage
|
|
183
|
-
* types. For example, specifying `LevelStage.BASEMENT_2` will return a set with all of the bosses
|
|
184
|
-
* for Basement, Cellar, Burning Basement, Downpour, and Dross.
|
|
185
|
-
*
|
|
186
|
-
* Also see the `getAllBossesSet` and `getBossSet` functions.
|
|
187
|
-
*/
|
|
188
|
-
export function getCombinedBossSet(
|
|
189
|
-
stage: LevelStage,
|
|
190
|
-
): ReadonlySet<BossID> | undefined {
|
|
191
|
-
return STAGE_TO_COMBINED_BOSS_SET_MAP.get(stage);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
198
|
export function getEntityTypeVariantFromBossID(
|
|
195
199
|
bossID: BossID,
|
|
196
200
|
): readonly [EntityType, int] {
|