isaacscript-common 33.10.0 → 33.11.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.
package/dist/index.rollup.d.ts
CHANGED
|
@@ -8600,6 +8600,15 @@ export declare function isMinibossRoomOf(roomData: RoomConfig, minibossID: Minib
|
|
|
8600
8600
|
*/
|
|
8601
8601
|
export declare function isMirrorRoom(roomData: RoomConfig): boolean;
|
|
8602
8602
|
|
|
8603
|
+
/**
|
|
8604
|
+
* Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
|
|
8605
|
+
* ground, a wall, or a grid entity.
|
|
8606
|
+
*
|
|
8607
|
+
* Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
|
|
8608
|
+
* die if they hit an enemy, but they will die if they hit a wall or object.)
|
|
8609
|
+
*/
|
|
8610
|
+
export declare function isMissedTear(tear: EntityTear): boolean;
|
|
8611
|
+
|
|
8603
8612
|
/** Returns true for any card or rune added by a mod. */
|
|
8604
8613
|
export declare function isModdedCardType(cardType: CardType): boolean;
|
|
8605
8614
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 33.
|
|
3
|
+
isaacscript-common 33.11.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -30871,6 +30871,9 @@ function ____exports.addTearsStat(self, player, tearsStat)
|
|
|
30871
30871
|
local newMaxFireDelay = ____exports.getFireDelay(nil, newTearsStat)
|
|
30872
30872
|
player.MaxFireDelay = newMaxFireDelay
|
|
30873
30873
|
end
|
|
30874
|
+
function ____exports.isMissedTear(self, tear)
|
|
30875
|
+
return tear:IsDead()
|
|
30876
|
+
end
|
|
30874
30877
|
function ____exports.isTearFromFamiliar(self, tear, familiarVariant, subType)
|
|
30875
30878
|
if tear.FrameCount == 0 then
|
|
30876
30879
|
error("Failed to check if the given tear was from a player since the tear's frame count was equal to 0. (The \"isTearFromFamiliar\" function must only be used in the \"POST_TEAR_INIT_VERY_LATE\" callback or on frame 1 and onwards.)")
|
|
@@ -31,6 +31,14 @@ export declare function getFireDelay(tearsStat: float): float;
|
|
|
31
31
|
* this function.
|
|
32
32
|
*/
|
|
33
33
|
export declare function getTearsStat(fireDelay: float): float;
|
|
34
|
+
/**
|
|
35
|
+
* Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
|
|
36
|
+
* ground, a wall, or a grid entity.
|
|
37
|
+
*
|
|
38
|
+
* Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
|
|
39
|
+
* die if they hit an enemy, but they will die if they hit a wall or object.)
|
|
40
|
+
*/
|
|
41
|
+
export declare function isMissedTear(tear: EntityTear): boolean;
|
|
34
42
|
/**
|
|
35
43
|
* Helper function to check if a given tear is from a familiar (as opposed to e.g. a player). This
|
|
36
44
|
* is determined by looking at the parent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../../src/functions/tears.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,EAChB,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAuBT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAgB1D"}
|
|
1
|
+
{"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../../src/functions/tears.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,EAChB,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAuBT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAgB1D"}
|
|
@@ -34,6 +34,14 @@ function ____exports.addTearsStat(self, player, tearsStat)
|
|
|
34
34
|
local newMaxFireDelay = ____exports.getFireDelay(nil, newTearsStat)
|
|
35
35
|
player.MaxFireDelay = newMaxFireDelay
|
|
36
36
|
end
|
|
37
|
+
--- Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
|
|
38
|
+
-- ground, a wall, or a grid entity.
|
|
39
|
+
--
|
|
40
|
+
-- Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
|
|
41
|
+
-- die if they hit an enemy, but they will die if they hit a wall or object.)
|
|
42
|
+
function ____exports.isMissedTear(self, tear)
|
|
43
|
+
return tear:IsDead()
|
|
44
|
+
end
|
|
37
45
|
--- Helper function to check if a given tear is from a familiar (as opposed to e.g. a player). This
|
|
38
46
|
-- is determined by looking at the parent.
|
|
39
47
|
--
|
package/package.json
CHANGED
package/src/functions/tears.ts
CHANGED
|
@@ -44,6 +44,17 @@ export function getTearsStat(fireDelay: float): float {
|
|
|
44
44
|
return 30 / (fireDelay + 1);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
|
|
49
|
+
* ground, a wall, or a grid entity.
|
|
50
|
+
*
|
|
51
|
+
* Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
|
|
52
|
+
* die if they hit an enemy, but they will die if they hit a wall or object.)
|
|
53
|
+
*/
|
|
54
|
+
export function isMissedTear(tear: EntityTear): boolean {
|
|
55
|
+
return tear.IsDead();
|
|
56
|
+
}
|
|
57
|
+
|
|
47
58
|
/**
|
|
48
59
|
* Helper function to check if a given tear is from a familiar (as opposed to e.g. a player). This
|
|
49
60
|
* is determined by looking at the parent.
|