isaacscript-common 1.0.450 → 1.0.454

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.
@@ -5,6 +5,7 @@ local ____exports = require("features.saveDataManager.exports")
5
5
  local saveDataManager = ____exports.saveDataManager
6
6
  local ____player = require("functions.player")
7
7
  local getPlayers = ____player.getPlayers
8
+ local isTaintedLazarus = ____player.isTaintedLazarus
8
9
  local postFirstFlip = require("callbacks.subscriptions.postFirstFlip")
9
10
  local postFlip = require("callbacks.subscriptions.postFlip")
10
11
  function hasSubscriptions(self)
@@ -14,6 +15,9 @@ function useItemFlip(self, _collectibleType, _rng, player, _useFlags, _activeSlo
14
15
  if not hasSubscriptions(nil) then
15
16
  return
16
17
  end
18
+ if not isTaintedLazarus(nil, player) then
19
+ return
20
+ end
17
21
  local newLazarus = getNewLazarus(nil, player)
18
22
  if not v.run.usedFlipAtLeastOnce then
19
23
  v.run.usedFlipAtLeastOnce = true
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
7
7
  /** Bombs explode when their frame count is equal to this value. */
8
- export declare const BOMB_EXPLODE_FRAME = 51;
8
+ export declare const BOMB_EXPLODE_FRAME = 45;
9
9
  export declare const CHARACTERS_WITH_NO_RED_HEARTS: Set<PlayerType>;
10
10
  /** This is also the distance that a player spawns from the door that they enter a room from. */
11
11
  export declare const DISTANCE_OF_GRID_TILE = 40;
@@ -2,7 +2,7 @@
2
2
  require("lualib_bundle");
3
3
  local ____exports = {}
4
4
  ____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
5
- ____exports.BOMB_EXPLODE_FRAME = 51
5
+ ____exports.BOMB_EXPLODE_FRAME = 45
6
6
  ____exports.CHARACTERS_WITH_NO_RED_HEARTS = __TS__New(Set, {PlayerType.PLAYER_BLUEBABY, PlayerType.PLAYER_BLACKJUDAS, PlayerType.PLAYER_JUDAS_B, PlayerType.PLAYER_BLUEBABY_B, PlayerType.PLAYER_THEFORGOTTEN_B, PlayerType.PLAYER_BETHANY_B})
7
7
  ____exports.DISTANCE_OF_GRID_TILE = 40
8
8
  ____exports.DOOR_HITBOX_DISTANCE = 11
@@ -32,6 +32,11 @@ export declare function getMaxCollectibleID(): int;
32
32
  * in secret rooms and I AM ERROR rooms if the "Corrupted Data" achievement is unlocked.
33
33
  */
34
34
  export declare function isGlitchedCollectible(entity: Entity): boolean;
35
+ /**
36
+ * Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or
37
+ * `ItemType.ITEM_FAMILIAR`.
38
+ */
39
+ export declare function isPassiveCollectible(collectibleType: CollectibleType | int): boolean;
35
40
  export declare function isQuestCollectible(collectibleType: CollectibleType | int): boolean;
36
41
  export declare function removeAllCollectibles(): void;
37
42
  /**
@@ -116,6 +116,10 @@ end
116
116
  function ____exports.isGlitchedCollectible(self, entity)
117
117
  return ((entity.Type == EntityType.ENTITY_PICKUP) and (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE)) and (entity.SubType > GLITCHED_ITEM_THRESHOLD)
118
118
  end
119
+ function ____exports.isPassiveCollectible(self, collectibleType)
120
+ local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
121
+ return (itemType == ItemType.ITEM_PASSIVE) or (itemType == ItemType.ITEM_FAMILIAR)
122
+ end
119
123
  function ____exports.isQuestCollectible(self, collectibleType)
120
124
  return ____exports.collectibleHasTag(nil, collectibleType, 32768)
121
125
  end
@@ -184,7 +184,10 @@ export declare function isJacobOrEsau(player: EntityPlayer): boolean;
184
184
  * where you want to know if the health is coin hearts, for example.
185
185
  */
186
186
  export declare function isKeeper(player: EntityPlayer): boolean;
187
+ /** Helper function for detecting when a player is The Lost or Tainted Lost. */
187
188
  export declare function isLost(player: EntityPlayer): boolean;
189
+ /** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
190
+ export declare function isTaintedLazarus(player: EntityPlayer): boolean;
188
191
  export declare function removeCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
189
192
  /**
190
193
  * Helper function to remove the Dead Eye multiplier from a player.
@@ -400,6 +400,10 @@ function ____exports.isLost(self, player)
400
400
  local character = player:GetPlayerType()
401
401
  return (character == PlayerType.PLAYER_THELOST) or (character == PlayerType.PLAYER_THELOST_B)
402
402
  end
403
+ function ____exports.isTaintedLazarus(self, player)
404
+ local character = player:GetPlayerType()
405
+ return (character == PlayerType.PLAYER_LAZARUS_B) or (character == PlayerType.PLAYER_LAZARUS2_B)
406
+ end
403
407
  function ____exports.removeCollectibleCostume(self, player, collectibleType)
404
408
  local itemConfig = Isaac.GetItemConfig()
405
409
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
@@ -1,8 +1,9 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  /**
3
3
  * Helper function to get a room position that is not overlapping with a grid entity, a heaven door,
4
- * or a player. The `Room.FindFreePickupSpawnPosition()` function will return locations that are
5
- * overlap with heaven doors and players, so use this function instead if you want to account for
6
- * those specific situations.
4
+ * or a player. The `Room.FindFreePickupSpawnPosition()` function will return locations that overlap
5
+ * with heaven doors and partially overlap with players, if the thing being spawned is bigger than a
6
+ * tile (like a Blood Donation Machine). Use this function instead if you want to account for those
7
+ * specific situations.
7
8
  */
8
9
  export declare function findFreePosition(startingPosition: Vector): Vector;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.450",
3
+ "version": "1.0.454",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",