isaacscript-common 47.1.0 → 47.3.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.
@@ -979,6 +979,9 @@ export declare function angleToDirection(angleDegrees: int): Direction;
979
979
  /** Helper type to represent any class. (This is the same type as any class constructor.) */
980
980
  export declare type AnyClass = new () => object;
981
981
 
982
+ /** Alias for the `anySeedEffectEnabled` function. */
983
+ export declare function anyEasterEggEnabled(): boolean;
984
+
982
985
  /**
983
986
  * A type union that matches `Entity`, `EntityBomb`, `EntityEffect`, and so on.
984
987
  *
@@ -1051,6 +1054,8 @@ export declare function anyPlayerHoldingItem(): boolean;
1051
1054
  */
1052
1055
  export declare function anyPlayerIs(...matchingCharacters: PlayerType[]): boolean;
1053
1056
 
1057
+ export declare function anySeedEffectEnabled(): boolean;
1058
+
1054
1059
  declare type Arr<N extends number, T extends unknown[] = []> = T["length"] extends N ? T : Arr<N, [...T, unknown]>;
1055
1060
 
1056
1061
  declare type Arr_2<N extends number, T extends unknown[] = []> = T["length"] extends N ? T : Arr_2<N, [...T, unknown]>;
@@ -4891,6 +4896,14 @@ export declare function getBooleansFromTable(luaMap: LuaMap<string, unknown>, ob
4891
4896
  */
4892
4897
  export declare function getBosses(entityType?: EntityType, variant?: int, subType?: int, ignoreFriendly?: boolean): EntityNPC[];
4893
4898
 
4899
+ /**
4900
+ * Helper function to get the door that leads to the Boss Rush. (In vanilla, the door will only
4901
+ * appear in the Boss Room of the sixth floor.)
4902
+ *
4903
+ * Returns undefined if the room has no Boss Rush doors.
4904
+ */
4905
+ export declare function getBossRushDoor(): GridEntityDoor | undefined;
4906
+
4894
4907
  /**
4895
4908
  * Helper function to get the set of vanilla bosses for a particular stage and stage type
4896
4909
  * combination.
@@ -8381,6 +8394,12 @@ export declare function isBoolean(variable: unknown): variable is boolean;
8381
8394
  */
8382
8395
  export declare function isBossRoomOf(roomData: RoomConfig, bossID: BossID): boolean;
8383
8396
 
8397
+ /**
8398
+ * Helper function to check if the provided door is the one that leads to the Boss Rush room. (In
8399
+ * vanilla, the door will only appear in the Boss Room of the sixth floor.)
8400
+ */
8401
+ export declare function isBossRushDoor(door: GridEntityDoor): boolean;
8402
+
8384
8403
  /**
8385
8404
  * Returns true for cards that have the following card type:
8386
8405
  * - CardType.TAROT
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 47.1.0
3
+ isaacscript-common 47.3.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -20100,6 +20100,7 @@ local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
20100
20100
  local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
20101
20101
  local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
20102
20102
  local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
20103
+ local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
20103
20104
  local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
20104
20105
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
20105
20106
  local ____HealthType = require("src.enums.HealthType")
@@ -20126,6 +20127,7 @@ ____exports.PILL_COLOR_VALUES = getEnumValues(nil, PillColor)
20126
20127
  ____exports.PLAYER_FORM_VALUES = getEnumValues(nil, PlayerForm)
20127
20128
  ____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
20128
20129
  ____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
20130
+ ____exports.SEED_EFFECTS = getEnumValues(nil, SeedEffect)
20129
20131
  ____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
20130
20132
  ____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
20131
20133
  ____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
@@ -20476,23 +20478,26 @@ function ____exports.getDoors(self, ...)
20476
20478
  do
20477
20479
  local door = room:GetDoor(doorSlot)
20478
20480
  if door == nil then
20479
- goto __continue25
20481
+ goto __continue27
20480
20482
  end
20481
20483
  local gridEntityType = door:GetType()
20482
20484
  if gridEntityType ~= GridEntityType.DOOR then
20483
- goto __continue25
20485
+ goto __continue27
20484
20486
  end
20485
20487
  if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
20486
20488
  doors[#doors + 1] = door
20487
20489
  end
20488
20490
  end
20489
- ::__continue25::
20491
+ ::__continue27::
20490
20492
  end
20491
20493
  return doors
20492
20494
  end
20493
20495
  function ____exports.isBlueWombDoor(self, door)
20494
20496
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
20495
20497
  end
20498
+ function ____exports.isBossRushDoor(self, door)
20499
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.BOSS_RUSH)
20500
+ end
20496
20501
  function ____exports.isMegaSatanDoor(self, door)
20497
20502
  return door.TargetRoomIndex == asNumber(nil, GridRoom.MEGA_SATAN)
20498
20503
  end
@@ -20569,6 +20574,13 @@ function ____exports.getBlueWombDoor(self)
20569
20574
  function(____, door) return ____exports.isBlueWombDoor(nil, door) end
20570
20575
  )
20571
20576
  end
20577
+ function ____exports.getBossRushDoor(self)
20578
+ local doors = ____exports.getDoors(nil)
20579
+ return __TS__ArrayFind(
20580
+ doors,
20581
+ function(____, door) return ____exports.isBossRushDoor(nil, door) end
20582
+ )
20583
+ end
20572
20584
  function ____exports.getDevilRoomDoor(self)
20573
20585
  local devilRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL)
20574
20586
  local ____temp_1
@@ -22490,11 +22502,16 @@ end
22490
22502
  return ____exports
22491
22503
  end,
22492
22504
  ["src.functions.run"] = function(...)
22505
+ local ____lualib = require("lualib_bundle")
22506
+ local __TS__ArraySome = ____lualib.__TS__ArraySome
22493
22507
  local ____exports = {}
22494
22508
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
22495
22509
  local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
22496
22510
  local Difficulty = ____isaac_2Dtypescript_2Ddefinitions.Difficulty
22511
+ local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
22497
22512
  local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
22513
+ local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
22514
+ local SEED_EFFECTS = ____cachedEnumValues.SEED_EFFECTS
22498
22515
  local ____cachedClasses = require("src.core.cachedClasses")
22499
22516
  local game = ____cachedClasses.game
22500
22517
  local ____constants = require("src.core.constants")
@@ -22507,6 +22524,16 @@ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
22507
22524
  local spawnSlot = ____entitiesSpecific.spawnSlot
22508
22525
  local ____log = require("src.functions.log")
22509
22526
  local log = ____log.log
22527
+ function ____exports.anySeedEffectEnabled(self)
22528
+ local seeds = game:GetSeeds()
22529
+ return __TS__ArraySome(
22530
+ SEED_EFFECTS,
22531
+ function(____, seedEffect) return seedEffect ~= SeedEffect.NORMAL and seeds:HasSeedEffect(seedEffect) end
22532
+ )
22533
+ end
22534
+ function ____exports.anyEasterEggEnabled(self)
22535
+ return ____exports.anySeedEffectEnabled(nil)
22536
+ end
22510
22537
  function ____exports.canRunUnlockAchievements(self)
22511
22538
  local greedDonationMachine = spawnSlot(nil, SlotVariant.GREED_DONATION_MACHINE, 0, VectorZero)
22512
22539
  local canUnlockAchievements = greedDonationMachine:Exists()
@@ -1,4 +1,4 @@
1
- import { ActiveSlot, CacheFlag, ControllerIndex, DoorSlot, DoorSlotFlag, GridEntityType, GridEntityXMLType, ItemConfigCardType, ItemConfigTag, ItemPoolType, Keyboard, PillColor, PlayerForm, PocketItemSlot, RoomShape, SoundEffect, TrinketSlot } from "isaac-typescript-definitions";
1
+ import { ActiveSlot, CacheFlag, ControllerIndex, DoorSlot, DoorSlotFlag, GridEntityType, GridEntityXMLType, ItemConfigCardType, ItemConfigTag, ItemPoolType, Keyboard, PillColor, PlayerForm, PocketItemSlot, RoomShape, SeedEffect, SoundEffect, TrinketSlot } from "isaac-typescript-definitions";
2
2
  import { HealthType } from "../enums/HealthType";
3
3
  import { PlayerStat } from "../enums/PlayerStat";
4
4
  import { SerializationBrand } from "../enums/private/SerializationBrand";
@@ -18,6 +18,7 @@ export declare const PILL_COLOR_VALUES: readonly PillColor[];
18
18
  export declare const PLAYER_FORM_VALUES: readonly PlayerForm[];
19
19
  export declare const POCKET_ITEM_SLOT_VALUES: readonly PocketItemSlot[];
20
20
  export declare const ROOM_SHAPE_VALUES: readonly RoomShape[];
21
+ export declare const SEED_EFFECTS: readonly SeedEffect[];
21
22
  export declare const SERIALIZATION_BRAND_VALUES: readonly SerializationBrand[];
22
23
  export declare const SOUND_EFFECT_VALUES: readonly SoundEffect[];
23
24
  export declare const PLAYER_STAT_VALUES: readonly PlayerStat[];
@@ -1 +1 @@
1
- {"version":3,"file":"cachedEnumValues.d.ts","sourceRoot":"","sources":["../../../src/arrays/cachedEnumValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA6B,CAAC;AAEhF,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe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AAM,YAAY,EAAE,SAAS,UAAU,EAA8B,CAAC;AAE7E,eAAO,MAAM,0BAA0B,EAAE,SAAS,kBAAkB,EACjC,CAAC;AAEpC,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAC1B,CAAC;AAE7B,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAC1B,CAAC"}
@@ -15,6 +15,7 @@ local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
15
15
  local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
16
16
  local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
17
17
  local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
18
+ local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
18
19
  local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
19
20
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
20
21
  local ____HealthType = require("src.enums.HealthType")
@@ -41,6 +42,7 @@ ____exports.PILL_COLOR_VALUES = getEnumValues(nil, PillColor)
41
42
  ____exports.PLAYER_FORM_VALUES = getEnumValues(nil, PlayerForm)
42
43
  ____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
43
44
  ____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
45
+ ____exports.SEED_EFFECTS = getEnumValues(nil, SeedEffect)
44
46
  ____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
45
47
  ____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
46
48
  ____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
@@ -23,6 +23,13 @@ export declare function getAngelRoomDoor(): GridEntityDoor | undefined;
23
23
  * Returns undefined if the room has no Blue Womb doors.
24
24
  */
25
25
  export declare function getBlueWombDoor(): GridEntityDoor | undefined;
26
+ /**
27
+ * Helper function to get the door that leads to the Boss Rush. (In vanilla, the door will only
28
+ * appear in the Boss Room of the sixth floor.)
29
+ *
30
+ * Returns undefined if the room has no Boss Rush doors.
31
+ */
32
+ export declare function getBossRushDoor(): GridEntityDoor | undefined;
26
33
  export declare function getDevilRoomDoor(): GridEntityDoor | undefined;
27
34
  /**
28
35
  * If there is both a Devil Room and an Angel Room door, this function will return door with the
@@ -128,6 +135,11 @@ export declare function isAngelRoomDoor(door: GridEntityDoor): boolean;
128
135
  * Room.)
129
136
  */
130
137
  export declare function isBlueWombDoor(door: GridEntityDoor): boolean;
138
+ /**
139
+ * Helper function to check if the provided door is the one that leads to the Boss Rush room. (In
140
+ * vanilla, the door will only appear in the Boss Room of the sixth floor.)
141
+ */
142
+ export declare function isBossRushDoor(door: GridEntityDoor): boolean;
131
143
  export declare function isDevilRoomDoor(door: GridEntityDoor): boolean;
132
144
  /** Helper function to see if a door slot could exist for a given room shape. */
133
145
  export declare function isDoorSlotInRoomShape(doorSlot: DoorSlot, roomShape: RoomShape): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,QAAQ,EAKR,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAG3E;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GACpC,QAAQ,EAAE,CAWZ;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,G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AAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,CAK5D;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
@@ -83,17 +83,17 @@ function ____exports.getDoors(self, ...)
83
83
  do
84
84
  local door = room:GetDoor(doorSlot)
85
85
  if door == nil then
86
- goto __continue25
86
+ goto __continue27
87
87
  end
88
88
  local gridEntityType = door:GetType()
89
89
  if gridEntityType ~= GridEntityType.DOOR then
90
- goto __continue25
90
+ goto __continue27
91
91
  end
92
92
  if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
93
93
  doors[#doors + 1] = door
94
94
  end
95
95
  end
96
- ::__continue25::
96
+ ::__continue27::
97
97
  end
98
98
  return doors
99
99
  end
@@ -103,6 +103,11 @@ end
103
103
  function ____exports.isBlueWombDoor(self, door)
104
104
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
105
105
  end
106
+ --- Helper function to check if the provided door is the one that leads to the Boss Rush room. (In
107
+ -- vanilla, the door will only appear in the Boss Room of the sixth floor.)
108
+ function ____exports.isBossRushDoor(self, door)
109
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.BOSS_RUSH)
110
+ end
106
111
  --- Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
107
112
  -- (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
108
113
  function ____exports.isMegaSatanDoor(self, door)
@@ -203,6 +208,17 @@ function ____exports.getBlueWombDoor(self)
203
208
  function(____, door) return ____exports.isBlueWombDoor(nil, door) end
204
209
  )
205
210
  end
211
+ --- Helper function to get the door that leads to the Boss Rush. (In vanilla, the door will only
212
+ -- appear in the Boss Room of the sixth floor.)
213
+ --
214
+ -- Returns undefined if the room has no Boss Rush doors.
215
+ function ____exports.getBossRushDoor(self)
216
+ local doors = ____exports.getDoors(nil)
217
+ return __TS__ArrayFind(
218
+ doors,
219
+ function(____, door) return ____exports.isBossRushDoor(nil, door) end
220
+ )
221
+ end
206
222
  function ____exports.getDevilRoomDoor(self)
207
223
  local devilRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL)
208
224
  local ____temp_1
@@ -1,4 +1,7 @@
1
1
  import type { PlayerType } from "isaac-typescript-definitions";
2
+ /** Alias for the `anySeedEffectEnabled` function. */
3
+ export declare function anyEasterEggEnabled(): boolean;
4
+ export declare function anySeedEffectEnabled(): boolean;
2
5
  /**
3
6
  * Helper function to see if the current run can unlock achievements. For example, if playing on a
4
7
  * set seed or in a victory lap, achievements are disabled.
@@ -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;AAa/D;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;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;AAe/D,qDAAqD;AACrD,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAO9C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;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,8 +1,13 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__ArraySome = ____lualib.__TS__ArraySome
1
3
  local ____exports = {}
2
4
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
5
  local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
4
6
  local Difficulty = ____isaac_2Dtypescript_2Ddefinitions.Difficulty
7
+ local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
5
8
  local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
9
+ local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
10
+ local SEED_EFFECTS = ____cachedEnumValues.SEED_EFFECTS
6
11
  local ____cachedClasses = require("src.core.cachedClasses")
7
12
  local game = ____cachedClasses.game
8
13
  local ____constants = require("src.core.constants")
@@ -15,6 +20,17 @@ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
15
20
  local spawnSlot = ____entitiesSpecific.spawnSlot
16
21
  local ____log = require("src.functions.log")
17
22
  local log = ____log.log
23
+ function ____exports.anySeedEffectEnabled(self)
24
+ local seeds = game:GetSeeds()
25
+ return __TS__ArraySome(
26
+ SEED_EFFECTS,
27
+ function(____, seedEffect) return seedEffect ~= SeedEffect.NORMAL and seeds:HasSeedEffect(seedEffect) end
28
+ )
29
+ end
30
+ --- Alias for the `anySeedEffectEnabled` function.
31
+ function ____exports.anyEasterEggEnabled(self)
32
+ return ____exports.anySeedEffectEnabled(nil)
33
+ end
18
34
  --- Helper function to see if the current run can unlock achievements. For example, if playing on a
19
35
  -- set seed or in a victory lap, achievements are disabled.
20
36
  function ____exports.canRunUnlockAchievements(self)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "47.1.0",
3
+ "version": "47.3.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -16,6 +16,7 @@ import {
16
16
  PlayerForm,
17
17
  PocketItemSlot,
18
18
  RoomShape,
19
+ SeedEffect,
19
20
  SoundEffect,
20
21
  TrinketSlot,
21
22
  } from "isaac-typescript-definitions";
@@ -67,6 +68,8 @@ export const POCKET_ITEM_SLOT_VALUES: readonly PocketItemSlot[] =
67
68
 
68
69
  export const ROOM_SHAPE_VALUES: readonly RoomShape[] = getEnumValues(RoomShape);
69
70
 
71
+ export const SEED_EFFECTS: readonly SeedEffect[] = getEnumValues(SeedEffect);
72
+
70
73
  export const SERIALIZATION_BRAND_VALUES: readonly SerializationBrand[] =
71
74
  getEnumValues(SerializationBrand);
72
75
 
@@ -115,6 +115,17 @@ export function getBlueWombDoor(): GridEntityDoor | undefined {
115
115
  return doors.find((door) => isBlueWombDoor(door));
116
116
  }
117
117
 
118
+ /**
119
+ * Helper function to get the door that leads to the Boss Rush. (In vanilla, the door will only
120
+ * appear in the Boss Room of the sixth floor.)
121
+ *
122
+ * Returns undefined if the room has no Boss Rush doors.
123
+ */
124
+ export function getBossRushDoor(): GridEntityDoor | undefined {
125
+ const doors = getDoors();
126
+ return doors.find((door) => isBossRushDoor(door));
127
+ }
128
+
118
129
  export function getDevilRoomDoor(): GridEntityDoor | undefined {
119
130
  const devilRoomDoors = getDoors(RoomType.DEVIL);
120
131
  return devilRoomDoors.length === 0 ? undefined : devilRoomDoors[0];
@@ -365,6 +376,14 @@ export function isBlueWombDoor(door: GridEntityDoor): boolean {
365
376
  return door.TargetRoomIndex === asNumber(GridRoom.BLUE_WOMB);
366
377
  }
367
378
 
379
+ /**
380
+ * Helper function to check if the provided door is the one that leads to the Boss Rush room. (In
381
+ * vanilla, the door will only appear in the Boss Room of the sixth floor.)
382
+ */
383
+ export function isBossRushDoor(door: GridEntityDoor): boolean {
384
+ return door.TargetRoomIndex === asNumber(GridRoom.BOSS_RUSH);
385
+ }
386
+
368
387
  export function isDevilRoomDoor(door: GridEntityDoor): boolean {
369
388
  return door.TargetRoomType === RoomType.DEVIL;
370
389
  }
@@ -2,8 +2,10 @@ import type { PlayerType } from "isaac-typescript-definitions";
2
2
  import {
3
3
  Challenge,
4
4
  Difficulty,
5
+ SeedEffect,
5
6
  SlotVariant,
6
7
  } from "isaac-typescript-definitions";
8
+ import { SEED_EFFECTS } from "../arrays/cachedEnumValues";
7
9
  import { game } from "../core/cachedClasses";
8
10
  import { VectorZero } from "../core/constants";
9
11
  import { FIRST_CHARACTER } from "../core/constantsFirstLast";
@@ -11,6 +13,20 @@ import { getCharacterName } from "./characters";
11
13
  import { spawnSlot } from "./entitiesSpecific";
12
14
  import { log } from "./log";
13
15
 
16
+ /** Alias for the `anySeedEffectEnabled` function. */
17
+ export function anyEasterEggEnabled(): boolean {
18
+ return anySeedEffectEnabled();
19
+ }
20
+
21
+ export function anySeedEffectEnabled(): boolean {
22
+ const seeds = game.GetSeeds();
23
+
24
+ return SEED_EFFECTS.some(
25
+ (seedEffect) =>
26
+ seedEffect !== SeedEffect.NORMAL && seeds.HasSeedEffect(seedEffect),
27
+ );
28
+ }
29
+
14
30
  /**
15
31
  * Helper function to see if the current run can unlock achievements. For example, if playing on a
16
32
  * set seed or in a victory lap, achievements are disabled.