isaacscript-common 31.8.0 → 31.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.rollup.d.ts
CHANGED
|
@@ -8846,8 +8846,15 @@ export declare function isSpikes(variable: unknown): variable is GridEntitySpike
|
|
|
8846
8846
|
export declare function isStageWithNaturalDevilRoom(effectiveStage: LevelStage): boolean;
|
|
8847
8847
|
|
|
8848
8848
|
/**
|
|
8849
|
-
*
|
|
8850
|
-
*
|
|
8849
|
+
* Helper function to check if the provided stage is one that will have a random collectible drop
|
|
8850
|
+
* upon defeating the boss of the floor.
|
|
8851
|
+
*
|
|
8852
|
+
* This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
8853
|
+
* The Chest, and Home (due to the presence of a story boss).
|
|
8854
|
+
*
|
|
8855
|
+
* Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
8856
|
+
* considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
8857
|
+
* Rooms will drop random boss collectibles.
|
|
8851
8858
|
*/
|
|
8852
8859
|
export declare function isStageWithRandomBossCollectible(stage: LevelStage): boolean;
|
|
8853
8860
|
|
|
@@ -13551,8 +13558,15 @@ export declare function onStageType(...stageTypes: StageType[]): boolean;
|
|
|
13551
13558
|
export declare function onStageWithNaturalDevilRoom(): boolean;
|
|
13552
13559
|
|
|
13553
13560
|
/**
|
|
13554
|
-
*
|
|
13555
|
-
*
|
|
13561
|
+
* Helper function to check if the current stage is one that will have a random collectible drop
|
|
13562
|
+
* upon defeating the boss of the floor.
|
|
13563
|
+
*
|
|
13564
|
+
* This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
13565
|
+
* The Chest, and Home (due to the presence of a story boss).
|
|
13566
|
+
*
|
|
13567
|
+
* Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
13568
|
+
* considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
13569
|
+
* Rooms will drop random boss collectibles.
|
|
13556
13570
|
*/
|
|
13557
13571
|
export declare function onStageWithRandomBossCollectible(): boolean;
|
|
13558
13572
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 31.8.
|
|
3
|
+
isaacscript-common 31.8.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -27213,6 +27213,9 @@ local inRange = ____utils.inRange
|
|
|
27213
27213
|
function ____exports.isRepentanceStage(self, stageType)
|
|
27214
27214
|
return stageType == StageType.REPENTANCE or stageType == StageType.REPENTANCE_B
|
|
27215
27215
|
end
|
|
27216
|
+
function ____exports.isStageWithStoryBoss(self, stage)
|
|
27217
|
+
return stage == LevelStage.DEPTHS_2 or stage >= LevelStage.WOMB_2
|
|
27218
|
+
end
|
|
27216
27219
|
function ____exports.onRepentanceStage(self)
|
|
27217
27220
|
local level = game:GetLevel()
|
|
27218
27221
|
local stageType = level:GetStageType()
|
|
@@ -27307,7 +27310,7 @@ function ____exports.isStageWithNaturalDevilRoom(self, effectiveStage)
|
|
|
27307
27310
|
return inRange(nil, effectiveStage, LevelStage.BASEMENT_2, LevelStage.WOMB_2) and effectiveStage ~= LevelStage.BLUE_WOMB
|
|
27308
27311
|
end
|
|
27309
27312
|
function ____exports.isStageWithRandomBossCollectible(self, stage)
|
|
27310
|
-
return
|
|
27313
|
+
return not ____exports.isStageWithStoryBoss(nil, stage) or stage == LevelStage.THE_VOID
|
|
27311
27314
|
end
|
|
27312
27315
|
function ____exports.isStageWithSecretExitToDownpour(self, stage)
|
|
27313
27316
|
return stage == LevelStage.BASEMENT_1 or stage == LevelStage.BASEMENT_2
|
|
@@ -27324,9 +27327,6 @@ function ____exports.isStageWithShovelTrapdoors(self, stage, stageType)
|
|
|
27324
27327
|
local repentanceStage = ____exports.isRepentanceStage(nil, stageType)
|
|
27325
27328
|
return stage < LevelStage.WOMB_2 or stage == LevelStage.WOMB_2 and not repentanceStage
|
|
27326
27329
|
end
|
|
27327
|
-
function ____exports.isStageWithStoryBoss(self, stage)
|
|
27328
|
-
return stage == LevelStage.DEPTHS_2 or stage >= LevelStage.WOMB_2
|
|
27329
|
-
end
|
|
27330
27330
|
function ____exports.onAscent(self)
|
|
27331
27331
|
return game:GetStateFlag(GameStateFlag.BACKWARDS_PATH)
|
|
27332
27332
|
end
|
|
@@ -80,8 +80,15 @@ export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
|
80
80
|
*/
|
|
81
81
|
export declare function isStageWithNaturalDevilRoom(effectiveStage: LevelStage): boolean;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
83
|
+
* Helper function to check if the provided stage is one that will have a random collectible drop
|
|
84
|
+
* upon defeating the boss of the floor.
|
|
85
|
+
*
|
|
86
|
+
* This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
87
|
+
* The Chest, and Home (due to the presence of a story boss).
|
|
88
|
+
*
|
|
89
|
+
* Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
90
|
+
* considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
91
|
+
* Rooms will drop random boss collectibles.
|
|
85
92
|
*/
|
|
86
93
|
export declare function isStageWithRandomBossCollectible(stage: LevelStage): boolean;
|
|
87
94
|
/**
|
|
@@ -170,8 +177,15 @@ export declare function onStageType(...stageTypes: StageType[]): boolean;
|
|
|
170
177
|
*/
|
|
171
178
|
export declare function onStageWithNaturalDevilRoom(): boolean;
|
|
172
179
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
180
|
+
* Helper function to check if the current stage is one that will have a random collectible drop
|
|
181
|
+
* upon defeating the boss of the floor.
|
|
182
|
+
*
|
|
183
|
+
* This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
184
|
+
* The Chest, and Home (due to the presence of a story boss).
|
|
185
|
+
*
|
|
186
|
+
* Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
187
|
+
* considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
188
|
+
* Rooms will drop random boss collectibles.
|
|
175
189
|
*/
|
|
176
190
|
export declare function onStageWithRandomBossCollectible(): boolean;
|
|
177
191
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAS9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,CAAC,EAAE,UAAU,EAClB,SAAS,CAAC,EAAE,SAAS,GACpB,MAAM,CAaR;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,iCAAiC,UAAQ,GACxC,MAAM,CAOR;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAa7E;AAED,iDAAiD;AACjD,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,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tC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C;AAED,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxD;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAI1D;AAED,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAIzD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAI/D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAGrD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAK1D;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAKzD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAM1D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,OAAO,CAMtD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAMpD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
|
|
@@ -28,6 +28,13 @@ local inRange = ____utils.inRange
|
|
|
28
28
|
function ____exports.isRepentanceStage(self, stageType)
|
|
29
29
|
return stageType == StageType.REPENTANCE or stageType == StageType.REPENTANCE_B
|
|
30
30
|
end
|
|
31
|
+
--- Helper function to check if the provided stage is one with a story boss. Specifically, this is
|
|
32
|
+
-- Depths 2 (Mom), Womb 2 (Mom's Heart / It Lives), Blue Womb (Hush), Sheol (Satan), Cathedral
|
|
33
|
+
-- (Isaac), Dark Room (Lamb), The Chest (Blue Baby), The Void (Delirium), and Home (Dogma / The
|
|
34
|
+
-- Beast).
|
|
35
|
+
function ____exports.isStageWithStoryBoss(self, stage)
|
|
36
|
+
return stage == LevelStage.DEPTHS_2 or stage >= LevelStage.WOMB_2
|
|
37
|
+
end
|
|
31
38
|
--- Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
|
|
32
39
|
-- `StageType.REPENTANCE_B`.
|
|
33
40
|
function ____exports.onRepentanceStage(self)
|
|
@@ -174,10 +181,17 @@ end
|
|
|
174
181
|
function ____exports.isStageWithNaturalDevilRoom(self, effectiveStage)
|
|
175
182
|
return inRange(nil, effectiveStage, LevelStage.BASEMENT_2, LevelStage.WOMB_2) and effectiveStage ~= LevelStage.BLUE_WOMB
|
|
176
183
|
end
|
|
177
|
-
---
|
|
178
|
-
--
|
|
184
|
+
--- Helper function to check if the provided stage is one that will have a random collectible drop
|
|
185
|
+
-- upon defeating the boss of the floor.
|
|
186
|
+
--
|
|
187
|
+
-- This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
188
|
+
-- The Chest, and Home (due to the presence of a story boss).
|
|
189
|
+
--
|
|
190
|
+
-- Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
191
|
+
-- considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
192
|
+
-- Rooms will drop random boss collectibles.
|
|
179
193
|
function ____exports.isStageWithRandomBossCollectible(self, stage)
|
|
180
|
-
return
|
|
194
|
+
return not ____exports.isStageWithStoryBoss(nil, stage) or stage == LevelStage.THE_VOID
|
|
181
195
|
end
|
|
182
196
|
--- Helper function to check if the provided stage will spawn a locked door to Downpour/Dross after
|
|
183
197
|
-- defeating the boss.
|
|
@@ -202,13 +216,6 @@ function ____exports.isStageWithShovelTrapdoors(self, stage, stageType)
|
|
|
202
216
|
local repentanceStage = ____exports.isRepentanceStage(nil, stageType)
|
|
203
217
|
return stage < LevelStage.WOMB_2 or stage == LevelStage.WOMB_2 and not repentanceStage
|
|
204
218
|
end
|
|
205
|
-
--- Helper function to check if the provided stage is one with a story boss. Specifically, this is
|
|
206
|
-
-- Depths 2 (Mom), Womb 2 (Mom's Heart / It Lives), Blue Womb (Hush), Sheol (Satan), Cathedral
|
|
207
|
-
-- (Isaac), Dark Room (Lamb), The Chest (Blue Baby), The Void (Delirium), and Home (Dogma / The
|
|
208
|
-
-- Beast).
|
|
209
|
-
function ____exports.isStageWithStoryBoss(self, stage)
|
|
210
|
-
return stage == LevelStage.DEPTHS_2 or stage >= LevelStage.WOMB_2
|
|
211
|
-
end
|
|
212
219
|
--- Helper function to check if the player has taken Dad's Note. This sets the game state flag of
|
|
213
220
|
-- `GameStateFlag.BACKWARDS_PATH` and causes floor generation to change.
|
|
214
221
|
function ____exports.onAscent(self)
|
|
@@ -304,8 +311,15 @@ function ____exports.onStageWithNaturalDevilRoom(self)
|
|
|
304
311
|
local effectiveStage = ____exports.getEffectiveStage(nil)
|
|
305
312
|
return ____exports.isStageWithNaturalDevilRoom(nil, effectiveStage)
|
|
306
313
|
end
|
|
307
|
-
---
|
|
308
|
-
--
|
|
314
|
+
--- Helper function to check if the current stage is one that will have a random collectible drop
|
|
315
|
+
-- upon defeating the boss of the floor.
|
|
316
|
+
--
|
|
317
|
+
-- This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
318
|
+
-- The Chest, and Home (due to the presence of a story boss).
|
|
319
|
+
--
|
|
320
|
+
-- Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
321
|
+
-- considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
322
|
+
-- Rooms will drop random boss collectibles.
|
|
309
323
|
function ____exports.onStageWithRandomBossCollectible(self)
|
|
310
324
|
local level = game:GetLevel()
|
|
311
325
|
local stage = level:GetStage()
|
package/package.json
CHANGED
package/src/functions/stage.ts
CHANGED
|
@@ -233,11 +233,18 @@ export function isStageWithNaturalDevilRoom(
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
236
|
+
* Helper function to check if the provided stage is one that will have a random collectible drop
|
|
237
|
+
* upon defeating the boss of the floor.
|
|
238
|
+
*
|
|
239
|
+
* This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
240
|
+
* The Chest, and Home (due to the presence of a story boss).
|
|
241
|
+
*
|
|
242
|
+
* Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
243
|
+
* considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
244
|
+
* Rooms will drop random boss collectibles.
|
|
238
245
|
*/
|
|
239
246
|
export function isStageWithRandomBossCollectible(stage: LevelStage): boolean {
|
|
240
|
-
return stage
|
|
247
|
+
return !isStageWithStoryBoss(stage) || stage === LevelStage.THE_VOID;
|
|
241
248
|
}
|
|
242
249
|
|
|
243
250
|
/**
|
|
@@ -453,8 +460,15 @@ export function onStageWithNaturalDevilRoom(): boolean {
|
|
|
453
460
|
}
|
|
454
461
|
|
|
455
462
|
/**
|
|
456
|
-
*
|
|
457
|
-
*
|
|
463
|
+
* Helper function to check if the current stage is one that will have a random collectible drop
|
|
464
|
+
* upon defeating the boss of the floor.
|
|
465
|
+
*
|
|
466
|
+
* This happens on most stages but will not happen on Depths 2, Womb 2, Sheol, Cathedral, Dark Room,
|
|
467
|
+
* The Chest, and Home (due to the presence of a story boss).
|
|
468
|
+
*
|
|
469
|
+
* Note that even though Delirium does not drop a random boss collectible, The Void is still
|
|
470
|
+
* considered to be a stage that has a random boss collectible since all of the non-Delirium Boss
|
|
471
|
+
* Rooms will drop random boss collectibles.
|
|
458
472
|
*/
|
|
459
473
|
export function onStageWithRandomBossCollectible(): boolean {
|
|
460
474
|
const level = game.GetLevel();
|