isaacscript-common 9.7.0 → 9.8.2

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.
@@ -1,5 +1,14 @@
1
1
  const v = {
2
2
  persistent: {
3
+ darkness: false, // 1
4
+ labyrinth: false, // 2
5
+ lost: false, // 3
6
+ unknown: false, // 4
7
+ cursed: false, // 5
8
+ maze: false, // 6
9
+ blind: false, // 7
10
+ giant: false, // 8
11
+
3
12
  disableCurses: false,
4
13
  },
5
14
 
@@ -203,13 +203,13 @@ function getChargesToAddWithAAAModifier(
203
203
  * - The Battery
204
204
  * - AAA Battery
205
205
  *
206
- * @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
207
- * 1x1 room for the purposes of calculating how much charge to
208
- * grant. Default is false.
206
+ * @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
207
+ * room for the purposes of calculating how much charge to grant. Default
208
+ * is true.
209
209
  */
210
- export function addRoomClearCharges(ignoreBigRoomDoubleCharge = false): void {
210
+ export function addRoomClearCharges(bigRoomDoubleCharge = true): void {
211
211
  for (const player of getPlayers()) {
212
- addRoomClearCharge(player, ignoreBigRoomDoubleCharge);
212
+ addRoomClearCharge(player, bigRoomDoubleCharge);
213
213
  }
214
214
  }
215
215
 
@@ -97,6 +97,17 @@ export function getAngelRoomDoor(): GridEntityDoor | undefined {
97
97
  return angelRoomDoors.length === 0 ? undefined : angelRoomDoors[0];
98
98
  }
99
99
 
100
+ /**
101
+ * Helper function to get the door that leads to the off-grid room that contains the hole to the
102
+ * Blue Womb.
103
+ *
104
+ * Returns undefined if the room has no Blue Womb doors.
105
+ */
106
+ export function getBlueWombDoor(): GridEntityDoor | undefined {
107
+ const doors = getDoors();
108
+ return doors.find((door) => isBlueWombDoor(door));
109
+ }
110
+
100
111
  export function getDevilRoomDoor(): GridEntityDoor | undefined {
101
112
  const devilRoomDoors = getDoors(RoomType.DEVIL);
102
113
  return devilRoomDoors.length === 0 ? undefined : devilRoomDoors[0];
@@ -262,6 +273,10 @@ export function isAngelRoomDoor(door: GridEntityDoor): boolean {
262
273
  return door.TargetRoomType === RoomType.ANGEL;
263
274
  }
264
275
 
276
+ export function isBlueWombDoor(door: GridEntityDoor): boolean {
277
+ return door.TargetRoomIndex === asNumber(GridRoom.BLUE_WOMB);
278
+ }
279
+
265
280
  export function isDevilRoomDoor(door: GridEntityDoor): boolean {
266
281
  return door.TargetRoomType === RoomType.DEVIL;
267
282
  }
@@ -282,6 +282,8 @@ export function logProjectileFlags(
282
282
 
283
283
  /** Helper function for logging information about the current room. */
284
284
  export function logRoom(this: void): void {
285
+ const room = game.GetRoom();
286
+ const bossID = room.GetBossID();
285
287
  const roomGridIndex = getRoomGridIndex();
286
288
  const roomListIndex = getRoomListIndex();
287
289
  const roomData = getRoomData();
@@ -306,6 +308,7 @@ export function logRoom(this: void): void {
306
308
  }
307
309
 
308
310
  log(`Current room list index: ${roomListIndex}`);
311
+ log(`Current room boss ID: ${bossID}`);
309
312
  }
310
313
 
311
314
  /**