isaacscript-common 51.1.1 → 51.2.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 +5 -0
- package/dist/isaacscript-common.lua +212 -41
- package/dist/src/classes/features/other/ExtraConsoleCommands.d.ts.map +1 -1
- package/dist/src/classes/features/other/ExtraConsoleCommands.lua +6 -2
- package/dist/src/functions/bosses.d.ts +3 -0
- package/dist/src/functions/bosses.d.ts.map +1 -1
- package/dist/src/functions/bosses.lua +56 -33
- package/dist/src/objects/bossIDToEntityTypeVariant.d.ts +105 -0
- package/dist/src/objects/bossIDToEntityTypeVariant.d.ts.map +1 -0
- package/dist/src/objects/bossIDToEntityTypeVariant.lua +141 -0
- package/dist/src/sets/bossSets.d.ts.map +1 -1
- package/dist/src/sets/bossSets.lua +7 -5
- package/package.json +1 -1
- package/src/classes/features/other/ExtraConsoleCommands.ts +5 -2
- package/src/functions/bosses.ts +64 -33
- package/src/objects/bossIDToEntityTypeVariant.ts +359 -0
- package/src/sets/bossSets.ts +75 -48
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4727,6 +4727,7 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
|
|
|
4727
4727
|
* - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
4728
4728
|
* - the second phase of multi-phase bosses (e.g. Mega Satan 2, Ultra Famine, Ultra Pestilence,
|
|
4729
4729
|
* Ultra War, Ultra Death)
|
|
4730
|
+
* - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
4730
4731
|
*
|
|
4731
4732
|
* Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
4732
4733
|
*
|
|
@@ -4904,6 +4905,8 @@ export declare function getBooleansFromTable(luaMap: LuaMap<string, unknown>, ob
|
|
|
4904
4905
|
*/
|
|
4905
4906
|
export declare function getBosses(entityType?: EntityType, variant?: int, subType?: int, ignoreFriendly?: boolean): EntityNPC[];
|
|
4906
4907
|
|
|
4908
|
+
export declare function getBossIDFromEntityTypeVariant(entityType: EntityType, variant: int): BossID | undefined;
|
|
4909
|
+
|
|
4907
4910
|
/**
|
|
4908
4911
|
* Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
4909
4912
|
* versus screen for the particular boss.
|
|
@@ -5449,6 +5452,8 @@ export declare function getEntityIDFromConstituents(entityType: EntityType, vari
|
|
|
5449
5452
|
*/
|
|
5450
5453
|
export declare function getEntityPositions(entities?: Entity[]): Map<PtrHash, Vector>;
|
|
5451
5454
|
|
|
5455
|
+
export declare function getEntityTypeVariantFromBossID(bossID: BossID): readonly [EntityType, int];
|
|
5456
|
+
|
|
5452
5457
|
/**
|
|
5453
5458
|
* Helper function to get a map containing the velocities of every entity in the current room.
|
|
5454
5459
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 51.
|
|
3
|
+
isaacscript-common 51.2.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -43811,6 +43811,149 @@ function ____exports.getRandomBossRoomFromPool(self, roomsMetadata, bossPool, se
|
|
|
43811
43811
|
)
|
|
43812
43812
|
return ____exports.getRandomCustomStageRoom(nil, roomsMetadataForBoss, seedOrRNG, verbose)
|
|
43813
43813
|
end
|
|
43814
|
+
return ____exports
|
|
43815
|
+
end,
|
|
43816
|
+
["src.objects.bossIDToEntityTypeVariant"] = function(...)
|
|
43817
|
+
local ____exports = {}
|
|
43818
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
43819
|
+
local BeastVariant = ____isaac_2Dtypescript_2Ddefinitions.BeastVariant
|
|
43820
|
+
local BigHornVariant = ____isaac_2Dtypescript_2Ddefinitions.BigHornVariant
|
|
43821
|
+
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
43822
|
+
local ChubVariant = ____isaac_2Dtypescript_2Ddefinitions.ChubVariant
|
|
43823
|
+
local DaddyLongLegsVariant = ____isaac_2Dtypescript_2Ddefinitions.DaddyLongLegsVariant
|
|
43824
|
+
local DingleVariant = ____isaac_2Dtypescript_2Ddefinitions.DingleVariant
|
|
43825
|
+
local DogmaVariant = ____isaac_2Dtypescript_2Ddefinitions.DogmaVariant
|
|
43826
|
+
local DukeOfFliesVariant = ____isaac_2Dtypescript_2Ddefinitions.DukeOfFliesVariant
|
|
43827
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
43828
|
+
local FallenVariant = ____isaac_2Dtypescript_2Ddefinitions.FallenVariant
|
|
43829
|
+
local FistulaVariant = ____isaac_2Dtypescript_2Ddefinitions.FistulaVariant
|
|
43830
|
+
local GeminiVariant = ____isaac_2Dtypescript_2Ddefinitions.GeminiVariant
|
|
43831
|
+
local GurglingVariant = ____isaac_2Dtypescript_2Ddefinitions.GurglingVariant
|
|
43832
|
+
local HauntVariant = ____isaac_2Dtypescript_2Ddefinitions.HauntVariant
|
|
43833
|
+
local IsaacVariant = ____isaac_2Dtypescript_2Ddefinitions.IsaacVariant
|
|
43834
|
+
local LambVariant = ____isaac_2Dtypescript_2Ddefinitions.LambVariant
|
|
43835
|
+
local LarryJrVariant = ____isaac_2Dtypescript_2Ddefinitions.LarryJrVariant
|
|
43836
|
+
local LittleHornVariant = ____isaac_2Dtypescript_2Ddefinitions.LittleHornVariant
|
|
43837
|
+
local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
|
|
43838
|
+
local MamaGurdyVariant = ____isaac_2Dtypescript_2Ddefinitions.MamaGurdyVariant
|
|
43839
|
+
local MegaSatanVariant = ____isaac_2Dtypescript_2Ddefinitions.MegaSatanVariant
|
|
43840
|
+
local MomVariant = ____isaac_2Dtypescript_2Ddefinitions.MomVariant
|
|
43841
|
+
local MomsHeartVariant = ____isaac_2Dtypescript_2Ddefinitions.MomsHeartVariant
|
|
43842
|
+
local Monstro2Variant = ____isaac_2Dtypescript_2Ddefinitions.Monstro2Variant
|
|
43843
|
+
local MotherVariant = ____isaac_2Dtypescript_2Ddefinitions.MotherVariant
|
|
43844
|
+
local PeepVariant = ____isaac_2Dtypescript_2Ddefinitions.PeepVariant
|
|
43845
|
+
local PinVariant = ____isaac_2Dtypescript_2Ddefinitions.PinVariant
|
|
43846
|
+
local PolycephalusVariant = ____isaac_2Dtypescript_2Ddefinitions.PolycephalusVariant
|
|
43847
|
+
local RagManVariant = ____isaac_2Dtypescript_2Ddefinitions.RagManVariant
|
|
43848
|
+
local RagMegaVariant = ____isaac_2Dtypescript_2Ddefinitions.RagMegaVariant
|
|
43849
|
+
local RaglichVariant = ____isaac_2Dtypescript_2Ddefinitions.RaglichVariant
|
|
43850
|
+
local SatanVariant = ____isaac_2Dtypescript_2Ddefinitions.SatanVariant
|
|
43851
|
+
local UltraGreedVariant = ____isaac_2Dtypescript_2Ddefinitions.UltraGreedVariant
|
|
43852
|
+
local WarVariant = ____isaac_2Dtypescript_2Ddefinitions.WarVariant
|
|
43853
|
+
local WidowVariant = ____isaac_2Dtypescript_2Ddefinitions.WidowVariant
|
|
43854
|
+
____exports.BOSS_ID_TO_ENTITY_TYPE_VARIANT = {
|
|
43855
|
+
[BossID.MONSTRO] = {EntityType.MONSTRO, 0},
|
|
43856
|
+
[BossID.LARRY_JR] = {EntityType.LARRY_JR, LarryJrVariant.LARRY_JR},
|
|
43857
|
+
[BossID.CHUB] = {EntityType.CHUB, ChubVariant.CHUB},
|
|
43858
|
+
[BossID.GURDY] = {EntityType.GURDY, 0},
|
|
43859
|
+
[BossID.MONSTRO_2] = {EntityType.MONSTRO_2, Monstro2Variant.MONSTRO_2},
|
|
43860
|
+
[BossID.MOM] = {EntityType.MOM, MomVariant.MOM},
|
|
43861
|
+
[BossID.SCOLEX] = {EntityType.PIN, PinVariant.SCOLEX},
|
|
43862
|
+
[BossID.MOMS_HEART] = {EntityType.MOMS_HEART, MomsHeartVariant.MOMS_HEART},
|
|
43863
|
+
[BossID.FAMINE] = {EntityType.FAMINE, 0},
|
|
43864
|
+
[BossID.PESTILENCE] = {EntityType.PESTILENCE, 0},
|
|
43865
|
+
[BossID.WAR] = {EntityType.WAR, WarVariant.WAR},
|
|
43866
|
+
[BossID.DEATH] = {EntityType.DEATH, 0},
|
|
43867
|
+
[BossID.DUKE_OF_FLIES] = {EntityType.DUKE_OF_FLIES, DukeOfFliesVariant.DUKE_OF_FLIES},
|
|
43868
|
+
[BossID.PEEP] = {EntityType.PEEP, PeepVariant.PEEP},
|
|
43869
|
+
[BossID.LOKI] = {EntityType.LOKI, LokiVariant.LOKI},
|
|
43870
|
+
[BossID.BLASTOCYST] = {EntityType.BLASTOCYST_BIG, 0},
|
|
43871
|
+
[BossID.GEMINI] = {EntityType.GEMINI, GeminiVariant.GEMINI},
|
|
43872
|
+
[BossID.FISTULA] = {EntityType.FISTULA_BIG, FistulaVariant.FISTULA},
|
|
43873
|
+
[BossID.GISH] = {EntityType.MONSTRO_2, Monstro2Variant.GISH},
|
|
43874
|
+
[BossID.STEVEN] = {EntityType.GEMINI, GeminiVariant.STEVEN},
|
|
43875
|
+
[BossID.CHAD] = {EntityType.CHUB, ChubVariant.CHAD},
|
|
43876
|
+
[BossID.HEADLESS_HORSEMAN] = {EntityType.HEADLESS_HORSEMAN, 0},
|
|
43877
|
+
[BossID.FALLEN] = {EntityType.FALLEN, FallenVariant.FALLEN},
|
|
43878
|
+
[BossID.SATAN] = {EntityType.SATAN, SatanVariant.SATAN},
|
|
43879
|
+
[BossID.IT_LIVES] = {EntityType.MOMS_HEART, MomsHeartVariant.IT_LIVES},
|
|
43880
|
+
[BossID.HOLLOW] = {EntityType.LARRY_JR, LarryJrVariant.HOLLOW},
|
|
43881
|
+
[BossID.CARRION_QUEEN] = {EntityType.CHUB, ChubVariant.CARRION_QUEEN},
|
|
43882
|
+
[BossID.GURDY_JR] = {EntityType.GURDY_JR, 0},
|
|
43883
|
+
[BossID.HUSK] = {EntityType.DUKE_OF_FLIES, DukeOfFliesVariant.HUSK},
|
|
43884
|
+
[BossID.BLOAT] = {EntityType.PEEP, PeepVariant.BLOAT},
|
|
43885
|
+
[BossID.LOKII] = {EntityType.LOKI, LokiVariant.LOKII},
|
|
43886
|
+
[BossID.BLIGHTED_OVUM] = {EntityType.GEMINI, GeminiVariant.BLIGHTED_OVUM},
|
|
43887
|
+
[BossID.TERATOMA] = {EntityType.FISTULA_BIG, FistulaVariant.TERATOMA},
|
|
43888
|
+
[BossID.WIDOW] = {EntityType.WIDOW, WidowVariant.WIDOW},
|
|
43889
|
+
[BossID.MASK_OF_INFAMY] = {EntityType.MASK_OF_INFAMY, 0},
|
|
43890
|
+
[BossID.WRETCHED] = {EntityType.WIDOW, WidowVariant.WRETCHED},
|
|
43891
|
+
[BossID.PIN] = {EntityType.PIN, PinVariant.PIN},
|
|
43892
|
+
[BossID.CONQUEST] = {EntityType.WAR, WarVariant.CONQUEST},
|
|
43893
|
+
[BossID.ISAAC] = {EntityType.ISAAC, IsaacVariant.ISAAC},
|
|
43894
|
+
[BossID.BLUE_BABY] = {EntityType.ISAAC, IsaacVariant.BLUE_BABY},
|
|
43895
|
+
[BossID.DADDY_LONG_LEGS] = {EntityType.DADDY_LONG_LEGS, DaddyLongLegsVariant.DADDY_LONG_LEGS},
|
|
43896
|
+
[BossID.TRIACHNID] = {EntityType.DADDY_LONG_LEGS, DaddyLongLegsVariant.TRIACHNID},
|
|
43897
|
+
[BossID.HAUNT] = {EntityType.HAUNT, HauntVariant.HAUNT},
|
|
43898
|
+
[BossID.DINGLE] = {EntityType.DINGLE, DingleVariant.DINGLE},
|
|
43899
|
+
[BossID.MEGA_MAW] = {EntityType.MEGA_MAW, 0},
|
|
43900
|
+
[BossID.GATE] = {EntityType.GATE, 0},
|
|
43901
|
+
[BossID.MEGA_FATTY] = {EntityType.MEGA_FATTY, 0},
|
|
43902
|
+
[BossID.CAGE] = {EntityType.CAGE, 0},
|
|
43903
|
+
[BossID.MAMA_GURDY] = {EntityType.MAMA_GURDY, MamaGurdyVariant.MAMA_GURDY},
|
|
43904
|
+
[BossID.DARK_ONE] = {EntityType.DARK_ONE, 0},
|
|
43905
|
+
[BossID.ADVERSARY] = {EntityType.ADVERSARY, 0},
|
|
43906
|
+
[BossID.POLYCEPHALUS] = {EntityType.POLYCEPHALUS, PolycephalusVariant.POLYCEPHALUS},
|
|
43907
|
+
[BossID.MR_FRED] = {EntityType.MR_FRED, 0},
|
|
43908
|
+
[BossID.LAMB] = {EntityType.LAMB, LambVariant.LAMB},
|
|
43909
|
+
[BossID.MEGA_SATAN] = {EntityType.MEGA_SATAN, MegaSatanVariant.MEGA_SATAN},
|
|
43910
|
+
[BossID.GURGLING] = {EntityType.GURGLING, GurglingVariant.GURGLING_BOSS},
|
|
43911
|
+
[BossID.STAIN] = {EntityType.STAIN, 0},
|
|
43912
|
+
[BossID.BROWNIE] = {EntityType.BROWNIE, 0},
|
|
43913
|
+
[BossID.FORSAKEN] = {EntityType.FORSAKEN, 0},
|
|
43914
|
+
[BossID.LITTLE_HORN] = {EntityType.LITTLE_HORN, LittleHornVariant.LITTLE_HORN},
|
|
43915
|
+
[BossID.RAG_MAN] = {EntityType.RAG_MAN, RagManVariant.RAG_MAN},
|
|
43916
|
+
[BossID.ULTRA_GREED] = {EntityType.ULTRA_GREED, UltraGreedVariant.ULTRA_GREED},
|
|
43917
|
+
[BossID.HUSH] = {EntityType.HUSH, 0},
|
|
43918
|
+
[BossID.DANGLE] = {EntityType.DINGLE, DingleVariant.DANGLE},
|
|
43919
|
+
[BossID.TURDLING] = {EntityType.GURGLING, GurglingVariant.TURDLING},
|
|
43920
|
+
[BossID.FRAIL] = {EntityType.PIN, PinVariant.FRAIL},
|
|
43921
|
+
[BossID.RAG_MEGA] = {EntityType.RAG_MEGA, RagMegaVariant.RAG_MEGA},
|
|
43922
|
+
[BossID.SISTERS_VIS] = {EntityType.SISTERS_VIS, 0},
|
|
43923
|
+
[BossID.BIG_HORN] = {EntityType.BIG_HORN, BigHornVariant.BIG_HORN},
|
|
43924
|
+
[BossID.DELIRIUM] = {EntityType.DELIRIUM, 0},
|
|
43925
|
+
[BossID.MATRIARCH] = {EntityType.MATRIARCH, 0},
|
|
43926
|
+
[BossID.PILE] = {EntityType.POLYCEPHALUS, PolycephalusVariant.PILE},
|
|
43927
|
+
[BossID.REAP_CREEP] = {EntityType.REAP_CREEP, 0},
|
|
43928
|
+
[BossID.LIL_BLUB] = {EntityType.LIL_BLUB, 0},
|
|
43929
|
+
[BossID.WORMWOOD] = {EntityType.PIN, PinVariant.WORMWOOD},
|
|
43930
|
+
[BossID.RAINMAKER] = {EntityType.RAINMAKER, 0},
|
|
43931
|
+
[BossID.VISAGE] = {EntityType.VISAGE, 0},
|
|
43932
|
+
[BossID.SIREN] = {EntityType.SIREN, 0},
|
|
43933
|
+
[BossID.TUFF_TWINS] = {EntityType.LARRY_JR, LarryJrVariant.TUFF_TWIN},
|
|
43934
|
+
[BossID.HERETIC] = {EntityType.HERETIC, 0},
|
|
43935
|
+
[BossID.HORNFEL] = {EntityType.HORNFEL, 0},
|
|
43936
|
+
[BossID.GREAT_GIDEON] = {EntityType.GREAT_GIDEON, 0},
|
|
43937
|
+
[BossID.BABY_PLUM] = {EntityType.BABY_PLUM, 0},
|
|
43938
|
+
[BossID.SCOURGE] = {EntityType.SCOURGE, 0},
|
|
43939
|
+
[BossID.CHIMERA] = {EntityType.CHIMERA, 0},
|
|
43940
|
+
[BossID.ROTGUT] = {EntityType.ROTGUT, 0},
|
|
43941
|
+
[BossID.MOTHER] = {EntityType.MOTHER, MotherVariant.MOTHER_1},
|
|
43942
|
+
[BossID.MAUSOLEUM_MOM] = {EntityType.MOM, MomVariant.MOM},
|
|
43943
|
+
[BossID.MAUSOLEUM_MOMS_HEART] = {EntityType.MOMS_HEART, MomsHeartVariant.MOMS_HEART},
|
|
43944
|
+
[BossID.MIN_MIN] = {EntityType.MIN_MIN, 0},
|
|
43945
|
+
[BossID.CLOG] = {EntityType.CLOG, 0},
|
|
43946
|
+
[BossID.SINGE] = {EntityType.SINGE, 0},
|
|
43947
|
+
[BossID.BUMBINO] = {EntityType.BUMBINO, 0},
|
|
43948
|
+
[BossID.COLOSTOMIA] = {EntityType.COLOSTOMIA, 0},
|
|
43949
|
+
[BossID.SHELL] = {EntityType.LARRY_JR, LarryJrVariant.SHELL},
|
|
43950
|
+
[BossID.TURDLET] = {EntityType.TURDLET, 0},
|
|
43951
|
+
[BossID.RAGLICH] = {EntityType.RAGLICH, RaglichVariant.RAGLICH},
|
|
43952
|
+
[BossID.DOGMA] = {EntityType.DOGMA, DogmaVariant.DOGMA_PHASE_1},
|
|
43953
|
+
[BossID.BEAST] = {EntityType.BEAST, BeastVariant.BEAST},
|
|
43954
|
+
[BossID.HORNY_BOYS] = {EntityType.HORNY_BOYS, 0},
|
|
43955
|
+
[BossID.CLUTCH] = {EntityType.CLUTCH, 0}
|
|
43956
|
+
}
|
|
43814
43957
|
return ____exports
|
|
43815
43958
|
end,
|
|
43816
43959
|
["src.sets.bossSets"] = function(...)
|
|
@@ -43851,9 +43994,9 @@ local BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
43851
43994
|
local CELLAR_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
43852
43995
|
BossID.FAMINE,
|
|
43853
43996
|
BossID.DUKE_OF_FLIES,
|
|
43854
|
-
BossID.GEMINI,
|
|
43855
43997
|
BossID.HEADLESS_HORSEMAN,
|
|
43856
43998
|
BossID.FALLEN,
|
|
43999
|
+
BossID.BLIGHTED_OVUM,
|
|
43857
44000
|
BossID.WIDOW,
|
|
43858
44001
|
BossID.PIN,
|
|
43859
44002
|
BossID.HAUNT,
|
|
@@ -43909,10 +44052,10 @@ local CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
43909
44052
|
BossID.FISTULA,
|
|
43910
44053
|
BossID.CHAD,
|
|
43911
44054
|
BossID.HEADLESS_HORSEMAN,
|
|
43912
|
-
BossID.FALLEN,
|
|
43913
44055
|
BossID.GURDY_JR,
|
|
43914
|
-
BossID.MEGA_MAW,
|
|
43915
44056
|
BossID.MEGA_FATTY,
|
|
44057
|
+
BossID.MEGA_MAW,
|
|
44058
|
+
BossID.FALLEN,
|
|
43916
44059
|
BossID.STAIN,
|
|
43917
44060
|
BossID.RAG_MEGA,
|
|
43918
44061
|
BossID.BIG_HORN,
|
|
@@ -44155,11 +44298,13 @@ local STORY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
|
44155
44298
|
BossID.HUSH,
|
|
44156
44299
|
BossID.DELIRIUM,
|
|
44157
44300
|
BossID.MOTHER,
|
|
44301
|
+
BossID.MAUSOLEUM_MOM,
|
|
44302
|
+
BossID.MAUSOLEUM_MOMS_HEART,
|
|
44158
44303
|
BossID.DOGMA,
|
|
44159
44304
|
BossID.BEAST
|
|
44160
44305
|
})
|
|
44161
|
-
if STORY_BOSS_IDS_SET.size + 1 ~= STORY_BOSSES_SET.size then
|
|
44162
|
-
error("The
|
|
44306
|
+
if STORY_BOSS_IDS_SET.size + 1 - 2 ~= STORY_BOSSES_SET.size then
|
|
44307
|
+
error("The \"STORY_BOSS_IDS_SET\" and the \"STORY_BOSSES_SET\" do not match.")
|
|
44163
44308
|
end
|
|
44164
44309
|
____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = (function()
|
|
44165
44310
|
local allBossesSet = copySet(nil, ____exports.ALL_BOSSES_SET)
|
|
@@ -44306,14 +44451,17 @@ return ____exports
|
|
|
44306
44451
|
["src.functions.bosses"] = function(...)
|
|
44307
44452
|
local ____lualib = require("lualib_bundle")
|
|
44308
44453
|
local __TS__New = ____lualib.__TS__New
|
|
44454
|
+
local Map = ____lualib.Map
|
|
44455
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
44309
44456
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
44310
44457
|
local ____exports = {}
|
|
44311
|
-
local getNumBossSegments, DEFAULT_BOSS_MULTI_SEGMENTS
|
|
44312
44458
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
44313
44459
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
44314
44460
|
local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
|
|
44315
44461
|
local ____constants = require("src.core.constants")
|
|
44316
44462
|
local VectorZero = ____constants.VectorZero
|
|
44463
|
+
local ____bossIDToEntityTypeVariant = require("src.objects.bossIDToEntityTypeVariant")
|
|
44464
|
+
local BOSS_ID_TO_ENTITY_TYPE_VARIANT = ____bossIDToEntityTypeVariant.BOSS_ID_TO_ENTITY_TYPE_VARIANT
|
|
44317
44465
|
local ____bossSets = require("src.sets.bossSets")
|
|
44318
44466
|
local ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = ____bossSets.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
|
|
44319
44467
|
local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
|
|
@@ -44334,37 +44482,6 @@ local ____types = require("src.functions.types")
|
|
|
44334
44482
|
local asNumber = ____types.asNumber
|
|
44335
44483
|
local ____utils = require("src.functions.utils")
|
|
44336
44484
|
local ____repeat = ____utils["repeat"]
|
|
44337
|
-
function getNumBossSegments(self, entityType, variant, numSegments)
|
|
44338
|
-
if numSegments ~= nil then
|
|
44339
|
-
return numSegments
|
|
44340
|
-
end
|
|
44341
|
-
repeat
|
|
44342
|
-
local ____switch16 = entityType
|
|
44343
|
-
local ____cond16 = ____switch16 == EntityType.CHUB
|
|
44344
|
-
if ____cond16 then
|
|
44345
|
-
do
|
|
44346
|
-
return 3
|
|
44347
|
-
end
|
|
44348
|
-
end
|
|
44349
|
-
____cond16 = ____cond16 or ____switch16 == EntityType.LOKI
|
|
44350
|
-
if ____cond16 then
|
|
44351
|
-
do
|
|
44352
|
-
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
44353
|
-
end
|
|
44354
|
-
end
|
|
44355
|
-
____cond16 = ____cond16 or ____switch16 == EntityType.GURGLING
|
|
44356
|
-
if ____cond16 then
|
|
44357
|
-
do
|
|
44358
|
-
return 2
|
|
44359
|
-
end
|
|
44360
|
-
end
|
|
44361
|
-
do
|
|
44362
|
-
do
|
|
44363
|
-
return DEFAULT_BOSS_MULTI_SEGMENTS
|
|
44364
|
-
end
|
|
44365
|
-
end
|
|
44366
|
-
until true
|
|
44367
|
-
end
|
|
44368
44485
|
local BOSSES_THAT_REQUIRE_MULTIPLE_SPAWNS = __TS__New(ReadonlySet, {
|
|
44369
44486
|
EntityType.LARRY_JR,
|
|
44370
44487
|
EntityType.CHUB,
|
|
@@ -44372,7 +44489,19 @@ local BOSSES_THAT_REQUIRE_MULTIPLE_SPAWNS = __TS__New(ReadonlySet, {
|
|
|
44372
44489
|
EntityType.GURGLING,
|
|
44373
44490
|
EntityType.TURDLET
|
|
44374
44491
|
})
|
|
44375
|
-
DEFAULT_BOSS_MULTI_SEGMENTS = 4
|
|
44492
|
+
local DEFAULT_BOSS_MULTI_SEGMENTS = 4
|
|
44493
|
+
local ENTITY_TYPE_VARIANT_TO_BOSS_ID = (function()
|
|
44494
|
+
local entityTypeVariantToBossID = __TS__New(Map)
|
|
44495
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(BOSS_ID_TO_ENTITY_TYPE_VARIANT)) do
|
|
44496
|
+
local bossIDRaw = ____value[1]
|
|
44497
|
+
local entityTypeVariant = ____value[2]
|
|
44498
|
+
local bossID = bossIDRaw
|
|
44499
|
+
local entityType, variant = table.unpack(entityTypeVariant)
|
|
44500
|
+
local entityTypeVariantString = (tostring(entityType) .. ".") .. tostring(variant)
|
|
44501
|
+
entityTypeVariantToBossID:set(entityTypeVariantString, bossID)
|
|
44502
|
+
end
|
|
44503
|
+
return entityTypeVariantToBossID
|
|
44504
|
+
end)(nil)
|
|
44376
44505
|
function ____exports.getAliveBosses(self, entityType, variant, subType, ignoreFriendly)
|
|
44377
44506
|
if entityType == nil then
|
|
44378
44507
|
entityType = -1
|
|
@@ -44404,6 +44533,10 @@ function ____exports.getAllBossesSet(self, includeStoryBosses)
|
|
|
44404
44533
|
end
|
|
44405
44534
|
return includeStoryBosses and ALL_BOSSES_SET or ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
|
|
44406
44535
|
end
|
|
44536
|
+
function ____exports.getBossIDFromEntityTypeVariant(self, entityType, variant)
|
|
44537
|
+
local entityTypeVariant = (tostring(entityType) .. ".") .. tostring(variant)
|
|
44538
|
+
return ENTITY_TYPE_VARIANT_TO_BOSS_ID:get(entityTypeVariant)
|
|
44539
|
+
end
|
|
44407
44540
|
function ____exports.getBossSet(self, stage, stageType)
|
|
44408
44541
|
local stageTypeMap = STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP:get(stage)
|
|
44409
44542
|
if stageTypeMap == nil then
|
|
@@ -44430,9 +44563,43 @@ end
|
|
|
44430
44563
|
function ____exports.getCombinedBossSet(self, stage)
|
|
44431
44564
|
return STAGE_TO_COMBINED_BOSS_SET_MAP:get(stage)
|
|
44432
44565
|
end
|
|
44566
|
+
function ____exports.getEntityTypeVariantFromBossID(self, bossID)
|
|
44567
|
+
return BOSS_ID_TO_ENTITY_TYPE_VARIANT[bossID]
|
|
44568
|
+
end
|
|
44433
44569
|
function ____exports.isSin(self, npc)
|
|
44434
44570
|
return SIN_ENTITY_TYPES_SET:has(npc.Type)
|
|
44435
44571
|
end
|
|
44572
|
+
local function getNumBossSegments(self, entityType, variant, numSegments)
|
|
44573
|
+
if numSegments ~= nil then
|
|
44574
|
+
return numSegments
|
|
44575
|
+
end
|
|
44576
|
+
repeat
|
|
44577
|
+
local ____switch18 = entityType
|
|
44578
|
+
local ____cond18 = ____switch18 == EntityType.CHUB
|
|
44579
|
+
if ____cond18 then
|
|
44580
|
+
do
|
|
44581
|
+
return 3
|
|
44582
|
+
end
|
|
44583
|
+
end
|
|
44584
|
+
____cond18 = ____cond18 or ____switch18 == EntityType.LOKI
|
|
44585
|
+
if ____cond18 then
|
|
44586
|
+
do
|
|
44587
|
+
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
44588
|
+
end
|
|
44589
|
+
end
|
|
44590
|
+
____cond18 = ____cond18 or ____switch18 == EntityType.GURGLING
|
|
44591
|
+
if ____cond18 then
|
|
44592
|
+
do
|
|
44593
|
+
return 2
|
|
44594
|
+
end
|
|
44595
|
+
end
|
|
44596
|
+
do
|
|
44597
|
+
do
|
|
44598
|
+
return DEFAULT_BOSS_MULTI_SEGMENTS
|
|
44599
|
+
end
|
|
44600
|
+
end
|
|
44601
|
+
until true
|
|
44602
|
+
end
|
|
44436
44603
|
function ____exports.spawnBoss(self, entityType, variant, subType, positionOrGridIndex, velocity, spawner, seedOrRNG, numSegments)
|
|
44437
44604
|
if velocity == nil then
|
|
44438
44605
|
velocity = VectorZero
|
|
@@ -50929,6 +51096,8 @@ local isVanillaConsoleCommand = ____console.isVanillaConsoleCommand
|
|
|
50929
51096
|
local ____flag = require("src.functions.flag")
|
|
50930
51097
|
local addFlag = ____flag.addFlag
|
|
50931
51098
|
local bitFlags = ____flag.bitFlags
|
|
51099
|
+
local ____logMisc = require("src.functions.logMisc")
|
|
51100
|
+
local logError = ____logMisc.logError
|
|
50932
51101
|
local ____string = require("src.functions.string")
|
|
50933
51102
|
local getMapPartialMatch = ____string.getMapPartialMatch
|
|
50934
51103
|
local ____utils = require("src.functions.utils")
|
|
@@ -51058,10 +51227,12 @@ function ExtraConsoleCommands.prototype.addConsoleCommand(self, commandName, com
|
|
|
51058
51227
|
return
|
|
51059
51228
|
end
|
|
51060
51229
|
if isVanillaConsoleCommand(nil, commandName) then
|
|
51061
|
-
|
|
51230
|
+
logError(("Failed to add a new console command of \"" .. commandName) .. "\" because that name already belongs to a vanilla command. You must pick a non-colliding name.")
|
|
51231
|
+
return
|
|
51062
51232
|
end
|
|
51063
51233
|
if self.commandFunctionMap:has(commandName) then
|
|
51064
|
-
|
|
51234
|
+
logError(("Failed to add a new console command of \"" .. commandName) .. "\" because there is already an existing custom command by that name. If you want to overwrite a command from the standard library, you can use the \"removeExtraConsoleCommand\" function.")
|
|
51235
|
+
return
|
|
51065
51236
|
end
|
|
51066
51237
|
self.commandFunctionMap:set(commandName, commandFunction)
|
|
51067
51238
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtraConsoleCommands.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ExtraConsoleCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtraConsoleCommands.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ExtraConsoleCommands.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAShD;;;;;;;;;;GAUG;AACH,qBAAa,oBAAqB,SAAQ,OAAO;IAI/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;IAExC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAG/B;IAoEJ,OAAO,CAAC,QAAQ,CAAC,UAAU,CAKzB;IAIF,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAIlC;IAIF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAIrC;IAIF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAIjC;IAIF,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAIlC;IAGF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAkD5B;IAGF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAWzB;IAGF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAI3B;IAGF,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAYlC;IAEF;;;;;;;;;;;;OAYG;IAEI,iBAAiB,CACtB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GACxC,IAAI;IA8BP;;;;;;;;;;OAUG;IAEI,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAqBtD;;;;;;;;;OASG;IAEI,wBAAwB,IAAI,IAAI;CAGxC"}
|
|
@@ -21,6 +21,8 @@ local isVanillaConsoleCommand = ____console.isVanillaConsoleCommand
|
|
|
21
21
|
local ____flag = require("src.functions.flag")
|
|
22
22
|
local addFlag = ____flag.addFlag
|
|
23
23
|
local bitFlags = ____flag.bitFlags
|
|
24
|
+
local ____logMisc = require("src.functions.logMisc")
|
|
25
|
+
local logError = ____logMisc.logError
|
|
24
26
|
local ____string = require("src.functions.string")
|
|
25
27
|
local getMapPartialMatch = ____string.getMapPartialMatch
|
|
26
28
|
local ____utils = require("src.functions.utils")
|
|
@@ -159,10 +161,12 @@ function ExtraConsoleCommands.prototype.addConsoleCommand(self, commandName, com
|
|
|
159
161
|
return
|
|
160
162
|
end
|
|
161
163
|
if isVanillaConsoleCommand(nil, commandName) then
|
|
162
|
-
|
|
164
|
+
logError(("Failed to add a new console command of \"" .. commandName) .. "\" because that name already belongs to a vanilla command. You must pick a non-colliding name.")
|
|
165
|
+
return
|
|
163
166
|
end
|
|
164
167
|
if self.commandFunctionMap:has(commandName) then
|
|
165
|
-
|
|
168
|
+
logError(("Failed to add a new console command of \"" .. commandName) .. "\" because there is already an existing custom command by that name. If you want to overwrite a command from the standard library, you can use the \"removeExtraConsoleCommand\" function.")
|
|
169
|
+
return
|
|
166
170
|
end
|
|
167
171
|
self.commandFunctionMap:set(commandName, commandFunction)
|
|
168
172
|
end
|
|
@@ -23,6 +23,7 @@ export declare function getAliveBosses(entityType?: EntityType | -1, variant?: n
|
|
|
23
23
|
* - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
24
24
|
* - the second phase of multi-phase bosses (e.g. Mega Satan 2, Ultra Famine, Ultra Pestilence,
|
|
25
25
|
* Ultra War, Ultra Death)
|
|
26
|
+
* - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
26
27
|
*
|
|
27
28
|
* Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
28
29
|
*
|
|
@@ -30,6 +31,7 @@ export declare function getAliveBosses(entityType?: EntityType | -1, variant?: n
|
|
|
30
31
|
* Default is true.
|
|
31
32
|
*/
|
|
32
33
|
export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<BossID>;
|
|
34
|
+
export declare function getBossIDFromEntityTypeVariant(entityType: EntityType, variant: int): BossID | undefined;
|
|
33
35
|
/**
|
|
34
36
|
* Helper function to get the set of vanilla bosses for a particular stage and stage type
|
|
35
37
|
* combination.
|
|
@@ -57,6 +59,7 @@ export declare function getBosses(entityType?: EntityType, variant?: int, subTyp
|
|
|
57
59
|
* Also see the `getAllBossesSet` and `getBossSet` functions.
|
|
58
60
|
*/
|
|
59
61
|
export declare function getCombinedBossSet(stage: LevelStage): ReadonlySet<BossID> | undefined;
|
|
62
|
+
export declare function getEntityTypeVariantFromBossID(bossID: BossID): readonly [EntityType, int];
|
|
60
63
|
/** Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust. */
|
|
61
64
|
export declare function isSin(npc: EntityNPC): boolean;
|
|
62
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAC;AA0CvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,UAAU,GAAE,UAAU,GAAG,CAAC,CAAM,EAChC,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,kBAAkB,UAAO,GACxB,WAAW,CAAC,MAAM,CAAC,CAIrB;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,GACX,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAOjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CACvB,UAAU,CAAC,EAAE,UAAU,EACvB,OAAO,CAAC,EAAE,GAAG,EACb,OAAO,CAAC,EAAE,GAAG,EACb,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,GAChB,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAEjC;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,GACb,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC,CAE5B;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"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local Map = ____lualib.Map
|
|
4
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
3
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
4
6
|
local ____exports = {}
|
|
5
|
-
local getNumBossSegments, DEFAULT_BOSS_MULTI_SEGMENTS
|
|
6
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
8
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
8
9
|
local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
|
|
9
10
|
local ____constants = require("src.core.constants")
|
|
10
11
|
local VectorZero = ____constants.VectorZero
|
|
12
|
+
local ____bossIDToEntityTypeVariant = require("src.objects.bossIDToEntityTypeVariant")
|
|
13
|
+
local BOSS_ID_TO_ENTITY_TYPE_VARIANT = ____bossIDToEntityTypeVariant.BOSS_ID_TO_ENTITY_TYPE_VARIANT
|
|
11
14
|
local ____bossSets = require("src.sets.bossSets")
|
|
12
15
|
local ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = ____bossSets.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
|
|
13
16
|
local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
|
|
@@ -28,37 +31,6 @@ local ____types = require("src.functions.types")
|
|
|
28
31
|
local asNumber = ____types.asNumber
|
|
29
32
|
local ____utils = require("src.functions.utils")
|
|
30
33
|
local ____repeat = ____utils["repeat"]
|
|
31
|
-
function getNumBossSegments(self, entityType, variant, numSegments)
|
|
32
|
-
if numSegments ~= nil then
|
|
33
|
-
return numSegments
|
|
34
|
-
end
|
|
35
|
-
repeat
|
|
36
|
-
local ____switch16 = entityType
|
|
37
|
-
local ____cond16 = ____switch16 == EntityType.CHUB
|
|
38
|
-
if ____cond16 then
|
|
39
|
-
do
|
|
40
|
-
return 3
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
____cond16 = ____cond16 or ____switch16 == EntityType.LOKI
|
|
44
|
-
if ____cond16 then
|
|
45
|
-
do
|
|
46
|
-
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
____cond16 = ____cond16 or ____switch16 == EntityType.GURGLING
|
|
50
|
-
if ____cond16 then
|
|
51
|
-
do
|
|
52
|
-
return 2
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
do
|
|
56
|
-
do
|
|
57
|
-
return DEFAULT_BOSS_MULTI_SEGMENTS
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
until true
|
|
61
|
-
end
|
|
62
34
|
local BOSSES_THAT_REQUIRE_MULTIPLE_SPAWNS = __TS__New(ReadonlySet, {
|
|
63
35
|
EntityType.LARRY_JR,
|
|
64
36
|
EntityType.CHUB,
|
|
@@ -66,7 +38,19 @@ local BOSSES_THAT_REQUIRE_MULTIPLE_SPAWNS = __TS__New(ReadonlySet, {
|
|
|
66
38
|
EntityType.GURGLING,
|
|
67
39
|
EntityType.TURDLET
|
|
68
40
|
})
|
|
69
|
-
DEFAULT_BOSS_MULTI_SEGMENTS = 4
|
|
41
|
+
local DEFAULT_BOSS_MULTI_SEGMENTS = 4
|
|
42
|
+
local ENTITY_TYPE_VARIANT_TO_BOSS_ID = (function()
|
|
43
|
+
local entityTypeVariantToBossID = __TS__New(Map)
|
|
44
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(BOSS_ID_TO_ENTITY_TYPE_VARIANT)) do
|
|
45
|
+
local bossIDRaw = ____value[1]
|
|
46
|
+
local entityTypeVariant = ____value[2]
|
|
47
|
+
local bossID = bossIDRaw
|
|
48
|
+
local entityType, variant = table.unpack(entityTypeVariant)
|
|
49
|
+
local entityTypeVariantString = (tostring(entityType) .. ".") .. tostring(variant)
|
|
50
|
+
entityTypeVariantToBossID:set(entityTypeVariantString, bossID)
|
|
51
|
+
end
|
|
52
|
+
return entityTypeVariantToBossID
|
|
53
|
+
end)(nil)
|
|
70
54
|
--- Helper function to get all of the non-dead bosses in the room.
|
|
71
55
|
--
|
|
72
56
|
-- This function will not include bosses on an internal blacklist, such as Death's scythes or Big
|
|
@@ -111,6 +95,7 @@ end
|
|
|
111
95
|
-- - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
|
|
112
96
|
-- - the second phase of multi-phase bosses (e.g. Mega Satan 2, Ultra Famine, Ultra Pestilence,
|
|
113
97
|
-- Ultra War, Ultra Death)
|
|
98
|
+
-- - bosses that do not have any Boss Rooms defined due to being unfinished (e.g. Raglich)
|
|
114
99
|
--
|
|
115
100
|
-- Also see the `getBossSet` and `getCombinedBossSet` functions.
|
|
116
101
|
--
|
|
@@ -122,6 +107,10 @@ function ____exports.getAllBossesSet(self, includeStoryBosses)
|
|
|
122
107
|
end
|
|
123
108
|
return includeStoryBosses and ALL_BOSSES_SET or ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
|
|
124
109
|
end
|
|
110
|
+
function ____exports.getBossIDFromEntityTypeVariant(self, entityType, variant)
|
|
111
|
+
local entityTypeVariant = (tostring(entityType) .. ".") .. tostring(variant)
|
|
112
|
+
return ENTITY_TYPE_VARIANT_TO_BOSS_ID:get(entityTypeVariant)
|
|
113
|
+
end
|
|
125
114
|
--- Helper function to get the set of vanilla bosses for a particular stage and stage type
|
|
126
115
|
-- combination.
|
|
127
116
|
--
|
|
@@ -166,10 +155,44 @@ end
|
|
|
166
155
|
function ____exports.getCombinedBossSet(self, stage)
|
|
167
156
|
return STAGE_TO_COMBINED_BOSS_SET_MAP:get(stage)
|
|
168
157
|
end
|
|
158
|
+
function ____exports.getEntityTypeVariantFromBossID(self, bossID)
|
|
159
|
+
return BOSS_ID_TO_ENTITY_TYPE_VARIANT[bossID]
|
|
160
|
+
end
|
|
169
161
|
--- Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust.
|
|
170
162
|
function ____exports.isSin(self, npc)
|
|
171
163
|
return SIN_ENTITY_TYPES_SET:has(npc.Type)
|
|
172
164
|
end
|
|
165
|
+
local function getNumBossSegments(self, entityType, variant, numSegments)
|
|
166
|
+
if numSegments ~= nil then
|
|
167
|
+
return numSegments
|
|
168
|
+
end
|
|
169
|
+
repeat
|
|
170
|
+
local ____switch18 = entityType
|
|
171
|
+
local ____cond18 = ____switch18 == EntityType.CHUB
|
|
172
|
+
if ____cond18 then
|
|
173
|
+
do
|
|
174
|
+
return 3
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
____cond18 = ____cond18 or ____switch18 == EntityType.LOKI
|
|
178
|
+
if ____cond18 then
|
|
179
|
+
do
|
|
180
|
+
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
____cond18 = ____cond18 or ____switch18 == EntityType.GURGLING
|
|
184
|
+
if ____cond18 then
|
|
185
|
+
do
|
|
186
|
+
return 2
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
do
|
|
190
|
+
do
|
|
191
|
+
return DEFAULT_BOSS_MULTI_SEGMENTS
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
until true
|
|
195
|
+
end
|
|
173
196
|
--- Helper function to spawn a boss.
|
|
174
197
|
--
|
|
175
198
|
-- Use this function instead of `spawnNPC` since it handles automatically spawning multiple segments
|