isaacscript-common 47.4.0 → 47.5.3

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.
@@ -4724,8 +4724,11 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
4724
4724
  *
4725
4725
  * The set contains strings with the entity type and variant, separated by a period.
4726
4726
  *
4727
- * Note that this set does not include bosses that do not appear in Boss Rooms (e.g. Krampus, Uriel,
4728
- * and Gabriel.).
4727
+ * Note that this set does not include:
4728
+ * - mini-bosses (e.g. Ultra Pride, Krampus)
4729
+ * - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
4730
+ * - the second phase of multi-phase bosses (e.g. Mega Satan 2), with the exception of The Beast
4731
+ * (Ultra Famine, Ultra Pestilence, Ultra War, and Ultra Death are included)
4729
4732
  *
4730
4733
  * Also see the `getBossSet` and `getCombinedBossSet` functions.
4731
4734
  *
@@ -14033,9 +14036,9 @@ export declare function onFirstFloor(): boolean;
14033
14036
  export declare function onRepentanceStage(): boolean;
14034
14037
 
14035
14038
  /**
14036
- * Whether the player is playing on a set seed (i.e. that they entered in a specific seed by
14037
- * pressing tab on the character selection screen). When the player resets the game on a set seed,
14038
- * the game will not switch to a different seed.
14039
+ * Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
14040
+ * specific seed by pressing tab on the character selection screen). When the player resets the game
14041
+ * on a set seed, the game will not switch to a different seed.
14039
14042
  *
14040
14043
  * Under the hood, this checks if the current challenge is `Challenge.NULL` and the
14041
14044
  * `Seeds.IsCustomRun` method.
@@ -14115,6 +14118,12 @@ export declare function onStageWithShovelTrapdoors(): boolean;
14115
14118
  */
14116
14119
  export declare function onStageWithStoryBoss(): boolean;
14117
14120
 
14121
+ /**
14122
+ * Helper function to check whether the player is on a Victory Lap (i.e. they answered "yes" to the
14123
+ * popup that happens after defeating The Lamb).
14124
+ */
14125
+ export declare function onVictoryLap(): boolean;
14126
+
14118
14127
  /**
14119
14128
  * For the purposes of this function, doors to Secret Rooms or Super Secret Rooms that have not been
14120
14129
  * discovered yet will not be opened.
@@ -16642,8 +16651,8 @@ export declare function setTrinketSprite(trinket: EntityPickup, pngPath: string
16642
16651
  /**
16643
16652
  * Helper function to change the run status to that of an unseeded run with a new random seed.
16644
16653
  *
16645
- * This is useful to revert the behavior where playing on a set and restarting the game will not
16646
- * take you to a new seed.
16654
+ * This is useful to revert the behavior where playing on a set seed and restarting the game will
16655
+ * not take you to a new seed.
16647
16656
  *
16648
16657
  * Under the hood, this function calls the `Seeds.Reset` method and the
16649
16658
  * `Seeds.Restart(Challenge.NULL)` method.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 47.4.0
3
+ isaacscript-common 47.5.3
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -22554,6 +22554,10 @@ function ____exports.onSetSeed(self)
22554
22554
  local challenge = Isaac.GetChallenge()
22555
22555
  return challenge == Challenge.NULL and customRun
22556
22556
  end
22557
+ function ____exports.onVictoryLap(self)
22558
+ local numVictoryLaps = game:GetVictoryLap()
22559
+ return numVictoryLaps > 0
22560
+ end
22557
22561
  function ____exports.restart(self, character)
22558
22562
  if character == nil then
22559
22563
  local command = "restart"
@@ -43741,14 +43745,11 @@ return ____exports
43741
43745
  ["src.sets.bossSets"] = function(...)
43742
43746
  local ____lualib = require("lualib_bundle")
43743
43747
  local __TS__New = ____lualib.__TS__New
43744
- local __TS__Spread = ____lualib.__TS__Spread
43745
- local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
43746
- local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
43747
- local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
43748
43748
  local Set = ____lualib.Set
43749
+ local __TS__Spread = ____lualib.__TS__Spread
43749
43750
  local ____exports = {}
43750
- local getAllBossesExcludingStoryBossesSet
43751
43751
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
43752
+ local BeastVariant = ____isaac_2Dtypescript_2Ddefinitions.BeastVariant
43752
43753
  local BigHornVariant = ____isaac_2Dtypescript_2Ddefinitions.BigHornVariant
43753
43754
  local ChubVariant = ____isaac_2Dtypescript_2Ddefinitions.ChubVariant
43754
43755
  local DaddyLongLegsVariant = ____isaac_2Dtypescript_2Ddefinitions.DaddyLongLegsVariant
@@ -43781,6 +43782,7 @@ local WidowVariant = ____isaac_2Dtypescript_2Ddefinitions.WidowVariant
43781
43782
  local ____entities = require("src.functions.entities")
43782
43783
  local parseEntityTypeVariantString = ____entities.parseEntityTypeVariantString
43783
43784
  local ____set = require("src.functions.set")
43785
+ local combineSets = ____set.combineSets
43784
43786
  local copySet = ____set.copySet
43785
43787
  local ____utils = require("src.functions.utils")
43786
43788
  local assertDefined = ____utils.assertDefined
@@ -43790,19 +43792,6 @@ local ____ReadonlySet = require("src.types.ReadonlySet")
43790
43792
  local ReadonlySet = ____ReadonlySet.ReadonlySet
43791
43793
  local ____storyBossesSet = require("src.sets.storyBossesSet")
43792
43794
  local STORY_BOSSES_SET = ____storyBossesSet.STORY_BOSSES_SET
43793
- function getAllBossesExcludingStoryBossesSet(self)
43794
- local allBossesExcludingStoryBossesSet = copySet(nil, ____exports.ALL_BOSSES_SET)
43795
- local allBosses = {__TS__Spread(____exports.ALL_BOSSES_SET:values())}
43796
- for ____, entityTypeVariantString in ipairs(allBosses) do
43797
- local tuple = parseEntityTypeVariantString(nil, entityTypeVariantString)
43798
- assertDefined(nil, tuple, "Failed to parse a boss tuple when constructing the story boss set.")
43799
- local entityType, _variant = table.unpack(tuple)
43800
- if STORY_BOSSES_SET:has(entityType) then
43801
- allBossesExcludingStoryBossesSet:delete(entityTypeVariantString)
43802
- end
43803
- end
43804
- return allBossesExcludingStoryBossesSet
43805
- end
43806
43795
  local BASEMENT_BOSSES_SET = __TS__New(
43807
43796
  ReadonlySet,
43808
43797
  {
@@ -43877,27 +43866,13 @@ local DROSS_BOSSES_SET = __TS__New(
43877
43866
  tostring(EntityType.TURDLET) .. ".0"
43878
43867
  }
43879
43868
  )
43880
- local ____ReadonlySet_1 = ReadonlySet
43881
- local ____array_0 = __TS__SparseArrayNew(__TS__Spread(BASEMENT_BOSSES_SET:values()))
43882
- __TS__SparseArrayPush(
43883
- ____array_0,
43884
- __TS__Spread(CELLAR_BOSSES_SET:values())
43885
- )
43886
- __TS__SparseArrayPush(
43887
- ____array_0,
43888
- __TS__Spread(BURNING_BASEMENT_BOSSES_SET:values())
43889
- )
43890
- __TS__SparseArrayPush(
43891
- ____array_0,
43892
- __TS__Spread(DOWNPOUR_BOSSES_SET:values())
43893
- )
43894
- __TS__SparseArrayPush(
43895
- ____array_0,
43896
- __TS__Spread(DROSS_BOSSES_SET:values())
43897
- )
43898
- local ALL_BASEMENT_BOSSES_SET = __TS__New(
43899
- ____ReadonlySet_1,
43900
- {__TS__SparseArraySpread(____array_0)}
43869
+ local ALL_BASEMENT_BOSSES_SET = combineSets(
43870
+ nil,
43871
+ BASEMENT_BOSSES_SET,
43872
+ CELLAR_BOSSES_SET,
43873
+ BURNING_BASEMENT_BOSSES_SET,
43874
+ DOWNPOUR_BOSSES_SET,
43875
+ DROSS_BOSSES_SET
43901
43876
  )
43902
43877
  local BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
43903
43878
  {StageType.ORIGINAL, BASEMENT_BOSSES_SET},
@@ -43988,27 +43963,13 @@ local ASHPIT_BOSSES_SET = __TS__New(
43988
43963
  tostring(EntityType.CLUTCH) .. ".0"
43989
43964
  }
43990
43965
  )
43991
- local ____ReadonlySet_3 = ReadonlySet
43992
- local ____array_2 = __TS__SparseArrayNew(__TS__Spread(CAVES_BOSSES_SET:values()))
43993
- __TS__SparseArrayPush(
43994
- ____array_2,
43995
- __TS__Spread(CATACOMBS_BOSSES_SET:values())
43996
- )
43997
- __TS__SparseArrayPush(
43998
- ____array_2,
43999
- __TS__Spread(FLOODED_CAVES_BOSSES_SET:values())
44000
- )
44001
- __TS__SparseArrayPush(
44002
- ____array_2,
44003
- __TS__Spread(MINES_BOSSES_SET:values())
44004
- )
44005
- __TS__SparseArrayPush(
44006
- ____array_2,
44007
- __TS__Spread(ASHPIT_BOSSES_SET:values())
44008
- )
44009
- local ALL_CAVES_BOSSES_SET = __TS__New(
44010
- ____ReadonlySet_3,
44011
- {__TS__SparseArraySpread(____array_2)}
43966
+ local ALL_CAVES_BOSSES_SET = combineSets(
43967
+ nil,
43968
+ CAVES_BOSSES_SET,
43969
+ CATACOMBS_BOSSES_SET,
43970
+ FLOODED_CAVES_BOSSES_SET,
43971
+ MINES_BOSSES_SET,
43972
+ ASHPIT_BOSSES_SET
44012
43973
  )
44013
43974
  local CAVES_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
44014
43975
  {StageType.ORIGINAL, CAVES_BOSSES_SET},
@@ -44083,27 +44044,13 @@ local GEHENNA_BOSSES_SET = __TS__New(
44083
44044
  tostring(EntityType.HORNY_BOYS) .. ".0"
44084
44045
  }
44085
44046
  )
44086
- local ____ReadonlySet_5 = ReadonlySet
44087
- local ____array_4 = __TS__SparseArrayNew(__TS__Spread(DEPTHS_BOSSES_SET:values()))
44088
- __TS__SparseArrayPush(
44089
- ____array_4,
44090
- __TS__Spread(NECROPOLIS_BOSSES_SET:values())
44091
- )
44092
- __TS__SparseArrayPush(
44093
- ____array_4,
44094
- __TS__Spread(DANK_DEPTHS_BOSSES_SET:values())
44095
- )
44096
- __TS__SparseArrayPush(
44097
- ____array_4,
44098
- __TS__Spread(MAUSOLEUM_BOSSES_SET:values())
44099
- )
44100
- __TS__SparseArrayPush(
44101
- ____array_4,
44102
- __TS__Spread(GEHENNA_BOSSES_SET:values())
44103
- )
44104
- local ALL_DEPTHS_BOSSES_SET = __TS__New(
44105
- ____ReadonlySet_5,
44106
- {__TS__SparseArraySpread(____array_4)}
44047
+ local ALL_DEPTHS_BOSSES_SET = combineSets(
44048
+ nil,
44049
+ DEPTHS_BOSSES_SET,
44050
+ NECROPOLIS_BOSSES_SET,
44051
+ DANK_DEPTHS_BOSSES_SET,
44052
+ MAUSOLEUM_BOSSES_SET,
44053
+ GEHENNA_BOSSES_SET
44107
44054
  )
44108
44055
  local DEPTHS_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
44109
44056
  {StageType.ORIGINAL, DEPTHS_BOSSES_SET},
@@ -44172,27 +44119,13 @@ local CORPSE_BOSSES_SET = __TS__New(
44172
44119
  tostring(EntityType.MOTHER) .. ".0"
44173
44120
  }
44174
44121
  )
44175
- local ____ReadonlySet_7 = ReadonlySet
44176
- local ____array_6 = __TS__SparseArrayNew(__TS__Spread(WOMB_BOSSES_SET:values()))
44177
- __TS__SparseArrayPush(
44178
- ____array_6,
44179
- __TS__Spread(UTERO_BOSSES_SET:values())
44180
- )
44181
- __TS__SparseArrayPush(
44182
- ____array_6,
44183
- __TS__Spread(SCARRED_WOMB_BOSSES_SET:values())
44184
- )
44185
- __TS__SparseArrayPush(
44186
- ____array_6,
44187
- __TS__Spread(MAUSOLEUM_BOSSES_SET:values())
44188
- )
44189
- __TS__SparseArrayPush(
44190
- ____array_6,
44191
- __TS__Spread(GEHENNA_BOSSES_SET:values())
44192
- )
44193
- local ALL_WOMB_BOSSES_SET = __TS__New(
44194
- ____ReadonlySet_7,
44195
- {__TS__SparseArraySpread(____array_6)}
44122
+ local ALL_WOMB_BOSSES_SET = combineSets(
44123
+ nil,
44124
+ WOMB_BOSSES_SET,
44125
+ UTERO_BOSSES_SET,
44126
+ SCARRED_WOMB_BOSSES_SET,
44127
+ MAUSOLEUM_BOSSES_SET,
44128
+ GEHENNA_BOSSES_SET
44196
44129
  )
44197
44130
  local WOMB_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, WOMB_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, UTERO_BOSSES_SET}, {StageType.AFTERBIRTH, SCARRED_WOMB_BOSSES_SET}, {StageType.REPENTANCE, CORPSE_BOSSES_SET}})
44198
44131
  local BLUE_WOMB_BOSSES_SET = __TS__New(
@@ -44208,36 +44141,41 @@ local CATHEDRAL_BOSSES_SET = __TS__New(
44208
44141
  ReadonlySet,
44209
44142
  {(tostring(EntityType.ISAAC) .. ".") .. tostring(IsaacVariant.ISAAC)}
44210
44143
  )
44211
- local ____ReadonlySet_9 = ReadonlySet
44212
- local ____array_8 = __TS__SparseArrayNew(__TS__Spread(SHEOL_BOSSES_SET:values()))
44213
- __TS__SparseArrayPush(
44214
- ____array_8,
44215
- __TS__Spread(CATHEDRAL_BOSSES_SET:values())
44216
- )
44217
- local ALL_STAGE_10_BOSSES_SET = __TS__New(
44218
- ____ReadonlySet_9,
44219
- {__TS__SparseArraySpread(____array_8)}
44220
- )
44144
+ local ALL_STAGE_10_BOSSES_SET = combineSets(nil, SHEOL_BOSSES_SET, CATHEDRAL_BOSSES_SET)
44221
44145
  local STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, SHEOL_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CATHEDRAL_BOSSES_SET}})
44222
44146
  local DARK_ROOM_BOSSES_SET = __TS__New(
44223
44147
  ReadonlySet,
44224
- {(tostring(EntityType.THE_LAMB) .. ".") .. tostring(LambVariant.LAMB)}
44148
+ {
44149
+ (tostring(EntityType.THE_LAMB) .. ".") .. tostring(LambVariant.LAMB),
44150
+ tostring(EntityType.MEGA_SATAN) .. ".0"
44151
+ }
44225
44152
  )
44226
44153
  local CHEST_BOSSES_SET = __TS__New(
44227
44154
  ReadonlySet,
44228
- {(tostring(EntityType.ISAAC) .. ".") .. tostring(IsaacVariant.BLUE_BABY)}
44155
+ {
44156
+ (tostring(EntityType.ISAAC) .. ".") .. tostring(IsaacVariant.BLUE_BABY),
44157
+ tostring(EntityType.MEGA_SATAN) .. ".0"
44158
+ }
44229
44159
  )
44230
- local ____ReadonlySet_11 = ReadonlySet
44231
- local ____array_10 = __TS__SparseArrayNew(__TS__Spread(DARK_ROOM_BOSSES_SET:values()))
44232
- __TS__SparseArrayPush(
44233
- ____array_10,
44234
- __TS__Spread(CHEST_BOSSES_SET:values())
44160
+ local ALL_STAGE_11_BOSSES_SET = combineSets(nil, DARK_ROOM_BOSSES_SET, CHEST_BOSSES_SET)
44161
+ local STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, DARK_ROOM_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CHEST_BOSSES_SET}})
44162
+ local THE_VOID_BOSSES_SET = __TS__New(
44163
+ ReadonlySet,
44164
+ {tostring(EntityType.DELIRIUM) .. ".0"}
44235
44165
  )
44236
- local ALL_STAGE_11_BOSSES_SET = __TS__New(
44237
- ____ReadonlySet_11,
44238
- {__TS__SparseArraySpread(____array_10)}
44166
+ local THE_VOID_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, THE_VOID_BOSSES_SET}})
44167
+ local HOME_BOSSES_SET = __TS__New(
44168
+ ReadonlySet,
44169
+ {
44170
+ tostring(EntityType.DOGMA) .. ".0",
44171
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.BEAST),
44172
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_FAMINE),
44173
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_PESTILENCE),
44174
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_WAR),
44175
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_DEATH)
44176
+ }
44239
44177
  )
44240
- local STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, DARK_ROOM_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CHEST_BOSSES_SET}})
44178
+ local HOME_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, HOME_BOSSES_SET}})
44241
44179
  ____exports.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
44242
44180
  {1, BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP},
44243
44181
  {2, BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP},
@@ -44249,7 +44187,9 @@ ____exports.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
44249
44187
  {8, WOMB_STAGE_TYPE_TO_BOSS_SET_MAP},
44250
44188
  {9, BLUE_WOMB_STAGE_TYPE_TO_BOSS_SET_MAP},
44251
44189
  {10, STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP},
44252
- {11, STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP}
44190
+ {11, STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP},
44191
+ {12, THE_VOID_STAGE_TYPE_TO_BOSS_SET_MAP},
44192
+ {13, HOME_STAGE_TYPE_TO_BOSS_SET_MAP}
44253
44193
  })
44254
44194
  ____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
44255
44195
  {1, ALL_BASEMENT_BOSSES_SET},
@@ -44262,39 +44202,35 @@ ____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
44262
44202
  {8, ALL_WOMB_BOSSES_SET},
44263
44203
  {9, BLUE_WOMB_BOSSES_SET},
44264
44204
  {10, ALL_STAGE_10_BOSSES_SET},
44265
- {11, ALL_STAGE_11_BOSSES_SET}
44205
+ {11, ALL_STAGE_11_BOSSES_SET},
44206
+ {12, THE_VOID_BOSSES_SET},
44207
+ {13, HOME_BOSSES_SET}
44266
44208
  })
44267
- local ____ReadonlySet_13 = ReadonlySet
44268
- local ____array_12 = __TS__SparseArrayNew(__TS__Spread(ALL_BASEMENT_BOSSES_SET:values()))
44269
- __TS__SparseArrayPush(
44270
- ____array_12,
44271
- __TS__Spread(ALL_CAVES_BOSSES_SET:values())
44272
- )
44273
- __TS__SparseArrayPush(
44274
- ____array_12,
44275
- __TS__Spread(ALL_DEPTHS_BOSSES_SET:values())
44276
- )
44277
- __TS__SparseArrayPush(
44278
- ____array_12,
44279
- __TS__Spread(ALL_WOMB_BOSSES_SET:values())
44280
- )
44281
- __TS__SparseArrayPush(
44282
- ____array_12,
44283
- __TS__Spread(BLUE_WOMB_BOSSES_SET:values())
44284
- )
44285
- __TS__SparseArrayPush(
44286
- ____array_12,
44287
- __TS__Spread(ALL_STAGE_10_BOSSES_SET:values())
44288
- )
44289
- __TS__SparseArrayPush(
44290
- ____array_12,
44291
- __TS__Spread(ALL_STAGE_11_BOSSES_SET:values())
44292
- )
44293
- ____exports.ALL_BOSSES_SET = __TS__New(
44294
- ____ReadonlySet_13,
44295
- {__TS__SparseArraySpread(____array_12)}
44209
+ ____exports.ALL_BOSSES_SET = combineSets(
44210
+ nil,
44211
+ ALL_BASEMENT_BOSSES_SET,
44212
+ ALL_CAVES_BOSSES_SET,
44213
+ ALL_DEPTHS_BOSSES_SET,
44214
+ ALL_WOMB_BOSSES_SET,
44215
+ BLUE_WOMB_BOSSES_SET,
44216
+ ALL_STAGE_10_BOSSES_SET,
44217
+ ALL_STAGE_11_BOSSES_SET,
44218
+ THE_VOID_BOSSES_SET,
44219
+ HOME_BOSSES_SET
44296
44220
  )
44297
- ____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = getAllBossesExcludingStoryBossesSet(nil)
44221
+ ____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = (function()
44222
+ local allBossesExcludingStoryBossesSet = copySet(nil, ____exports.ALL_BOSSES_SET)
44223
+ local allBosses = {__TS__Spread(____exports.ALL_BOSSES_SET:values())}
44224
+ for ____, entityTypeVariantString in ipairs(allBosses) do
44225
+ local tuple = parseEntityTypeVariantString(nil, entityTypeVariantString)
44226
+ assertDefined(nil, tuple, "Failed to parse a boss tuple when constructing the story boss set.")
44227
+ local entityType, _variant = table.unpack(tuple)
44228
+ if STORY_BOSSES_SET:has(entityType) then
44229
+ allBossesExcludingStoryBossesSet:delete(entityTypeVariantString)
44230
+ end
44231
+ end
44232
+ return allBossesExcludingStoryBossesSet
44233
+ end)(nil)
44298
44234
  return ____exports
44299
44235
  end,
44300
44236
  ["src.sets.sinEntityTypesSet"] = function(...)
@@ -20,8 +20,11 @@ export declare function getAliveBosses(entityType?: EntityType | -1, variant?: n
20
20
  *
21
21
  * The set contains strings with the entity type and variant, separated by a period.
22
22
  *
23
- * Note that this set does not include bosses that do not appear in Boss Rooms (e.g. Krampus, Uriel,
24
- * and Gabriel.).
23
+ * Note that this set does not include:
24
+ * - mini-bosses (e.g. Ultra Pride, Krampus)
25
+ * - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
26
+ * - the second phase of multi-phase bosses (e.g. Mega Satan 2), with the exception of The Beast
27
+ * (Ultra Famine, Ultra Pestilence, Ultra War, and Ultra Death are included)
25
28
  *
26
29
  * Also see the `getBossSet` and `getCombinedBossSet` functions.
27
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAC;AA0BvE;;;;;;;;;;;;;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;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,kBAAkB,UAAO,GACxB,WAAW,CAAC,MAAM,CAAC,CAIrB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,GAAG,EACV,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAYjC;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;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,GAAG,GACT,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAOjC;AAED,6FAA6F;AAC7F,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAE7C;AAED;;;;;;;;;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;AAmCD;;;;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
+ {"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAC;AA0BvE;;;;;;;;;;;;;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;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,kBAAkB,UAAO,GACxB,WAAW,CAAC,MAAM,CAAC,CAIrB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,GAAG,EACV,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAYjC;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;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,GAAG,GACT,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAOjC;AAED,6FAA6F;AAC7F,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAE7C;AAED;;;;;;;;;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;AAmCD;;;;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"}
@@ -108,8 +108,11 @@ end
108
108
  --
109
109
  -- The set contains strings with the entity type and variant, separated by a period.
110
110
  --
111
- -- Note that this set does not include bosses that do not appear in Boss Rooms (e.g. Krampus, Uriel,
112
- -- and Gabriel.).
111
+ -- Note that this set does not include:
112
+ -- - mini-bosses (e.g. Ultra Pride, Krampus)
113
+ -- - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
114
+ -- - the second phase of multi-phase bosses (e.g. Mega Satan 2), with the exception of The Beast
115
+ -- (Ultra Famine, Ultra Pestilence, Ultra War, and Ultra Death are included)
113
116
  --
114
117
  -- Also see the `getBossSet` and `getCombinedBossSet` functions.
115
118
  --
@@ -24,14 +24,19 @@ export declare function getSeedEffects(): SeedEffect[];
24
24
  */
25
25
  export declare function isGreedMode(): boolean;
26
26
  /**
27
- * Whether the player is playing on a set seed (i.e. that they entered in a specific seed by
28
- * pressing tab on the character selection screen). When the player resets the game on a set seed,
29
- * the game will not switch to a different seed.
27
+ * Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
28
+ * specific seed by pressing tab on the character selection screen). When the player resets the game
29
+ * on a set seed, the game will not switch to a different seed.
30
30
  *
31
31
  * Under the hood, this checks if the current challenge is `Challenge.NULL` and the
32
32
  * `Seeds.IsCustomRun` method.
33
33
  */
34
34
  export declare function onSetSeed(): boolean;
35
+ /**
36
+ * Helper function to check whether the player is on a Victory Lap (i.e. they answered "yes" to the
37
+ * popup that happens after defeating The Lamb).
38
+ */
39
+ export declare function onVictoryLap(): boolean;
35
40
  /**
36
41
  * Helper function to restart the run using the console command of "restart". If the player is
37
42
  * playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it
@@ -43,8 +48,8 @@ export declare function restart(character?: PlayerType): void;
43
48
  /**
44
49
  * Helper function to change the run status to that of an unseeded run with a new random seed.
45
50
  *
46
- * This is useful to revert the behavior where playing on a set and restarting the game will not
47
- * take you to a new seed.
51
+ * This is useful to revert the behavior where playing on a set seed and restarting the game will
52
+ * not take you to a new seed.
48
53
  *
49
54
  * Under the hood, this function calls the `Seeds.Reset` method and the
50
55
  * `Seeds.Restart(Challenge.NULL)` method.
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAGL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAStC,qDAAqD;AACrD,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,UAAU,EAAE,CAO7C;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAkBpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAUlC"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAGL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAStC,qDAAqD;AACrD,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,UAAU,EAAE,CAO7C;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAkBpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAUlC"}
@@ -54,9 +54,9 @@ end
54
54
  function ____exports.isGreedMode(self)
55
55
  return game.Difficulty == Difficulty.GREED or game.Difficulty == Difficulty.GREEDIER
56
56
  end
57
- --- Whether the player is playing on a set seed (i.e. that they entered in a specific seed by
58
- -- pressing tab on the character selection screen). When the player resets the game on a set seed,
59
- -- the game will not switch to a different seed.
57
+ --- Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
58
+ -- specific seed by pressing tab on the character selection screen). When the player resets the game
59
+ -- on a set seed, the game will not switch to a different seed.
60
60
  --
61
61
  -- Under the hood, this checks if the current challenge is `Challenge.NULL` and the
62
62
  -- `Seeds.IsCustomRun` method.
@@ -66,6 +66,12 @@ function ____exports.onSetSeed(self)
66
66
  local challenge = Isaac.GetChallenge()
67
67
  return challenge == Challenge.NULL and customRun
68
68
  end
69
+ --- Helper function to check whether the player is on a Victory Lap (i.e. they answered "yes" to the
70
+ -- popup that happens after defeating The Lamb).
71
+ function ____exports.onVictoryLap(self)
72
+ local numVictoryLaps = game:GetVictoryLap()
73
+ return numVictoryLaps > 0
74
+ end
69
75
  --- Helper function to restart the run using the console command of "restart". If the player is
70
76
  -- playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it
71
77
  -- will put the player on a run with an entirely new seed.
@@ -88,8 +94,8 @@ function ____exports.restart(self, character)
88
94
  end
89
95
  --- Helper function to change the run status to that of an unseeded run with a new random seed.
90
96
  --
91
- -- This is useful to revert the behavior where playing on a set and restarting the game will not
92
- -- take you to a new seed.
97
+ -- This is useful to revert the behavior where playing on a set seed and restarting the game will
98
+ -- not take you to a new seed.
93
99
  --
94
100
  -- Under the hood, this function calls the `Seeds.Reset` method and the
95
101
  -- `Seeds.Restart(Challenge.NULL)` method.
@@ -1 +1 @@
1
- {"version":3,"file":"bossSets.d.ts","sourceRoot":"","sources":["../../../src/sets/bossSets.ts"],"names":[],"mappings":";AAobA,eAAO,MAAM,mCAAmC,yDAe9C,CAAC;AAEH,eAAO,MAAM,8BAA8B,uCAezC,CAAC;AAEH,eAAO,MAAM,cAAc,qBAQzB,CAAC;AAEH,eAAO,MAAM,qCAAqC,qBACX,CAAC"}
1
+ {"version":3,"file":"bossSets.d.ts","sourceRoot":"","sources":["../../../src/sets/bossSets.ts"],"names":[],"mappings":";AA8cA,eAAO,MAAM,mCAAmC,yDAiB9C,CAAC;AAEH,eAAO,MAAM,8BAA8B,uCAiBzC,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAU9C,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,WAAW,CAAC,MAAM,CAoBhE,CAAC"}
@@ -1,13 +1,10 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__New = ____lualib.__TS__New
3
- local __TS__Spread = ____lualib.__TS__Spread
4
- local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
5
- local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
6
- local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
7
3
  local Set = ____lualib.Set
4
+ local __TS__Spread = ____lualib.__TS__Spread
8
5
  local ____exports = {}
9
- local getAllBossesExcludingStoryBossesSet
10
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
+ local BeastVariant = ____isaac_2Dtypescript_2Ddefinitions.BeastVariant
11
8
  local BigHornVariant = ____isaac_2Dtypescript_2Ddefinitions.BigHornVariant
12
9
  local ChubVariant = ____isaac_2Dtypescript_2Ddefinitions.ChubVariant
13
10
  local DaddyLongLegsVariant = ____isaac_2Dtypescript_2Ddefinitions.DaddyLongLegsVariant
@@ -40,6 +37,7 @@ local WidowVariant = ____isaac_2Dtypescript_2Ddefinitions.WidowVariant
40
37
  local ____entities = require("src.functions.entities")
41
38
  local parseEntityTypeVariantString = ____entities.parseEntityTypeVariantString
42
39
  local ____set = require("src.functions.set")
40
+ local combineSets = ____set.combineSets
43
41
  local copySet = ____set.copySet
44
42
  local ____utils = require("src.functions.utils")
45
43
  local assertDefined = ____utils.assertDefined
@@ -49,19 +47,6 @@ local ____ReadonlySet = require("src.types.ReadonlySet")
49
47
  local ReadonlySet = ____ReadonlySet.ReadonlySet
50
48
  local ____storyBossesSet = require("src.sets.storyBossesSet")
51
49
  local STORY_BOSSES_SET = ____storyBossesSet.STORY_BOSSES_SET
52
- function getAllBossesExcludingStoryBossesSet(self)
53
- local allBossesExcludingStoryBossesSet = copySet(nil, ____exports.ALL_BOSSES_SET)
54
- local allBosses = {__TS__Spread(____exports.ALL_BOSSES_SET:values())}
55
- for ____, entityTypeVariantString in ipairs(allBosses) do
56
- local tuple = parseEntityTypeVariantString(nil, entityTypeVariantString)
57
- assertDefined(nil, tuple, "Failed to parse a boss tuple when constructing the story boss set.")
58
- local entityType, _variant = table.unpack(tuple)
59
- if STORY_BOSSES_SET:has(entityType) then
60
- allBossesExcludingStoryBossesSet:delete(entityTypeVariantString)
61
- end
62
- end
63
- return allBossesExcludingStoryBossesSet
64
- end
65
50
  --- Contains just the bosses in Basement (not e.g. Burning Basement).
66
51
  local BASEMENT_BOSSES_SET = __TS__New(
67
52
  ReadonlySet,
@@ -141,28 +126,14 @@ local DROSS_BOSSES_SET = __TS__New(
141
126
  tostring(EntityType.TURDLET) .. ".0"
142
127
  }
143
128
  )
144
- local ____ReadonlySet_1 = ReadonlySet
145
- local ____array_0 = __TS__SparseArrayNew(__TS__Spread(BASEMENT_BOSSES_SET:values()))
146
- __TS__SparseArrayPush(
147
- ____array_0,
148
- __TS__Spread(CELLAR_BOSSES_SET:values())
149
- )
150
- __TS__SparseArrayPush(
151
- ____array_0,
152
- __TS__Spread(BURNING_BASEMENT_BOSSES_SET:values())
153
- )
154
- __TS__SparseArrayPush(
155
- ____array_0,
156
- __TS__Spread(DOWNPOUR_BOSSES_SET:values())
157
- )
158
- __TS__SparseArrayPush(
159
- ____array_0,
160
- __TS__Spread(DROSS_BOSSES_SET:values())
161
- )
162
129
  --- The set of unique bosses for Basement, Cellar, and so on.
163
- local ALL_BASEMENT_BOSSES_SET = __TS__New(
164
- ____ReadonlySet_1,
165
- {__TS__SparseArraySpread(____array_0)}
130
+ local ALL_BASEMENT_BOSSES_SET = combineSets(
131
+ nil,
132
+ BASEMENT_BOSSES_SET,
133
+ CELLAR_BOSSES_SET,
134
+ BURNING_BASEMENT_BOSSES_SET,
135
+ DOWNPOUR_BOSSES_SET,
136
+ DROSS_BOSSES_SET
166
137
  )
167
138
  local BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
168
139
  {StageType.ORIGINAL, BASEMENT_BOSSES_SET},
@@ -258,28 +229,14 @@ local ASHPIT_BOSSES_SET = __TS__New(
258
229
  tostring(EntityType.CLUTCH) .. ".0"
259
230
  }
260
231
  )
261
- local ____ReadonlySet_3 = ReadonlySet
262
- local ____array_2 = __TS__SparseArrayNew(__TS__Spread(CAVES_BOSSES_SET:values()))
263
- __TS__SparseArrayPush(
264
- ____array_2,
265
- __TS__Spread(CATACOMBS_BOSSES_SET:values())
266
- )
267
- __TS__SparseArrayPush(
268
- ____array_2,
269
- __TS__Spread(FLOODED_CAVES_BOSSES_SET:values())
270
- )
271
- __TS__SparseArrayPush(
272
- ____array_2,
273
- __TS__Spread(MINES_BOSSES_SET:values())
274
- )
275
- __TS__SparseArrayPush(
276
- ____array_2,
277
- __TS__Spread(ASHPIT_BOSSES_SET:values())
278
- )
279
232
  --- The set of unique bosses for Caves, Catacombs, and so on.
280
- local ALL_CAVES_BOSSES_SET = __TS__New(
281
- ____ReadonlySet_3,
282
- {__TS__SparseArraySpread(____array_2)}
233
+ local ALL_CAVES_BOSSES_SET = combineSets(
234
+ nil,
235
+ CAVES_BOSSES_SET,
236
+ CATACOMBS_BOSSES_SET,
237
+ FLOODED_CAVES_BOSSES_SET,
238
+ MINES_BOSSES_SET,
239
+ ASHPIT_BOSSES_SET
283
240
  )
284
241
  local CAVES_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
285
242
  {StageType.ORIGINAL, CAVES_BOSSES_SET},
@@ -359,28 +316,14 @@ local GEHENNA_BOSSES_SET = __TS__New(
359
316
  tostring(EntityType.HORNY_BOYS) .. ".0"
360
317
  }
361
318
  )
362
- local ____ReadonlySet_5 = ReadonlySet
363
- local ____array_4 = __TS__SparseArrayNew(__TS__Spread(DEPTHS_BOSSES_SET:values()))
364
- __TS__SparseArrayPush(
365
- ____array_4,
366
- __TS__Spread(NECROPOLIS_BOSSES_SET:values())
367
- )
368
- __TS__SparseArrayPush(
369
- ____array_4,
370
- __TS__Spread(DANK_DEPTHS_BOSSES_SET:values())
371
- )
372
- __TS__SparseArrayPush(
373
- ____array_4,
374
- __TS__Spread(MAUSOLEUM_BOSSES_SET:values())
375
- )
376
- __TS__SparseArrayPush(
377
- ____array_4,
378
- __TS__Spread(GEHENNA_BOSSES_SET:values())
379
- )
380
319
  --- The set of unique bosses for Depths, Necropolis, and so on.
381
- local ALL_DEPTHS_BOSSES_SET = __TS__New(
382
- ____ReadonlySet_5,
383
- {__TS__SparseArraySpread(____array_4)}
320
+ local ALL_DEPTHS_BOSSES_SET = combineSets(
321
+ nil,
322
+ DEPTHS_BOSSES_SET,
323
+ NECROPOLIS_BOSSES_SET,
324
+ DANK_DEPTHS_BOSSES_SET,
325
+ MAUSOLEUM_BOSSES_SET,
326
+ GEHENNA_BOSSES_SET
384
327
  )
385
328
  local DEPTHS_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
386
329
  {StageType.ORIGINAL, DEPTHS_BOSSES_SET},
@@ -453,28 +396,14 @@ local CORPSE_BOSSES_SET = __TS__New(
453
396
  tostring(EntityType.MOTHER) .. ".0"
454
397
  }
455
398
  )
456
- local ____ReadonlySet_7 = ReadonlySet
457
- local ____array_6 = __TS__SparseArrayNew(__TS__Spread(WOMB_BOSSES_SET:values()))
458
- __TS__SparseArrayPush(
459
- ____array_6,
460
- __TS__Spread(UTERO_BOSSES_SET:values())
461
- )
462
- __TS__SparseArrayPush(
463
- ____array_6,
464
- __TS__Spread(SCARRED_WOMB_BOSSES_SET:values())
465
- )
466
- __TS__SparseArrayPush(
467
- ____array_6,
468
- __TS__Spread(MAUSOLEUM_BOSSES_SET:values())
469
- )
470
- __TS__SparseArrayPush(
471
- ____array_6,
472
- __TS__Spread(GEHENNA_BOSSES_SET:values())
473
- )
474
399
  --- The set of unique bosses for Depths, Necropolis, and so on.
475
- local ALL_WOMB_BOSSES_SET = __TS__New(
476
- ____ReadonlySet_7,
477
- {__TS__SparseArraySpread(____array_6)}
400
+ local ALL_WOMB_BOSSES_SET = combineSets(
401
+ nil,
402
+ WOMB_BOSSES_SET,
403
+ UTERO_BOSSES_SET,
404
+ SCARRED_WOMB_BOSSES_SET,
405
+ MAUSOLEUM_BOSSES_SET,
406
+ GEHENNA_BOSSES_SET
478
407
  )
479
408
  local WOMB_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, WOMB_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, UTERO_BOSSES_SET}, {StageType.AFTERBIRTH, SCARRED_WOMB_BOSSES_SET}, {StageType.REPENTANCE, CORPSE_BOSSES_SET}})
480
409
  local BLUE_WOMB_BOSSES_SET = __TS__New(
@@ -490,36 +419,41 @@ local CATHEDRAL_BOSSES_SET = __TS__New(
490
419
  ReadonlySet,
491
420
  {(tostring(EntityType.ISAAC) .. ".") .. tostring(IsaacVariant.ISAAC)}
492
421
  )
493
- local ____ReadonlySet_9 = ReadonlySet
494
- local ____array_8 = __TS__SparseArrayNew(__TS__Spread(SHEOL_BOSSES_SET:values()))
495
- __TS__SparseArrayPush(
496
- ____array_8,
497
- __TS__Spread(CATHEDRAL_BOSSES_SET:values())
498
- )
499
- local ALL_STAGE_10_BOSSES_SET = __TS__New(
500
- ____ReadonlySet_9,
501
- {__TS__SparseArraySpread(____array_8)}
502
- )
422
+ local ALL_STAGE_10_BOSSES_SET = combineSets(nil, SHEOL_BOSSES_SET, CATHEDRAL_BOSSES_SET)
503
423
  local STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, SHEOL_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CATHEDRAL_BOSSES_SET}})
504
424
  local DARK_ROOM_BOSSES_SET = __TS__New(
505
425
  ReadonlySet,
506
- {(tostring(EntityType.THE_LAMB) .. ".") .. tostring(LambVariant.LAMB)}
426
+ {
427
+ (tostring(EntityType.THE_LAMB) .. ".") .. tostring(LambVariant.LAMB),
428
+ tostring(EntityType.MEGA_SATAN) .. ".0"
429
+ }
507
430
  )
508
431
  local CHEST_BOSSES_SET = __TS__New(
509
432
  ReadonlySet,
510
- {(tostring(EntityType.ISAAC) .. ".") .. tostring(IsaacVariant.BLUE_BABY)}
433
+ {
434
+ (tostring(EntityType.ISAAC) .. ".") .. tostring(IsaacVariant.BLUE_BABY),
435
+ tostring(EntityType.MEGA_SATAN) .. ".0"
436
+ }
511
437
  )
512
- local ____ReadonlySet_11 = ReadonlySet
513
- local ____array_10 = __TS__SparseArrayNew(__TS__Spread(DARK_ROOM_BOSSES_SET:values()))
514
- __TS__SparseArrayPush(
515
- ____array_10,
516
- __TS__Spread(CHEST_BOSSES_SET:values())
438
+ local ALL_STAGE_11_BOSSES_SET = combineSets(nil, DARK_ROOM_BOSSES_SET, CHEST_BOSSES_SET)
439
+ local STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, DARK_ROOM_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CHEST_BOSSES_SET}})
440
+ local THE_VOID_BOSSES_SET = __TS__New(
441
+ ReadonlySet,
442
+ {tostring(EntityType.DELIRIUM) .. ".0"}
517
443
  )
518
- local ALL_STAGE_11_BOSSES_SET = __TS__New(
519
- ____ReadonlySet_11,
520
- {__TS__SparseArraySpread(____array_10)}
444
+ local THE_VOID_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, THE_VOID_BOSSES_SET}})
445
+ local HOME_BOSSES_SET = __TS__New(
446
+ ReadonlySet,
447
+ {
448
+ tostring(EntityType.DOGMA) .. ".0",
449
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.BEAST),
450
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_FAMINE),
451
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_PESTILENCE),
452
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_WAR),
453
+ (tostring(EntityType.BEAST) .. ".") .. tostring(BeastVariant.ULTRA_DEATH)
454
+ }
521
455
  )
522
- local STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, DARK_ROOM_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CHEST_BOSSES_SET}})
456
+ local HOME_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, HOME_BOSSES_SET}})
523
457
  ____exports.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
524
458
  {1, BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP},
525
459
  {2, BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP},
@@ -531,7 +465,9 @@ ____exports.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
531
465
  {8, WOMB_STAGE_TYPE_TO_BOSS_SET_MAP},
532
466
  {9, BLUE_WOMB_STAGE_TYPE_TO_BOSS_SET_MAP},
533
467
  {10, STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP},
534
- {11, STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP}
468
+ {11, STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP},
469
+ {12, THE_VOID_STAGE_TYPE_TO_BOSS_SET_MAP},
470
+ {13, HOME_STAGE_TYPE_TO_BOSS_SET_MAP}
535
471
  })
536
472
  ____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
537
473
  {1, ALL_BASEMENT_BOSSES_SET},
@@ -544,37 +480,33 @@ ____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
544
480
  {8, ALL_WOMB_BOSSES_SET},
545
481
  {9, BLUE_WOMB_BOSSES_SET},
546
482
  {10, ALL_STAGE_10_BOSSES_SET},
547
- {11, ALL_STAGE_11_BOSSES_SET}
483
+ {11, ALL_STAGE_11_BOSSES_SET},
484
+ {12, THE_VOID_BOSSES_SET},
485
+ {13, HOME_BOSSES_SET}
548
486
  })
549
- local ____ReadonlySet_13 = ReadonlySet
550
- local ____array_12 = __TS__SparseArrayNew(__TS__Spread(ALL_BASEMENT_BOSSES_SET:values()))
551
- __TS__SparseArrayPush(
552
- ____array_12,
553
- __TS__Spread(ALL_CAVES_BOSSES_SET:values())
554
- )
555
- __TS__SparseArrayPush(
556
- ____array_12,
557
- __TS__Spread(ALL_DEPTHS_BOSSES_SET:values())
558
- )
559
- __TS__SparseArrayPush(
560
- ____array_12,
561
- __TS__Spread(ALL_WOMB_BOSSES_SET:values())
562
- )
563
- __TS__SparseArrayPush(
564
- ____array_12,
565
- __TS__Spread(BLUE_WOMB_BOSSES_SET:values())
566
- )
567
- __TS__SparseArrayPush(
568
- ____array_12,
569
- __TS__Spread(ALL_STAGE_10_BOSSES_SET:values())
570
- )
571
- __TS__SparseArrayPush(
572
- ____array_12,
573
- __TS__Spread(ALL_STAGE_11_BOSSES_SET:values())
574
- )
575
- ____exports.ALL_BOSSES_SET = __TS__New(
576
- ____ReadonlySet_13,
577
- {__TS__SparseArraySpread(____array_12)}
578
- )
579
- ____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = getAllBossesExcludingStoryBossesSet(nil)
487
+ ____exports.ALL_BOSSES_SET = combineSets(
488
+ nil,
489
+ ALL_BASEMENT_BOSSES_SET,
490
+ ALL_CAVES_BOSSES_SET,
491
+ ALL_DEPTHS_BOSSES_SET,
492
+ ALL_WOMB_BOSSES_SET,
493
+ BLUE_WOMB_BOSSES_SET,
494
+ ALL_STAGE_10_BOSSES_SET,
495
+ ALL_STAGE_11_BOSSES_SET,
496
+ THE_VOID_BOSSES_SET,
497
+ HOME_BOSSES_SET
498
+ )
499
+ ____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = (function()
500
+ local allBossesExcludingStoryBossesSet = copySet(nil, ____exports.ALL_BOSSES_SET)
501
+ local allBosses = {__TS__Spread(____exports.ALL_BOSSES_SET:values())}
502
+ for ____, entityTypeVariantString in ipairs(allBosses) do
503
+ local tuple = parseEntityTypeVariantString(nil, entityTypeVariantString)
504
+ assertDefined(nil, tuple, "Failed to parse a boss tuple when constructing the story boss set.")
505
+ local entityType, _variant = table.unpack(tuple)
506
+ if STORY_BOSSES_SET:has(entityType) then
507
+ allBossesExcludingStoryBossesSet:delete(entityTypeVariantString)
508
+ end
509
+ end
510
+ return allBossesExcludingStoryBossesSet
511
+ end)(nil)
580
512
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "47.4.0",
3
+ "version": "47.5.3",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -54,8 +54,11 @@ export function getAliveBosses(
54
54
  *
55
55
  * The set contains strings with the entity type and variant, separated by a period.
56
56
  *
57
- * Note that this set does not include bosses that do not appear in Boss Rooms (e.g. Krampus, Uriel,
58
- * and Gabriel.).
57
+ * Note that this set does not include:
58
+ * - mini-bosses (e.g. Ultra Pride, Krampus)
59
+ * - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
60
+ * - the second phase of multi-phase bosses (e.g. Mega Satan 2), with the exception of The Beast
61
+ * (Ultra Famine, Ultra Pestilence, Ultra War, and Ultra Death are included)
59
62
  *
60
63
  * Also see the `getBossSet` and `getCombinedBossSet` functions.
61
64
  *
@@ -71,9 +71,9 @@ export function isGreedMode(): boolean {
71
71
  }
72
72
 
73
73
  /**
74
- * Whether the player is playing on a set seed (i.e. that they entered in a specific seed by
75
- * pressing tab on the character selection screen). When the player resets the game on a set seed,
76
- * the game will not switch to a different seed.
74
+ * Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
75
+ * specific seed by pressing tab on the character selection screen). When the player resets the game
76
+ * on a set seed, the game will not switch to a different seed.
77
77
  *
78
78
  * Under the hood, this checks if the current challenge is `Challenge.NULL` and the
79
79
  * `Seeds.IsCustomRun` method.
@@ -86,6 +86,15 @@ export function onSetSeed(): boolean {
86
86
  return challenge === Challenge.NULL && customRun;
87
87
  }
88
88
 
89
+ /**
90
+ * Helper function to check whether the player is on a Victory Lap (i.e. they answered "yes" to the
91
+ * popup that happens after defeating The Lamb).
92
+ */
93
+ export function onVictoryLap(): boolean {
94
+ const numVictoryLaps = game.GetVictoryLap();
95
+ return numVictoryLaps > 0;
96
+ }
97
+
89
98
  /**
90
99
  * Helper function to restart the run using the console command of "restart". If the player is
91
100
  * playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it
@@ -116,8 +125,8 @@ export function restart(character?: PlayerType): void {
116
125
  /**
117
126
  * Helper function to change the run status to that of an unseeded run with a new random seed.
118
127
  *
119
- * This is useful to revert the behavior where playing on a set and restarting the game will not
120
- * take you to a new seed.
128
+ * This is useful to revert the behavior where playing on a set seed and restarting the game will
129
+ * not take you to a new seed.
121
130
  *
122
131
  * Under the hood, this function calls the `Seeds.Reset` method and the
123
132
  * `Seeds.Restart(Challenge.NULL)` method.
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BeastVariant,
2
3
  BigHornVariant,
3
4
  ChubVariant,
4
5
  DaddyLongLegsVariant,
@@ -30,7 +31,7 @@ import {
30
31
  WidowVariant,
31
32
  } from "isaac-typescript-definitions";
32
33
  import { parseEntityTypeVariantString } from "../functions/entities";
33
- import { copySet } from "../functions/set";
34
+ import { combineSets, copySet } from "../functions/set";
34
35
  import { assertDefined } from "../functions/utils";
35
36
  import { ReadonlyMap } from "../types/ReadonlyMap";
36
37
  import { ReadonlySet } from "../types/ReadonlySet";
@@ -112,13 +113,13 @@ const DROSS_BOSSES_SET = new ReadonlySet<string>([
112
113
  ]);
113
114
 
114
115
  /** The set of unique bosses for Basement, Cellar, and so on. */
115
- const ALL_BASEMENT_BOSSES_SET = new ReadonlySet<string>([
116
- ...BASEMENT_BOSSES_SET.values(),
117
- ...CELLAR_BOSSES_SET.values(),
118
- ...BURNING_BASEMENT_BOSSES_SET.values(),
119
- ...DOWNPOUR_BOSSES_SET.values(),
120
- ...DROSS_BOSSES_SET.values(),
121
- ]);
116
+ const ALL_BASEMENT_BOSSES_SET: ReadonlySet<string> = combineSets(
117
+ BASEMENT_BOSSES_SET,
118
+ CELLAR_BOSSES_SET,
119
+ BURNING_BASEMENT_BOSSES_SET,
120
+ DOWNPOUR_BOSSES_SET,
121
+ DROSS_BOSSES_SET,
122
+ );
122
123
 
123
124
  const BASEMENT_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
124
125
  StageType,
@@ -209,13 +210,13 @@ const ASHPIT_BOSSES_SET = new ReadonlySet<string>([
209
210
  ]);
210
211
 
211
212
  /** The set of unique bosses for Caves, Catacombs, and so on. */
212
- const ALL_CAVES_BOSSES_SET = new ReadonlySet<string>([
213
- ...CAVES_BOSSES_SET.values(),
214
- ...CATACOMBS_BOSSES_SET.values(),
215
- ...FLOODED_CAVES_BOSSES_SET.values(),
216
- ...MINES_BOSSES_SET.values(),
217
- ...ASHPIT_BOSSES_SET.values(),
218
- ]);
213
+ const ALL_CAVES_BOSSES_SET: ReadonlySet<string> = combineSets(
214
+ CAVES_BOSSES_SET,
215
+ CATACOMBS_BOSSES_SET,
216
+ FLOODED_CAVES_BOSSES_SET,
217
+ MINES_BOSSES_SET,
218
+ ASHPIT_BOSSES_SET,
219
+ );
219
220
 
220
221
  const CAVES_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
221
222
  StageType,
@@ -290,13 +291,13 @@ const GEHENNA_BOSSES_SET = new ReadonlySet<string>([
290
291
  ]);
291
292
 
292
293
  /** The set of unique bosses for Depths, Necropolis, and so on. */
293
- const ALL_DEPTHS_BOSSES_SET = new ReadonlySet<string>([
294
- ...DEPTHS_BOSSES_SET.values(),
295
- ...NECROPOLIS_BOSSES_SET.values(),
296
- ...DANK_DEPTHS_BOSSES_SET.values(),
297
- ...MAUSOLEUM_BOSSES_SET.values(),
298
- ...GEHENNA_BOSSES_SET.values(),
299
- ]);
294
+ const ALL_DEPTHS_BOSSES_SET: ReadonlySet<string> = combineSets(
295
+ DEPTHS_BOSSES_SET,
296
+ NECROPOLIS_BOSSES_SET,
297
+ DANK_DEPTHS_BOSSES_SET,
298
+ MAUSOLEUM_BOSSES_SET,
299
+ GEHENNA_BOSSES_SET,
300
+ );
300
301
 
301
302
  const DEPTHS_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
302
303
  StageType,
@@ -366,13 +367,13 @@ const CORPSE_BOSSES_SET = new ReadonlySet<string>([
366
367
  ]);
367
368
 
368
369
  /** The set of unique bosses for Depths, Necropolis, and so on. */
369
- const ALL_WOMB_BOSSES_SET = new ReadonlySet<string>([
370
- ...WOMB_BOSSES_SET.values(),
371
- ...UTERO_BOSSES_SET.values(),
372
- ...SCARRED_WOMB_BOSSES_SET.values(),
373
- ...MAUSOLEUM_BOSSES_SET.values(),
374
- ...GEHENNA_BOSSES_SET.values(),
375
- ]);
370
+ const ALL_WOMB_BOSSES_SET: ReadonlySet<string> = combineSets(
371
+ WOMB_BOSSES_SET,
372
+ UTERO_BOSSES_SET,
373
+ SCARRED_WOMB_BOSSES_SET,
374
+ MAUSOLEUM_BOSSES_SET,
375
+ GEHENNA_BOSSES_SET,
376
+ );
376
377
 
377
378
  const WOMB_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
378
379
  StageType,
@@ -400,10 +401,10 @@ const CATHEDRAL_BOSSES_SET = new ReadonlySet<string>([
400
401
  `${EntityType.ISAAC}.${IsaacVariant.ISAAC}`, // 102.0
401
402
  ]);
402
403
 
403
- const ALL_STAGE_10_BOSSES_SET = new ReadonlySet<string>([
404
- ...SHEOL_BOSSES_SET.values(),
405
- ...CATHEDRAL_BOSSES_SET.values(),
406
- ]);
404
+ const ALL_STAGE_10_BOSSES_SET: ReadonlySet<string> = combineSets(
405
+ SHEOL_BOSSES_SET,
406
+ CATHEDRAL_BOSSES_SET,
407
+ );
407
408
 
408
409
  const STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
409
410
  StageType,
@@ -415,16 +416,18 @@ const STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
415
416
 
416
417
  const DARK_ROOM_BOSSES_SET = new ReadonlySet<string>([
417
418
  `${EntityType.THE_LAMB}.${LambVariant.LAMB}`, // 273.0
419
+ `${EntityType.MEGA_SATAN}.0`, // 274.0
418
420
  ]);
419
421
 
420
422
  const CHEST_BOSSES_SET = new ReadonlySet<string>([
421
423
  `${EntityType.ISAAC}.${IsaacVariant.BLUE_BABY}`, // 102.1
424
+ `${EntityType.MEGA_SATAN}.0`, // 274.0
422
425
  ]);
423
426
 
424
- const ALL_STAGE_11_BOSSES_SET = new ReadonlySet<string>([
425
- ...DARK_ROOM_BOSSES_SET.values(),
426
- ...CHEST_BOSSES_SET.values(),
427
- ]);
427
+ const ALL_STAGE_11_BOSSES_SET: ReadonlySet<string> = combineSets(
428
+ DARK_ROOM_BOSSES_SET,
429
+ CHEST_BOSSES_SET,
430
+ );
428
431
 
429
432
  const STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
430
433
  StageType,
@@ -434,6 +437,29 @@ const STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
434
437
  [StageType.WRATH_OF_THE_LAMB, CHEST_BOSSES_SET],
435
438
  ]);
436
439
 
440
+ const THE_VOID_BOSSES_SET = new ReadonlySet<string>([
441
+ `${EntityType.DELIRIUM}.0`, // 412.0
442
+ ]);
443
+
444
+ const THE_VOID_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
445
+ StageType,
446
+ ReadonlySet<string>
447
+ >([[StageType.ORIGINAL, THE_VOID_BOSSES_SET]]);
448
+
449
+ const HOME_BOSSES_SET = new ReadonlySet<string>([
450
+ `${EntityType.DOGMA}.0`, // 950.0
451
+ `${EntityType.BEAST}.${BeastVariant.BEAST}`, // 951.0
452
+ `${EntityType.BEAST}.${BeastVariant.ULTRA_FAMINE}`, // 951.10
453
+ `${EntityType.BEAST}.${BeastVariant.ULTRA_PESTILENCE}`, // 951.20
454
+ `${EntityType.BEAST}.${BeastVariant.ULTRA_WAR}`, // 951.30
455
+ `${EntityType.BEAST}.${BeastVariant.ULTRA_DEATH}`, // 951.40
456
+ ]);
457
+
458
+ const HOME_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
459
+ StageType,
460
+ ReadonlySet<string>
461
+ >([[StageType.ORIGINAL, HOME_BOSSES_SET]]);
462
+
437
463
  export const STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
438
464
  int,
439
465
  ReadonlyMap<int, ReadonlySet<string>>
@@ -449,6 +475,8 @@ export const STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = new ReadonlyMap<
449
475
  [9, BLUE_WOMB_STAGE_TYPE_TO_BOSS_SET_MAP],
450
476
  [10, STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP],
451
477
  [11, STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP],
478
+ [12, THE_VOID_STAGE_TYPE_TO_BOSS_SET_MAP],
479
+ [13, HOME_STAGE_TYPE_TO_BOSS_SET_MAP],
452
480
  ]);
453
481
 
454
482
  export const STAGE_TO_COMBINED_BOSS_SET_MAP = new ReadonlyMap<
@@ -466,40 +494,40 @@ export const STAGE_TO_COMBINED_BOSS_SET_MAP = new ReadonlyMap<
466
494
  [9, BLUE_WOMB_BOSSES_SET],
467
495
  [10, ALL_STAGE_10_BOSSES_SET],
468
496
  [11, ALL_STAGE_11_BOSSES_SET],
469
- ]);
470
-
471
- export const ALL_BOSSES_SET = new ReadonlySet<string>([
472
- ...ALL_BASEMENT_BOSSES_SET.values(),
473
- ...ALL_CAVES_BOSSES_SET.values(),
474
- ...ALL_DEPTHS_BOSSES_SET.values(),
475
- ...ALL_WOMB_BOSSES_SET.values(),
476
- ...BLUE_WOMB_BOSSES_SET.values(),
477
- ...ALL_STAGE_10_BOSSES_SET.values(),
478
- ...ALL_STAGE_11_BOSSES_SET.values(),
479
- ]);
480
-
481
- export const ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET =
482
- getAllBossesExcludingStoryBossesSet();
483
-
484
- /**
485
- * Since story bosses are stored by entity type, we copy the existing bosses and filter them (to
486
- * avoid having to hard-code story boss variants).
487
- */
488
- function getAllBossesExcludingStoryBossesSet(): ReadonlySet<string> {
489
- const allBossesExcludingStoryBossesSet = copySet(ALL_BOSSES_SET);
490
- const allBosses = [...ALL_BOSSES_SET.values()];
491
- for (const entityTypeVariantString of allBosses) {
492
- const tuple = parseEntityTypeVariantString(entityTypeVariantString);
493
- assertDefined(
494
- tuple,
495
- "Failed to parse a boss tuple when constructing the story boss set.",
496
- );
497
-
498
- const [entityType, _variant] = tuple;
499
- if (STORY_BOSSES_SET.has(entityType)) {
500
- allBossesExcludingStoryBossesSet.delete(entityTypeVariantString);
497
+ [12, THE_VOID_BOSSES_SET],
498
+ [13, HOME_BOSSES_SET],
499
+ ]);
500
+
501
+ export const ALL_BOSSES_SET: ReadonlySet<string> = combineSets(
502
+ ALL_BASEMENT_BOSSES_SET,
503
+ ALL_CAVES_BOSSES_SET,
504
+ ALL_DEPTHS_BOSSES_SET,
505
+ ALL_WOMB_BOSSES_SET,
506
+ BLUE_WOMB_BOSSES_SET,
507
+ ALL_STAGE_10_BOSSES_SET,
508
+ ALL_STAGE_11_BOSSES_SET,
509
+ THE_VOID_BOSSES_SET,
510
+ HOME_BOSSES_SET,
511
+ );
512
+
513
+ export const ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET: ReadonlySet<string> =
514
+ (() => {
515
+ // Since story bosses are stored by entity type, we copy the existing bosses and filter them (to
516
+ // avoid having to hard-code story boss variants).
517
+ const allBossesExcludingStoryBossesSet = copySet(ALL_BOSSES_SET);
518
+ const allBosses = [...ALL_BOSSES_SET.values()];
519
+ for (const entityTypeVariantString of allBosses) {
520
+ const tuple = parseEntityTypeVariantString(entityTypeVariantString);
521
+ assertDefined(
522
+ tuple,
523
+ "Failed to parse a boss tuple when constructing the story boss set.",
524
+ );
525
+
526
+ const [entityType, _variant] = tuple;
527
+ if (STORY_BOSSES_SET.has(entityType)) {
528
+ allBossesExcludingStoryBossesSet.delete(entityTypeVariantString);
529
+ }
501
530
  }
502
- }
503
531
 
504
- return allBossesExcludingStoryBossesSet;
505
- }
532
+ return allBossesExcludingStoryBossesSet;
533
+ })();