isaacscript-common 28.3.0 → 28.4.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/index.rollup.d.ts
CHANGED
|
@@ -12803,6 +12803,12 @@ export declare function onStageType(...stageTypes: StageType[]): boolean;
|
|
|
12803
12803
|
*/
|
|
12804
12804
|
export declare function onStageWithNaturalDevilRoom(): boolean;
|
|
12805
12805
|
|
|
12806
|
+
/**
|
|
12807
|
+
* After defeating the boss on most stages, a random collectible will spawn from the Boss Room pool.
|
|
12808
|
+
* However, this does not happen on Depths 2, Womb 2, and beyond.
|
|
12809
|
+
*/
|
|
12810
|
+
export declare function onStageWithRandomBossCollectible(): boolean;
|
|
12811
|
+
|
|
12806
12812
|
/**
|
|
12807
12813
|
* Helper function to check if the current stage will spawn a locked door to Downpour/Dross after
|
|
12808
12814
|
* defeating the boss.
|
|
@@ -12821,6 +12827,12 @@ export declare function onStageWithSecretExitToMausoleum(): boolean;
|
|
|
12821
12827
|
*/
|
|
12822
12828
|
export declare function onStageWithSecretExitToMines(): boolean;
|
|
12823
12829
|
|
|
12830
|
+
/**
|
|
12831
|
+
* Helper function to check if the current stage is one that would create a trapdoor if We Need to
|
|
12832
|
+
* Go Deeper was used.
|
|
12833
|
+
*/
|
|
12834
|
+
export declare function onStageWithShovelWorking(): boolean;
|
|
12835
|
+
|
|
12824
12836
|
/**
|
|
12825
12837
|
* For the purposes of this function, doors to Secret Rooms or Super Secret Rooms that have not been
|
|
12826
12838
|
* discovered yet will not be opened.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 28.
|
|
3
|
+
isaacscript-common 28.4.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -26984,6 +26984,11 @@ function ____exports.onStageWithNaturalDevilRoom(self)
|
|
|
26984
26984
|
local effectiveStage = ____exports.getEffectiveStage(nil)
|
|
26985
26985
|
return inRange(nil, effectiveStage, LevelStage.BASEMENT_2, LevelStage.WOMB_2) and effectiveStage ~= LevelStage.BLUE_WOMB
|
|
26986
26986
|
end
|
|
26987
|
+
function ____exports.onStageWithRandomBossCollectible(self)
|
|
26988
|
+
local level = game:GetLevel()
|
|
26989
|
+
local stage = level:GetStage()
|
|
26990
|
+
return stage ~= LevelStage.DEPTHS_2 and stage < LevelStage.WOMB_2
|
|
26991
|
+
end
|
|
26987
26992
|
function ____exports.onStageWithSecretExitToDownpour(self)
|
|
26988
26993
|
local level = game:GetLevel()
|
|
26989
26994
|
local stage = level:GetStage()
|
|
@@ -27001,6 +27006,11 @@ function ____exports.onStageWithSecretExitToMines(self)
|
|
|
27001
27006
|
local repentanceStage = ____exports.onRepentanceStage(nil)
|
|
27002
27007
|
return stage == LevelStage.CAVES_1 and not repentanceStage or stage == LevelStage.BASEMENT_2 and repentanceStage
|
|
27003
27008
|
end
|
|
27009
|
+
function ____exports.onStageWithShovelWorking(self)
|
|
27010
|
+
local level = game:GetLevel()
|
|
27011
|
+
local stage = level:GetStage()
|
|
27012
|
+
return stage < LevelStage.WOMB_2 or stage == LevelStage.WOMB_2 and not ____exports.onRepentanceStage(nil)
|
|
27013
|
+
end
|
|
27004
27014
|
function ____exports.setStage(self, stage, stageType, reseed)
|
|
27005
27015
|
if reseed == nil then
|
|
27006
27016
|
reseed = false
|
|
@@ -114,6 +114,11 @@ export declare function onStageType(...stageTypes: StageType[]): boolean;
|
|
|
114
114
|
* Devil Room or Angel Room after killing the boss.
|
|
115
115
|
*/
|
|
116
116
|
export declare function onStageWithNaturalDevilRoom(): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* After defeating the boss on most stages, a random collectible will spawn from the Boss Room pool.
|
|
119
|
+
* However, this does not happen on Depths 2, Womb 2, and beyond.
|
|
120
|
+
*/
|
|
121
|
+
export declare function onStageWithRandomBossCollectible(): boolean;
|
|
117
122
|
/**
|
|
118
123
|
* Helper function to check if the current stage will spawn a locked door to Downpour/Dross after
|
|
119
124
|
* defeating the boss.
|
|
@@ -129,6 +134,11 @@ export declare function onStageWithSecretExitToMausoleum(): boolean;
|
|
|
129
134
|
* defeating the boss.
|
|
130
135
|
*/
|
|
131
136
|
export declare function onStageWithSecretExitToMines(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Helper function to check if the current stage is one that would create a trapdoor if We Need to
|
|
139
|
+
* Go Deeper was used.
|
|
140
|
+
*/
|
|
141
|
+
export declare function onStageWithShovelWorking(): boolean;
|
|
132
142
|
/**
|
|
133
143
|
* Helper function to warp to a new stage/level.
|
|
134
144
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,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,iD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,UAAU,IAAI,OAAO,CAQpC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,eAAe,EAAE,UAAU,EAAE,GAAG,OAAO,CAK1E;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;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;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAI/D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAMrD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAK1D;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAKzD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAS1D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,OAAO,CAStD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAQlD;AAED;;;;;;;;GAQG;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"}
|
|
@@ -247,6 +247,13 @@ function ____exports.onStageWithNaturalDevilRoom(self)
|
|
|
247
247
|
local effectiveStage = ____exports.getEffectiveStage(nil)
|
|
248
248
|
return inRange(nil, effectiveStage, LevelStage.BASEMENT_2, LevelStage.WOMB_2) and effectiveStage ~= LevelStage.BLUE_WOMB
|
|
249
249
|
end
|
|
250
|
+
--- After defeating the boss on most stages, a random collectible will spawn from the Boss Room pool.
|
|
251
|
+
-- However, this does not happen on Depths 2, Womb 2, and beyond.
|
|
252
|
+
function ____exports.onStageWithRandomBossCollectible(self)
|
|
253
|
+
local level = game:GetLevel()
|
|
254
|
+
local stage = level:GetStage()
|
|
255
|
+
return stage ~= LevelStage.DEPTHS_2 and stage < LevelStage.WOMB_2
|
|
256
|
+
end
|
|
250
257
|
--- Helper function to check if the current stage will spawn a locked door to Downpour/Dross after
|
|
251
258
|
-- defeating the boss.
|
|
252
259
|
function ____exports.onStageWithSecretExitToDownpour(self)
|
|
@@ -270,6 +277,13 @@ function ____exports.onStageWithSecretExitToMines(self)
|
|
|
270
277
|
local repentanceStage = ____exports.onRepentanceStage(nil)
|
|
271
278
|
return stage == LevelStage.CAVES_1 and not repentanceStage or stage == LevelStage.BASEMENT_2 and repentanceStage
|
|
272
279
|
end
|
|
280
|
+
--- Helper function to check if the current stage is one that would create a trapdoor if We Need to
|
|
281
|
+
-- Go Deeper was used.
|
|
282
|
+
function ____exports.onStageWithShovelWorking(self)
|
|
283
|
+
local level = game:GetLevel()
|
|
284
|
+
local stage = level:GetStage()
|
|
285
|
+
return stage < LevelStage.WOMB_2 or stage == LevelStage.WOMB_2 and not ____exports.onRepentanceStage(nil)
|
|
286
|
+
end
|
|
273
287
|
--- Helper function to warp to a new stage/level.
|
|
274
288
|
--
|
|
275
289
|
-- @param stage The stage number to warp to.
|
package/package.json
CHANGED
package/src/functions/stage.ts
CHANGED
|
@@ -339,6 +339,17 @@ export function onStageWithNaturalDevilRoom(): boolean {
|
|
|
339
339
|
);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
/**
|
|
343
|
+
* After defeating the boss on most stages, a random collectible will spawn from the Boss Room pool.
|
|
344
|
+
* However, this does not happen on Depths 2, Womb 2, and beyond.
|
|
345
|
+
*/
|
|
346
|
+
export function onStageWithRandomBossCollectible(): boolean {
|
|
347
|
+
const level = game.GetLevel();
|
|
348
|
+
const stage = level.GetStage();
|
|
349
|
+
|
|
350
|
+
return stage !== LevelStage.DEPTHS_2 && stage < LevelStage.WOMB_2;
|
|
351
|
+
}
|
|
352
|
+
|
|
342
353
|
/**
|
|
343
354
|
* Helper function to check if the current stage will spawn a locked door to Downpour/Dross after
|
|
344
355
|
* defeating the boss.
|
|
@@ -380,6 +391,20 @@ export function onStageWithSecretExitToMines(): boolean {
|
|
|
380
391
|
);
|
|
381
392
|
}
|
|
382
393
|
|
|
394
|
+
/**
|
|
395
|
+
* Helper function to check if the current stage is one that would create a trapdoor if We Need to
|
|
396
|
+
* Go Deeper was used.
|
|
397
|
+
*/
|
|
398
|
+
export function onStageWithShovelWorking(): boolean {
|
|
399
|
+
const level = game.GetLevel();
|
|
400
|
+
const stage = level.GetStage();
|
|
401
|
+
|
|
402
|
+
return (
|
|
403
|
+
stage < LevelStage.WOMB_2 ||
|
|
404
|
+
(stage === LevelStage.WOMB_2 && !onRepentanceStage())
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
383
408
|
/**
|
|
384
409
|
* Helper function to warp to a new stage/level.
|
|
385
410
|
*
|