isaacscript-common 51.5.2 → 51.6.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 +9 -0
- package/dist/isaacscript-common.lua +48 -8
- package/dist/src/functions/bosses.d.ts +8 -0
- package/dist/src/functions/bosses.d.ts.map +1 -1
- package/dist/src/functions/bosses.lua +17 -7
- package/dist/src/sets/repentanceBossIDsSet.d.ts +3 -0
- package/dist/src/sets/repentanceBossIDsSet.d.ts.map +1 -0
- package/dist/src/sets/repentanceBossIDsSet.lua +33 -0
- package/package.json +1 -1
- package/src/functions/bosses.ts +12 -0
- package/src/sets/repentanceBossIDsSet.ts +28 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -9291,6 +9291,15 @@ export declare function isReflectionRender(): boolean;
|
|
|
9291
9291
|
*/
|
|
9292
9292
|
export declare function isRepentance(): boolean;
|
|
9293
9293
|
|
|
9294
|
+
/**
|
|
9295
|
+
* Helper function to check if a boss is only found on a Repentance floor such as Dross, Mines, and
|
|
9296
|
+
* so on.
|
|
9297
|
+
*
|
|
9298
|
+
* For example, The Pile is a boss that was added in Repentance, but since it can appear in
|
|
9299
|
+
* Necropolis, it is not considered a Repentance boss for the purposes of this function.
|
|
9300
|
+
*/
|
|
9301
|
+
export declare function isRepentanceBoss(bossID: BossID): boolean;
|
|
9302
|
+
|
|
9294
9303
|
/**
|
|
9295
9304
|
* Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
|
|
9296
9305
|
* you to the Repentance floor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 51.
|
|
3
|
+
isaacscript-common 51.6.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -44380,6 +44380,41 @@ ____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = __TS__New(
|
|
|
44380
44380
|
function(____, bossID) return not STORY_BOSS_IDS_SET:has(bossID) end
|
|
44381
44381
|
)
|
|
44382
44382
|
)
|
|
44383
|
+
return ____exports
|
|
44384
|
+
end,
|
|
44385
|
+
["src.sets.repentanceBossIDsSet"] = function(...)
|
|
44386
|
+
local ____lualib = require("lualib_bundle")
|
|
44387
|
+
local __TS__New = ____lualib.__TS__New
|
|
44388
|
+
local ____exports = {}
|
|
44389
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
44390
|
+
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
44391
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
44392
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
44393
|
+
____exports.REPENTANCE_ONLY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
44394
|
+
BossID.LIL_BLUB,
|
|
44395
|
+
BossID.WORMWOOD,
|
|
44396
|
+
BossID.RAINMAKER,
|
|
44397
|
+
BossID.VISAGE,
|
|
44398
|
+
BossID.SIREN,
|
|
44399
|
+
BossID.TUFF_TWINS,
|
|
44400
|
+
BossID.HERETIC,
|
|
44401
|
+
BossID.HORNFEL,
|
|
44402
|
+
BossID.GREAT_GIDEON,
|
|
44403
|
+
BossID.SCOURGE,
|
|
44404
|
+
BossID.CHIMERA,
|
|
44405
|
+
BossID.ROTGUT,
|
|
44406
|
+
BossID.MOTHER,
|
|
44407
|
+
BossID.MAUSOLEUM_MOM,
|
|
44408
|
+
BossID.MAUSOLEUM_MOMS_HEART,
|
|
44409
|
+
BossID.MIN_MIN,
|
|
44410
|
+
BossID.CLOG,
|
|
44411
|
+
BossID.SINGE,
|
|
44412
|
+
BossID.COLOSTOMIA,
|
|
44413
|
+
BossID.SHELL,
|
|
44414
|
+
BossID.TURDLET,
|
|
44415
|
+
BossID.HORNY_BOYS,
|
|
44416
|
+
BossID.CLUTCH
|
|
44417
|
+
})
|
|
44383
44418
|
return ____exports
|
|
44384
44419
|
end,
|
|
44385
44420
|
["src.sets.sinEntityTypesSet"] = function(...)
|
|
@@ -44536,6 +44571,8 @@ local ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = ____bossSets.ALL_BOSSES_EXCLUDING_
|
|
|
44536
44571
|
local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
|
|
44537
44572
|
local STAGE_TO_COMBINED_BOSS_SET_MAP = ____bossSets.STAGE_TO_COMBINED_BOSS_SET_MAP
|
|
44538
44573
|
local STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = ____bossSets.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP
|
|
44574
|
+
local ____repentanceBossIDsSet = require("src.sets.repentanceBossIDsSet")
|
|
44575
|
+
local REPENTANCE_ONLY_BOSS_IDS_SET = ____repentanceBossIDsSet.REPENTANCE_ONLY_BOSS_IDS_SET
|
|
44539
44576
|
local ____sinEntityTypesSet = require("src.sets.sinEntityTypesSet")
|
|
44540
44577
|
local SIN_ENTITY_TYPES_SET = ____sinEntityTypesSet.SIN_ENTITY_TYPES_SET
|
|
44541
44578
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
@@ -44623,6 +44660,9 @@ end
|
|
|
44623
44660
|
function ____exports.getEntityTypeVariantFromBossID(self, bossID)
|
|
44624
44661
|
return BOSS_ID_TO_ENTITY_TYPE_VARIANT[bossID]
|
|
44625
44662
|
end
|
|
44663
|
+
function ____exports.isRepentanceBoss(self, bossID)
|
|
44664
|
+
return REPENTANCE_ONLY_BOSS_IDS_SET:has(bossID)
|
|
44665
|
+
end
|
|
44626
44666
|
function ____exports.isSin(self, npc)
|
|
44627
44667
|
return SIN_ENTITY_TYPES_SET:has(npc.Type)
|
|
44628
44668
|
end
|
|
@@ -44631,21 +44671,21 @@ local function getNumBossSegments(self, entityType, variant, numSegments)
|
|
|
44631
44671
|
return numSegments
|
|
44632
44672
|
end
|
|
44633
44673
|
repeat
|
|
44634
|
-
local
|
|
44635
|
-
local
|
|
44636
|
-
if
|
|
44674
|
+
local ____switch16 = entityType
|
|
44675
|
+
local ____cond16 = ____switch16 == EntityType.CHUB
|
|
44676
|
+
if ____cond16 then
|
|
44637
44677
|
do
|
|
44638
44678
|
return 3
|
|
44639
44679
|
end
|
|
44640
44680
|
end
|
|
44641
|
-
|
|
44642
|
-
if
|
|
44681
|
+
____cond16 = ____cond16 or ____switch16 == EntityType.LOKI
|
|
44682
|
+
if ____cond16 then
|
|
44643
44683
|
do
|
|
44644
44684
|
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
44645
44685
|
end
|
|
44646
44686
|
end
|
|
44647
|
-
|
|
44648
|
-
if
|
|
44687
|
+
____cond16 = ____cond16 or ____switch16 == EntityType.GURGLING
|
|
44688
|
+
if ____cond16 then
|
|
44649
44689
|
do
|
|
44650
44690
|
return 2
|
|
44651
44691
|
end
|
|
@@ -64,6 +64,14 @@ export declare function getBosses(entityType?: EntityType, variant?: int, subTyp
|
|
|
64
64
|
*/
|
|
65
65
|
export declare function getCombinedBossSet(stage: LevelStage): ReadonlySet<BossID> | undefined;
|
|
66
66
|
export declare function getEntityTypeVariantFromBossID(bossID: BossID): readonly [EntityType, int];
|
|
67
|
+
/**
|
|
68
|
+
* Helper function to check if a boss is only found on a Repentance floor such as Dross, Mines, and
|
|
69
|
+
* so on.
|
|
70
|
+
*
|
|
71
|
+
* For example, The Pile is a boss that was added in Repentance, but since it can appear in
|
|
72
|
+
* Necropolis, it is not considered a Repentance boss for the purposes of this function.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isRepentanceBoss(bossID: BossID): boolean;
|
|
67
75
|
/** Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust. */
|
|
68
76
|
export declare function isSin(npc: EntityNPC): boolean;
|
|
69
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"A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ED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,6FAA6F;AAC7F,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAE7C;AAmCD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,MAAM,GAAG,GAAG,EACjC,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,SAAS,GAAE,IAAI,GAAG,GAAG,GAAG,SAAqB,EAC7C,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAiCX;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,MAAM,GAAG,GAAG,EACjC,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAYX"}
|
|
@@ -16,6 +16,8 @@ local ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = ____bossSets.ALL_BOSSES_EXCLUDING_
|
|
|
16
16
|
local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
|
|
17
17
|
local STAGE_TO_COMBINED_BOSS_SET_MAP = ____bossSets.STAGE_TO_COMBINED_BOSS_SET_MAP
|
|
18
18
|
local STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = ____bossSets.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP
|
|
19
|
+
local ____repentanceBossIDsSet = require("src.sets.repentanceBossIDsSet")
|
|
20
|
+
local REPENTANCE_ONLY_BOSS_IDS_SET = ____repentanceBossIDsSet.REPENTANCE_ONLY_BOSS_IDS_SET
|
|
19
21
|
local ____sinEntityTypesSet = require("src.sets.sinEntityTypesSet")
|
|
20
22
|
local SIN_ENTITY_TYPES_SET = ____sinEntityTypesSet.SIN_ENTITY_TYPES_SET
|
|
21
23
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
@@ -150,6 +152,14 @@ end
|
|
|
150
152
|
function ____exports.getEntityTypeVariantFromBossID(self, bossID)
|
|
151
153
|
return BOSS_ID_TO_ENTITY_TYPE_VARIANT[bossID]
|
|
152
154
|
end
|
|
155
|
+
--- Helper function to check if a boss is only found on a Repentance floor such as Dross, Mines, and
|
|
156
|
+
-- so on.
|
|
157
|
+
--
|
|
158
|
+
-- For example, The Pile is a boss that was added in Repentance, but since it can appear in
|
|
159
|
+
-- Necropolis, it is not considered a Repentance boss for the purposes of this function.
|
|
160
|
+
function ____exports.isRepentanceBoss(self, bossID)
|
|
161
|
+
return REPENTANCE_ONLY_BOSS_IDS_SET:has(bossID)
|
|
162
|
+
end
|
|
153
163
|
--- Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust.
|
|
154
164
|
function ____exports.isSin(self, npc)
|
|
155
165
|
return SIN_ENTITY_TYPES_SET:has(npc.Type)
|
|
@@ -159,21 +169,21 @@ local function getNumBossSegments(self, entityType, variant, numSegments)
|
|
|
159
169
|
return numSegments
|
|
160
170
|
end
|
|
161
171
|
repeat
|
|
162
|
-
local
|
|
163
|
-
local
|
|
164
|
-
if
|
|
172
|
+
local ____switch16 = entityType
|
|
173
|
+
local ____cond16 = ____switch16 == EntityType.CHUB
|
|
174
|
+
if ____cond16 then
|
|
165
175
|
do
|
|
166
176
|
return 3
|
|
167
177
|
end
|
|
168
178
|
end
|
|
169
|
-
|
|
170
|
-
if
|
|
179
|
+
____cond16 = ____cond16 or ____switch16 == EntityType.LOKI
|
|
180
|
+
if ____cond16 then
|
|
171
181
|
do
|
|
172
182
|
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
173
183
|
end
|
|
174
184
|
end
|
|
175
|
-
|
|
176
|
-
if
|
|
185
|
+
____cond16 = ____cond16 or ____switch16 == EntityType.GURGLING
|
|
186
|
+
if ____cond16 then
|
|
177
187
|
do
|
|
178
188
|
return 2
|
|
179
189
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repentanceBossIDsSet.d.ts","sourceRoot":"","sources":["../../../src/sets/repentanceBossIDsSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAGtD,eAAO,MAAM,4BAA4B,qBAwBvC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
+
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
6
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
7
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
8
|
+
____exports.REPENTANCE_ONLY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
9
|
+
BossID.LIL_BLUB,
|
|
10
|
+
BossID.WORMWOOD,
|
|
11
|
+
BossID.RAINMAKER,
|
|
12
|
+
BossID.VISAGE,
|
|
13
|
+
BossID.SIREN,
|
|
14
|
+
BossID.TUFF_TWINS,
|
|
15
|
+
BossID.HERETIC,
|
|
16
|
+
BossID.HORNFEL,
|
|
17
|
+
BossID.GREAT_GIDEON,
|
|
18
|
+
BossID.SCOURGE,
|
|
19
|
+
BossID.CHIMERA,
|
|
20
|
+
BossID.ROTGUT,
|
|
21
|
+
BossID.MOTHER,
|
|
22
|
+
BossID.MAUSOLEUM_MOM,
|
|
23
|
+
BossID.MAUSOLEUM_MOMS_HEART,
|
|
24
|
+
BossID.MIN_MIN,
|
|
25
|
+
BossID.CLOG,
|
|
26
|
+
BossID.SINGE,
|
|
27
|
+
BossID.COLOSTOMIA,
|
|
28
|
+
BossID.SHELL,
|
|
29
|
+
BossID.TURDLET,
|
|
30
|
+
BossID.HORNY_BOYS,
|
|
31
|
+
BossID.CLUTCH
|
|
32
|
+
})
|
|
33
|
+
return ____exports
|
package/package.json
CHANGED
package/src/functions/bosses.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
STAGE_TO_COMBINED_BOSS_SET_MAP,
|
|
14
14
|
STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP,
|
|
15
15
|
} from "../sets/bossSets";
|
|
16
|
+
import { REPENTANCE_ONLY_BOSS_IDS_SET } from "../sets/repentanceBossIDsSet";
|
|
16
17
|
import { SIN_ENTITY_TYPES_SET } from "../sets/sinEntityTypesSet";
|
|
17
18
|
import { ReadonlySet } from "../types/ReadonlySet";
|
|
18
19
|
import { getNPCs, spawnNPC } from "./entitiesSpecific";
|
|
@@ -148,6 +149,17 @@ export function getEntityTypeVariantFromBossID(
|
|
|
148
149
|
return BOSS_ID_TO_ENTITY_TYPE_VARIANT[bossID];
|
|
149
150
|
}
|
|
150
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Helper function to check if a boss is only found on a Repentance floor such as Dross, Mines, and
|
|
154
|
+
* so on.
|
|
155
|
+
*
|
|
156
|
+
* For example, The Pile is a boss that was added in Repentance, but since it can appear in
|
|
157
|
+
* Necropolis, it is not considered a Repentance boss for the purposes of this function.
|
|
158
|
+
*/
|
|
159
|
+
export function isRepentanceBoss(bossID: BossID): boolean {
|
|
160
|
+
return REPENTANCE_ONLY_BOSS_IDS_SET.has(bossID);
|
|
161
|
+
}
|
|
162
|
+
|
|
151
163
|
/** Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust. */
|
|
152
164
|
export function isSin(npc: EntityNPC): boolean {
|
|
153
165
|
return SIN_ENTITY_TYPES_SET.has(npc.Type);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BossID } from "isaac-typescript-definitions";
|
|
2
|
+
import { ReadonlySet } from "../types/ReadonlySet";
|
|
3
|
+
|
|
4
|
+
export const REPENTANCE_ONLY_BOSS_IDS_SET = new ReadonlySet<BossID>([
|
|
5
|
+
BossID.LIL_BLUB, // 75
|
|
6
|
+
BossID.WORMWOOD, // 76
|
|
7
|
+
BossID.RAINMAKER, // 77
|
|
8
|
+
BossID.VISAGE, // 78
|
|
9
|
+
BossID.SIREN, // 79
|
|
10
|
+
BossID.TUFF_TWINS, // 80
|
|
11
|
+
BossID.HERETIC, // 81
|
|
12
|
+
BossID.HORNFEL, // 82
|
|
13
|
+
BossID.GREAT_GIDEON, // 83
|
|
14
|
+
BossID.SCOURGE, // 85
|
|
15
|
+
BossID.CHIMERA, // 86
|
|
16
|
+
BossID.ROTGUT, // 87
|
|
17
|
+
BossID.MOTHER, // 88
|
|
18
|
+
BossID.MAUSOLEUM_MOM, // 89
|
|
19
|
+
BossID.MAUSOLEUM_MOMS_HEART, // 90
|
|
20
|
+
BossID.MIN_MIN, // 91
|
|
21
|
+
BossID.CLOG, // 92
|
|
22
|
+
BossID.SINGE, // 93
|
|
23
|
+
BossID.COLOSTOMIA, // 95
|
|
24
|
+
BossID.SHELL, // 96
|
|
25
|
+
BossID.TURDLET, // 97
|
|
26
|
+
BossID.HORNY_BOYS, // 101
|
|
27
|
+
BossID.CLUTCH, // 102
|
|
28
|
+
]);
|