isaacscript-common 75.1.0 → 75.2.1
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/functions/characters.d.ts +9 -1
- package/dist/functions/characters.d.ts.map +1 -1
- package/dist/functions/characters.lua +6 -0
- package/dist/functions/logMisc.d.ts.map +1 -1
- package/dist/functions/logMisc.lua +2 -1
- package/dist/functions/playerEffects.d.ts +21 -0
- package/dist/functions/playerEffects.d.ts.map +1 -0
- package/dist/functions/playerEffects.lua +71 -0
- package/dist/functions/players.d.ts +4 -13
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +4 -51
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +8 -0
- package/dist/index.rollup.d.ts +22 -2
- package/dist/indexLua.d.ts +1 -0
- package/dist/indexLua.d.ts.map +1 -1
- package/dist/indexLua.lua +8 -0
- package/dist/isaacscript-common.lua +102 -53
- package/package.json +1 -1
- package/src/functions/characters.ts +9 -1
- package/src/functions/logMisc.ts +2 -1
- package/src/functions/playerEffects.ts +73 -0
- package/src/functions/players.ts +4 -52
- package/src/index.ts +1 -0
|
@@ -31,7 +31,15 @@ export declare function characterGetsBlackHeartFromEternalHeart(character: Playe
|
|
|
31
31
|
* is considered to starts with the D6, but this is not the case on a brand new save file).
|
|
32
32
|
*/
|
|
33
33
|
export declare function characterStartsWithActiveItem(character: PlayerType): boolean;
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Helper function to get the numerical damage multiplier for a character.
|
|
36
|
+
*
|
|
37
|
+
* @param character The character to get.
|
|
38
|
+
* @param hasWhoreOfBabylon Optional. Whether the character has the Whore of Babylon effect
|
|
39
|
+
* currently active. Defaults to false. This is necessary because Eve's
|
|
40
|
+
* damage multiplier changes from 0.75 to 1 when she has Whore of Babylon
|
|
41
|
+
* active.
|
|
42
|
+
*/
|
|
35
43
|
export declare function getCharacterDamageMultiplier(character: PlayerType, hasWhoreOfBabylon?: boolean): float;
|
|
36
44
|
/**
|
|
37
45
|
* - Most characters have a 56 frame death animation (i.e. the "Death" animation).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../../src/functions/characters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAqB1D;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE7E;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CACrD,SAAS,EAAE,UAAU,GACpB,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE5E;AAED
|
|
1
|
+
{"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../../src/functions/characters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAqB1D;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE7E;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CACrD,SAAS,EAAE,UAAU,GACpB,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,UAAU,EACrB,iBAAiB,UAAQ,GACxB,KAAK,CAMP;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAU5E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAsBzE;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAM9D;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAG3E;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,UAAU,GACpB,SAAS,eAAe,EAAE,CAE5B;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,UAAU,GACpB,WAAW,GAAG,SAAS,CAEzB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEhE;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEjE"}
|
|
@@ -73,6 +73,12 @@ function ____exports.characterStartsWithActiveItem(self, character)
|
|
|
73
73
|
return CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET:has(character)
|
|
74
74
|
end
|
|
75
75
|
--- Helper function to get the numerical damage multiplier for a character.
|
|
76
|
+
--
|
|
77
|
+
-- @param character The character to get.
|
|
78
|
+
-- @param hasWhoreOfBabylon Optional. Whether the character has the Whore of Babylon effect
|
|
79
|
+
-- currently active. Defaults to false. This is necessary because Eve's
|
|
80
|
+
-- damage multiplier changes from 0.75 to 1 when she has Whore of Babylon
|
|
81
|
+
-- active.
|
|
76
82
|
function ____exports.getCharacterDamageMultiplier(self, character, hasWhoreOfBabylon)
|
|
77
83
|
if hasWhoreOfBabylon == nil then
|
|
78
84
|
hasWhoreOfBabylon = false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logMisc.d.ts","sourceRoot":"","sources":["../../src/functions/logMisc.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EAMV,cAAc,EAId,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"logMisc.d.ts","sourceRoot":"","sources":["../../src/functions/logMisc.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EAMV,cAAc,EAId,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAwBtC;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,EACzB,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAaN;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAE,EAChE,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAaN;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAQt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AE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACnB,IAAI,CAgCN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAkBhE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EACpD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACrB,IAAI,CAqBN;AAED,wFAAwF;AACxF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GACvC,IAAI,CAEN;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACpC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAoB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,UAAQ,GACZ,IAAI,CAON"}
|
|
@@ -49,10 +49,11 @@ local ____itemPool = require("functions.itemPool")
|
|
|
49
49
|
local getItemPoolName = ____itemPool.getItemPoolName
|
|
50
50
|
local ____log = require("functions.log")
|
|
51
51
|
local log = ____log.log
|
|
52
|
+
local ____playerEffects = require("functions.playerEffects")
|
|
53
|
+
local getEffectsList = ____playerEffects.getEffectsList
|
|
52
54
|
local ____playerHealth = require("functions.playerHealth")
|
|
53
55
|
local getPlayerHealth = ____playerHealth.getPlayerHealth
|
|
54
56
|
local ____players = require("functions.players")
|
|
55
|
-
local getEffectsList = ____players.getEffectsList
|
|
56
57
|
local getPlayerName = ____players.getPlayerName
|
|
57
58
|
local ____roomData = require("functions.roomData")
|
|
58
59
|
local getRoomData = ____roomData.getRoomData
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CollectibleType, NullItemID, TrinketType } from "isaac-typescript-definitions";
|
|
2
|
+
/** Helper function to check to see if any player has a temporary collectible effect. */
|
|
3
|
+
export declare function anyPlayerHasCollectibleEffect(collectibleType: CollectibleType): boolean;
|
|
4
|
+
/** Helper function to check to see if any player has a temporary null effect. */
|
|
5
|
+
export declare function anyPlayerHasNullEffect(nullItemID: NullItemID): boolean;
|
|
6
|
+
/** Helper function to check to see if any player has a temporary trinket effect. */
|
|
7
|
+
export declare function anyPlayerHasTrinketEffect(trinketType: TrinketType): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
10
|
+
* don't have to manually create an array from an `EffectsList` object.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getEffectsList(player: EntityPlayer): TemporaryEffect[];
|
|
13
|
+
/**
|
|
14
|
+
* Helper function to check if a player should have Whore of Babylon active at their current health
|
|
15
|
+
* level.
|
|
16
|
+
*
|
|
17
|
+
* - For most characters, Whore of Babylon activates when the red hearts are at 1/2 or less.
|
|
18
|
+
* - For Eve, Whore of Babylon activates when the red hearts are at 1 or less.
|
|
19
|
+
*/
|
|
20
|
+
export declare function shouldWhoreOfBabylonBeActive(player: EntityPlayer): boolean;
|
|
21
|
+
//# sourceMappingURL=playerEffects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playerEffects.d.ts","sourceRoot":"","sources":["../../src/functions/playerEffects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAKtC,wFAAwF;AACxF,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,eAAe,GAC/B,OAAO,CAOT;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAOtE;AAED,oFAAoF;AACpF,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAO3E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,EAAE,CAatE;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAK1E"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
6
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
7
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
8
|
+
local ____players = require("functions.players")
|
|
9
|
+
local isCharacter = ____players.isCharacter
|
|
10
|
+
--- Helper function to check to see if any player has a temporary collectible effect.
|
|
11
|
+
function ____exports.anyPlayerHasCollectibleEffect(self, collectibleType)
|
|
12
|
+
local players = getAllPlayers(nil)
|
|
13
|
+
return __TS__ArraySome(
|
|
14
|
+
players,
|
|
15
|
+
function(____, player)
|
|
16
|
+
local effects = player:GetEffects()
|
|
17
|
+
return effects:HasCollectibleEffect(collectibleType)
|
|
18
|
+
end
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
--- Helper function to check to see if any player has a temporary null effect.
|
|
22
|
+
function ____exports.anyPlayerHasNullEffect(self, nullItemID)
|
|
23
|
+
local players = getAllPlayers(nil)
|
|
24
|
+
return __TS__ArraySome(
|
|
25
|
+
players,
|
|
26
|
+
function(____, player)
|
|
27
|
+
local effects = player:GetEffects()
|
|
28
|
+
return effects:HasNullEffect(nullItemID)
|
|
29
|
+
end
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
--- Helper function to check to see if any player has a temporary trinket effect.
|
|
33
|
+
function ____exports.anyPlayerHasTrinketEffect(self, trinketType)
|
|
34
|
+
local players = getAllPlayers(nil)
|
|
35
|
+
return __TS__ArraySome(
|
|
36
|
+
players,
|
|
37
|
+
function(____, player)
|
|
38
|
+
local effects = player:GetEffects()
|
|
39
|
+
return effects:HasTrinketEffect(trinketType)
|
|
40
|
+
end
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
--- Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
44
|
+
-- don't have to manually create an array from an `EffectsList` object.
|
|
45
|
+
function ____exports.getEffectsList(self, player)
|
|
46
|
+
local effects = player:GetEffects()
|
|
47
|
+
local effectsList = effects:GetEffectsList()
|
|
48
|
+
local effectArray = {}
|
|
49
|
+
do
|
|
50
|
+
local i = 0
|
|
51
|
+
while i < effectsList.Size do
|
|
52
|
+
local effect = effectsList:Get(i)
|
|
53
|
+
if effect ~= nil then
|
|
54
|
+
effectArray[#effectArray + 1] = effect
|
|
55
|
+
end
|
|
56
|
+
i = i + 1
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
return effectArray
|
|
60
|
+
end
|
|
61
|
+
--- Helper function to check if a player should have Whore of Babylon active at their current health
|
|
62
|
+
-- level.
|
|
63
|
+
--
|
|
64
|
+
-- - For most characters, Whore of Babylon activates when the red hearts are at 1/2 or less.
|
|
65
|
+
-- - For Eve, Whore of Babylon activates when the red hearts are at 1 or less.
|
|
66
|
+
function ____exports.shouldWhoreOfBabylonBeActive(self, player)
|
|
67
|
+
local redHearts = player:GetHearts()
|
|
68
|
+
local threshold = isCharacter(nil, player, PlayerType.EVE) and 2 or 1
|
|
69
|
+
return redHearts <= threshold
|
|
70
|
+
end
|
|
71
|
+
return ____exports
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CollectibleType, ControllerIndex, NullItemID, PlayerForm, PlayerType } from "isaac-typescript-definitions";
|
|
3
|
-
/** Helper function to check to see if any player has a temporary collectible effect. */
|
|
4
|
-
export declare function anyPlayerHasCollectibleEffect(collectibleType: CollectibleType): boolean;
|
|
5
|
-
/** Helper function to check to see if any player has a temporary null effect. */
|
|
6
|
-
export declare function anyPlayerHasNullEffect(nullItemID: NullItemID): boolean;
|
|
7
|
-
/** Helper function to check to see if any player has a temporary trinket effect. */
|
|
8
|
-
export declare function anyPlayerHasTrinketEffect(trinketType: TrinketType): boolean;
|
|
1
|
+
import { ControllerIndex, PlayerForm, PlayerType } from "isaac-typescript-definitions";
|
|
9
2
|
/**
|
|
10
3
|
* Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
11
4
|
* activation, a poop from IBS, etc.).
|
|
@@ -35,6 +28,9 @@ export declare function canPlayerCrushRocks(player: EntityPlayer): boolean;
|
|
|
35
28
|
* If the player does not have an item currently queued, then this function will be a no-op.
|
|
36
29
|
*
|
|
37
30
|
* Returns whether an item was actually dequeued.
|
|
31
|
+
*
|
|
32
|
+
* Under the hood, this clones the `QueuedItemData`, since directly setting the `Item` field to
|
|
33
|
+
* `undefined` does not work for some reason.
|
|
38
34
|
*/
|
|
39
35
|
export declare function dequeueItem(player: EntityPlayer): boolean;
|
|
40
36
|
/**
|
|
@@ -52,11 +48,6 @@ export declare function getCharacters(): PlayerType[];
|
|
|
52
48
|
* Keeper).
|
|
53
49
|
*/
|
|
54
50
|
export declare function getClosestPlayer(position: Vector): EntityPlayer;
|
|
55
|
-
/**
|
|
56
|
-
* Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
57
|
-
* don't have to manually create an array from an `EffectsList` object.
|
|
58
|
-
*/
|
|
59
|
-
export declare function getEffectsList(player: EntityPlayer): TemporaryEffect[];
|
|
60
51
|
/**
|
|
61
52
|
* Helper function to return the player with the highest ID, according to the `Isaac.GetPlayer`
|
|
62
53
|
* method.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EAEf,UAAU,EACV,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAatC;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAKxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAWzD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,kBAAkB,EAAE,YAAY,GAAG,KAAK,GACvC,KAAK,CAMP;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,IAAI,UAAU,EAAE,CAG5C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAe/D;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,YAAY,CAU7C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAa9C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,KAAK,GACd,YAAY,GAAG,SAAS,CAM1B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CA0B5E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,GACnB,YAAY,GAAG,SAAS,CAO1B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,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YAAY,GAAG,OAAO,CAG3D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAGtD;AAED,+EAA+E;AAC/E,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAGpD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE/D;AAED,kFAAkF;AAClF,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAMvD;AAED,8FAA8F;AAC9F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAM9D;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAG7D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN"}
|
|
@@ -47,39 +47,6 @@ function ____exports.isVanillaPlayer(self, player)
|
|
|
47
47
|
local character = player:GetPlayerType()
|
|
48
48
|
return isVanillaCharacter(nil, character)
|
|
49
49
|
end
|
|
50
|
-
--- Helper function to check to see if any player has a temporary collectible effect.
|
|
51
|
-
function ____exports.anyPlayerHasCollectibleEffect(self, collectibleType)
|
|
52
|
-
local players = getAllPlayers(nil)
|
|
53
|
-
return __TS__ArraySome(
|
|
54
|
-
players,
|
|
55
|
-
function(____, player)
|
|
56
|
-
local effects = player:GetEffects()
|
|
57
|
-
return effects:HasCollectibleEffect(collectibleType)
|
|
58
|
-
end
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
--- Helper function to check to see if any player has a temporary null effect.
|
|
62
|
-
function ____exports.anyPlayerHasNullEffect(self, nullItemID)
|
|
63
|
-
local players = getAllPlayers(nil)
|
|
64
|
-
return __TS__ArraySome(
|
|
65
|
-
players,
|
|
66
|
-
function(____, player)
|
|
67
|
-
local effects = player:GetEffects()
|
|
68
|
-
return effects:HasNullEffect(nullItemID)
|
|
69
|
-
end
|
|
70
|
-
)
|
|
71
|
-
end
|
|
72
|
-
--- Helper function to check to see if any player has a temporary trinket effect.
|
|
73
|
-
function ____exports.anyPlayerHasTrinketEffect(self, trinketType)
|
|
74
|
-
local players = getAllPlayers(nil)
|
|
75
|
-
return __TS__ArraySome(
|
|
76
|
-
players,
|
|
77
|
-
function(____, player)
|
|
78
|
-
local effects = player:GetEffects()
|
|
79
|
-
return effects:HasTrinketEffect(trinketType)
|
|
80
|
-
end
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
50
|
--- Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
84
51
|
-- activation, a poop from IBS, etc.).
|
|
85
52
|
function ____exports.anyPlayerHoldingItem(self)
|
|
@@ -119,6 +86,9 @@ end
|
|
|
119
86
|
-- If the player does not have an item currently queued, then this function will be a no-op.
|
|
120
87
|
--
|
|
121
88
|
-- Returns whether an item was actually dequeued.
|
|
89
|
+
--
|
|
90
|
+
-- Under the hood, this clones the `QueuedItemData`, since directly setting the `Item` field to
|
|
91
|
+
-- `undefined` does not work for some reason.
|
|
122
92
|
function ____exports.dequeueItem(self, player)
|
|
123
93
|
if player.QueuedItem.Item == nil then
|
|
124
94
|
return false
|
|
@@ -152,24 +122,6 @@ function ____exports.getClosestPlayer(self, position)
|
|
|
152
122
|
assertDefined(nil, closestPlayer, "Failed to find the closest player.")
|
|
153
123
|
return closestPlayer
|
|
154
124
|
end
|
|
155
|
-
--- Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
156
|
-
-- don't have to manually create an array from an `EffectsList` object.
|
|
157
|
-
function ____exports.getEffectsList(self, player)
|
|
158
|
-
local effects = player:GetEffects()
|
|
159
|
-
local effectsList = effects:GetEffectsList()
|
|
160
|
-
local effectArray = {}
|
|
161
|
-
do
|
|
162
|
-
local i = 0
|
|
163
|
-
while i < effectsList.Size do
|
|
164
|
-
local effect = effectsList:Get(i)
|
|
165
|
-
if effect ~= nil then
|
|
166
|
-
effectArray[#effectArray + 1] = effect
|
|
167
|
-
end
|
|
168
|
-
i = i + 1
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
return effectArray
|
|
172
|
-
end
|
|
173
125
|
--- Helper function to return the player with the highest ID, according to the `Isaac.GetPlayer`
|
|
174
126
|
-- method.
|
|
175
127
|
function ____exports.getFinalPlayer(self)
|
|
@@ -373,6 +325,7 @@ function ____exports.isEden(self, player)
|
|
|
373
325
|
local character = player:GetPlayerType()
|
|
374
326
|
return character == PlayerType.EDEN or character == PlayerType.EDEN_B
|
|
375
327
|
end
|
|
328
|
+
--- Not exported since end-users should use the `isTainted` helper function directly.
|
|
376
329
|
local function isTaintedModded(self, player)
|
|
377
330
|
local character = player:GetPlayerType()
|
|
378
331
|
local name = player:GetName()
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from "./functions/pills";
|
|
|
90
90
|
export * from "./functions/playerCenter";
|
|
91
91
|
export * from "./functions/playerCollectibles";
|
|
92
92
|
export * from "./functions/playerDataStructures";
|
|
93
|
+
export * from "./functions/playerEffects";
|
|
93
94
|
export * from "./functions/playerHealth";
|
|
94
95
|
export * from "./functions/playerIndex";
|
|
95
96
|
export * from "./functions/playerTrinkets";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,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BAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.lua
CHANGED
|
@@ -735,6 +735,14 @@ do
|
|
|
735
735
|
end
|
|
736
736
|
end
|
|
737
737
|
end
|
|
738
|
+
do
|
|
739
|
+
local ____export = require("functions.playerEffects")
|
|
740
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
741
|
+
if ____exportKey ~= "default" then
|
|
742
|
+
____exports[____exportKey] = ____exportValue
|
|
743
|
+
end
|
|
744
|
+
end
|
|
745
|
+
end
|
|
738
746
|
do
|
|
739
747
|
local ____export = require("functions.playerHealth")
|
|
740
748
|
for ____exportKey, ____exportValue in pairs(____export) do
|
package/dist/index.rollup.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ import type { MinibossID } from 'isaac-typescript-definitions';
|
|
|
54
54
|
import { ModCallback } from 'isaac-typescript-definitions';
|
|
55
55
|
import type { Music } from 'isaac-typescript-definitions';
|
|
56
56
|
import type { NPCState } from 'isaac-typescript-definitions';
|
|
57
|
-
import { NullItemID } from 'isaac-typescript-definitions';
|
|
57
|
+
import type { NullItemID } from 'isaac-typescript-definitions';
|
|
58
58
|
import { PickupPrice } from 'isaac-typescript-definitions';
|
|
59
59
|
import { PickupVariant } from 'isaac-typescript-definitions';
|
|
60
60
|
import { PillColor } from 'isaac-typescript-definitions';
|
|
@@ -3637,6 +3637,9 @@ declare class DeployJSONRoom extends Feature {
|
|
|
3637
3637
|
* If the player does not have an item currently queued, then this function will be a no-op.
|
|
3638
3638
|
*
|
|
3639
3639
|
* Returns whether an item was actually dequeued.
|
|
3640
|
+
*
|
|
3641
|
+
* Under the hood, this clones the `QueuedItemData`, since directly setting the `Item` field to
|
|
3642
|
+
* `undefined` does not work for some reason.
|
|
3640
3643
|
*/
|
|
3641
3644
|
export declare function dequeueItem(player: EntityPlayer): boolean;
|
|
3642
3645
|
|
|
@@ -5097,7 +5100,15 @@ export declare function getChallengeName(challenge: Challenge): string;
|
|
|
5097
5100
|
*/
|
|
5098
5101
|
export declare function getChallengeTrinketType(challenge: Challenge): TrinketType | undefined;
|
|
5099
5102
|
|
|
5100
|
-
/**
|
|
5103
|
+
/**
|
|
5104
|
+
* Helper function to get the numerical damage multiplier for a character.
|
|
5105
|
+
*
|
|
5106
|
+
* @param character The character to get.
|
|
5107
|
+
* @param hasWhoreOfBabylon Optional. Whether the character has the Whore of Babylon effect
|
|
5108
|
+
* currently active. Defaults to false. This is necessary because Eve's
|
|
5109
|
+
* damage multiplier changes from 0.75 to 1 when she has Whore of Babylon
|
|
5110
|
+
* active.
|
|
5111
|
+
*/
|
|
5101
5112
|
export declare function getCharacterDamageMultiplier(character: PlayerType, hasWhoreOfBabylon?: boolean): float;
|
|
5102
5113
|
|
|
5103
5114
|
/**
|
|
@@ -17493,6 +17504,15 @@ newValue: PossibleStatType
|
|
|
17493
17504
|
|
|
17494
17505
|
declare function shouldFireSlot(fireArgs: [slot: EntitySlot] | [slot: EntitySlot, player: EntityPlayer] | [slot: EntitySlot, slotDestructionType: SlotDestructionType] | [slot: EntitySlot, previousAnimation: string, currentAnimation: string], optionalArgs: [slotVariant?: SlotVariant, subType?: int]): boolean;
|
|
17495
17506
|
|
|
17507
|
+
/**
|
|
17508
|
+
* Helper function to check if a player should have Whore of Babylon active at their current health
|
|
17509
|
+
* level.
|
|
17510
|
+
*
|
|
17511
|
+
* - For most characters, Whore of Babylon activates when the red hearts are at 1/2 or less.
|
|
17512
|
+
* - For Eve, Whore of Babylon activates when the red hearts are at 1 or less.
|
|
17513
|
+
*/
|
|
17514
|
+
export declare function shouldWhoreOfBabylonBeActive(player: EntityPlayer): boolean;
|
|
17515
|
+
|
|
17496
17516
|
/**
|
|
17497
17517
|
* Shallow copies and shuffles the array using the Fisher-Yates algorithm. Returns the copied array.
|
|
17498
17518
|
*
|
package/dist/indexLua.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from "./functions/pills";
|
|
|
90
90
|
export * from "./functions/playerCenter";
|
|
91
91
|
export * from "./functions/playerCollectibles";
|
|
92
92
|
export * from "./functions/playerDataStructures";
|
|
93
|
+
export * from "./functions/playerEffects";
|
|
93
94
|
export * from "./functions/playerHealth";
|
|
94
95
|
export * from "./functions/playerIndex";
|
|
95
96
|
export * from "./functions/playerTrinkets";
|
package/dist/indexLua.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexLua.d.ts","sourceRoot":"","sources":["../src/indexLua.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AA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AC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC"}
|
package/dist/indexLua.lua
CHANGED
|
@@ -735,6 +735,14 @@ do
|
|
|
735
735
|
end
|
|
736
736
|
end
|
|
737
737
|
end
|
|
738
|
+
do
|
|
739
|
+
local ____export = require("functions.playerEffects")
|
|
740
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
741
|
+
if ____exportKey ~= "default" then
|
|
742
|
+
____exports[____exportKey] = ____exportValue
|
|
743
|
+
end
|
|
744
|
+
end
|
|
745
|
+
end
|
|
738
746
|
do
|
|
739
747
|
local ____export = require("functions.playerHealth")
|
|
740
748
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 75.
|
|
3
|
+
isaacscript-common 75.2.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -21359,6 +21359,12 @@ function ____exports.characterStartsWithActiveItem(self, character)
|
|
|
21359
21359
|
return CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET:has(character)
|
|
21360
21360
|
end
|
|
21361
21361
|
--- Helper function to get the numerical damage multiplier for a character.
|
|
21362
|
+
--
|
|
21363
|
+
-- @param character The character to get.
|
|
21364
|
+
-- @param hasWhoreOfBabylon Optional. Whether the character has the Whore of Babylon effect
|
|
21365
|
+
-- currently active. Defaults to false. This is necessary because Eve's
|
|
21366
|
+
-- damage multiplier changes from 0.75 to 1 when she has Whore of Babylon
|
|
21367
|
+
-- active.
|
|
21362
21368
|
function ____exports.getCharacterDamageMultiplier(self, character, hasWhoreOfBabylon)
|
|
21363
21369
|
if hasWhoreOfBabylon == nil then
|
|
21364
21370
|
hasWhoreOfBabylon = false
|
|
@@ -21487,39 +21493,6 @@ function ____exports.isVanillaPlayer(self, player)
|
|
|
21487
21493
|
local character = player:GetPlayerType()
|
|
21488
21494
|
return isVanillaCharacter(nil, character)
|
|
21489
21495
|
end
|
|
21490
|
-
--- Helper function to check to see if any player has a temporary collectible effect.
|
|
21491
|
-
function ____exports.anyPlayerHasCollectibleEffect(self, collectibleType)
|
|
21492
|
-
local players = getAllPlayers(nil)
|
|
21493
|
-
return __TS__ArraySome(
|
|
21494
|
-
players,
|
|
21495
|
-
function(____, player)
|
|
21496
|
-
local effects = player:GetEffects()
|
|
21497
|
-
return effects:HasCollectibleEffect(collectibleType)
|
|
21498
|
-
end
|
|
21499
|
-
)
|
|
21500
|
-
end
|
|
21501
|
-
--- Helper function to check to see if any player has a temporary null effect.
|
|
21502
|
-
function ____exports.anyPlayerHasNullEffect(self, nullItemID)
|
|
21503
|
-
local players = getAllPlayers(nil)
|
|
21504
|
-
return __TS__ArraySome(
|
|
21505
|
-
players,
|
|
21506
|
-
function(____, player)
|
|
21507
|
-
local effects = player:GetEffects()
|
|
21508
|
-
return effects:HasNullEffect(nullItemID)
|
|
21509
|
-
end
|
|
21510
|
-
)
|
|
21511
|
-
end
|
|
21512
|
-
--- Helper function to check to see if any player has a temporary trinket effect.
|
|
21513
|
-
function ____exports.anyPlayerHasTrinketEffect(self, trinketType)
|
|
21514
|
-
local players = getAllPlayers(nil)
|
|
21515
|
-
return __TS__ArraySome(
|
|
21516
|
-
players,
|
|
21517
|
-
function(____, player)
|
|
21518
|
-
local effects = player:GetEffects()
|
|
21519
|
-
return effects:HasTrinketEffect(trinketType)
|
|
21520
|
-
end
|
|
21521
|
-
)
|
|
21522
|
-
end
|
|
21523
21496
|
--- Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
21524
21497
|
-- activation, a poop from IBS, etc.).
|
|
21525
21498
|
function ____exports.anyPlayerHoldingItem(self)
|
|
@@ -21559,6 +21532,9 @@ end
|
|
|
21559
21532
|
-- If the player does not have an item currently queued, then this function will be a no-op.
|
|
21560
21533
|
--
|
|
21561
21534
|
-- Returns whether an item was actually dequeued.
|
|
21535
|
+
--
|
|
21536
|
+
-- Under the hood, this clones the `QueuedItemData`, since directly setting the `Item` field to
|
|
21537
|
+
-- `undefined` does not work for some reason.
|
|
21562
21538
|
function ____exports.dequeueItem(self, player)
|
|
21563
21539
|
if player.QueuedItem.Item == nil then
|
|
21564
21540
|
return false
|
|
@@ -21592,24 +21568,6 @@ function ____exports.getClosestPlayer(self, position)
|
|
|
21592
21568
|
assertDefined(nil, closestPlayer, "Failed to find the closest player.")
|
|
21593
21569
|
return closestPlayer
|
|
21594
21570
|
end
|
|
21595
|
-
--- Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
21596
|
-
-- don't have to manually create an array from an `EffectsList` object.
|
|
21597
|
-
function ____exports.getEffectsList(self, player)
|
|
21598
|
-
local effects = player:GetEffects()
|
|
21599
|
-
local effectsList = effects:GetEffectsList()
|
|
21600
|
-
local effectArray = {}
|
|
21601
|
-
do
|
|
21602
|
-
local i = 0
|
|
21603
|
-
while i < effectsList.Size do
|
|
21604
|
-
local effect = effectsList:Get(i)
|
|
21605
|
-
if effect ~= nil then
|
|
21606
|
-
effectArray[#effectArray + 1] = effect
|
|
21607
|
-
end
|
|
21608
|
-
i = i + 1
|
|
21609
|
-
end
|
|
21610
|
-
end
|
|
21611
|
-
return effectArray
|
|
21612
|
-
end
|
|
21613
21571
|
--- Helper function to return the player with the highest ID, according to the `Isaac.GetPlayer`
|
|
21614
21572
|
-- method.
|
|
21615
21573
|
function ____exports.getFinalPlayer(self)
|
|
@@ -21813,6 +21771,7 @@ function ____exports.isEden(self, player)
|
|
|
21813
21771
|
local character = player:GetPlayerType()
|
|
21814
21772
|
return character == PlayerType.EDEN or character == PlayerType.EDEN_B
|
|
21815
21773
|
end
|
|
21774
|
+
--- Not exported since end-users should use the `isTainted` helper function directly.
|
|
21816
21775
|
local function isTaintedModded(self, player)
|
|
21817
21776
|
local character = player:GetPlayerType()
|
|
21818
21777
|
local name = player:GetName()
|
|
@@ -57287,6 +57246,79 @@ function ____exports.removeTrinketFromPools(self, ...)
|
|
|
57287
57246
|
itemPool:RemoveTrinket(trinketType)
|
|
57288
57247
|
end
|
|
57289
57248
|
end
|
|
57249
|
+
return ____exports
|
|
57250
|
+
end,
|
|
57251
|
+
["functions.playerEffects"] = function(...)
|
|
57252
|
+
local ____lualib = require("lualib_bundle")
|
|
57253
|
+
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
57254
|
+
local ____exports = {}
|
|
57255
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
57256
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
57257
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
57258
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
57259
|
+
local ____players = require("functions.players")
|
|
57260
|
+
local isCharacter = ____players.isCharacter
|
|
57261
|
+
--- Helper function to check to see if any player has a temporary collectible effect.
|
|
57262
|
+
function ____exports.anyPlayerHasCollectibleEffect(self, collectibleType)
|
|
57263
|
+
local players = getAllPlayers(nil)
|
|
57264
|
+
return __TS__ArraySome(
|
|
57265
|
+
players,
|
|
57266
|
+
function(____, player)
|
|
57267
|
+
local effects = player:GetEffects()
|
|
57268
|
+
return effects:HasCollectibleEffect(collectibleType)
|
|
57269
|
+
end
|
|
57270
|
+
)
|
|
57271
|
+
end
|
|
57272
|
+
--- Helper function to check to see if any player has a temporary null effect.
|
|
57273
|
+
function ____exports.anyPlayerHasNullEffect(self, nullItemID)
|
|
57274
|
+
local players = getAllPlayers(nil)
|
|
57275
|
+
return __TS__ArraySome(
|
|
57276
|
+
players,
|
|
57277
|
+
function(____, player)
|
|
57278
|
+
local effects = player:GetEffects()
|
|
57279
|
+
return effects:HasNullEffect(nullItemID)
|
|
57280
|
+
end
|
|
57281
|
+
)
|
|
57282
|
+
end
|
|
57283
|
+
--- Helper function to check to see if any player has a temporary trinket effect.
|
|
57284
|
+
function ____exports.anyPlayerHasTrinketEffect(self, trinketType)
|
|
57285
|
+
local players = getAllPlayers(nil)
|
|
57286
|
+
return __TS__ArraySome(
|
|
57287
|
+
players,
|
|
57288
|
+
function(____, player)
|
|
57289
|
+
local effects = player:GetEffects()
|
|
57290
|
+
return effects:HasTrinketEffect(trinketType)
|
|
57291
|
+
end
|
|
57292
|
+
)
|
|
57293
|
+
end
|
|
57294
|
+
--- Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
57295
|
+
-- don't have to manually create an array from an `EffectsList` object.
|
|
57296
|
+
function ____exports.getEffectsList(self, player)
|
|
57297
|
+
local effects = player:GetEffects()
|
|
57298
|
+
local effectsList = effects:GetEffectsList()
|
|
57299
|
+
local effectArray = {}
|
|
57300
|
+
do
|
|
57301
|
+
local i = 0
|
|
57302
|
+
while i < effectsList.Size do
|
|
57303
|
+
local effect = effectsList:Get(i)
|
|
57304
|
+
if effect ~= nil then
|
|
57305
|
+
effectArray[#effectArray + 1] = effect
|
|
57306
|
+
end
|
|
57307
|
+
i = i + 1
|
|
57308
|
+
end
|
|
57309
|
+
end
|
|
57310
|
+
return effectArray
|
|
57311
|
+
end
|
|
57312
|
+
--- Helper function to check if a player should have Whore of Babylon active at their current health
|
|
57313
|
+
-- level.
|
|
57314
|
+
--
|
|
57315
|
+
-- - For most characters, Whore of Babylon activates when the red hearts are at 1/2 or less.
|
|
57316
|
+
-- - For Eve, Whore of Babylon activates when the red hearts are at 1 or less.
|
|
57317
|
+
function ____exports.shouldWhoreOfBabylonBeActive(self, player)
|
|
57318
|
+
local redHearts = player:GetHearts()
|
|
57319
|
+
local threshold = isCharacter(nil, player, PlayerType.EVE) and 2 or 1
|
|
57320
|
+
return redHearts <= threshold
|
|
57321
|
+
end
|
|
57290
57322
|
return ____exports
|
|
57291
57323
|
end,
|
|
57292
57324
|
["functions.logMisc"] = function(...)
|
|
@@ -57341,10 +57373,11 @@ local ____itemPool = require("functions.itemPool")
|
|
|
57341
57373
|
local getItemPoolName = ____itemPool.getItemPoolName
|
|
57342
57374
|
local ____log = require("functions.log")
|
|
57343
57375
|
local log = ____log.log
|
|
57376
|
+
local ____playerEffects = require("functions.playerEffects")
|
|
57377
|
+
local getEffectsList = ____playerEffects.getEffectsList
|
|
57344
57378
|
local ____playerHealth = require("functions.playerHealth")
|
|
57345
57379
|
local getPlayerHealth = ____playerHealth.getPlayerHealth
|
|
57346
57380
|
local ____players = require("functions.players")
|
|
57347
|
-
local getEffectsList = ____players.getEffectsList
|
|
57348
57381
|
local getPlayerName = ____players.getPlayerName
|
|
57349
57382
|
local ____roomData = require("functions.roomData")
|
|
57350
57383
|
local getRoomData = ____roomData.getRoomData
|
|
@@ -66217,6 +66250,14 @@ do
|
|
|
66217
66250
|
end
|
|
66218
66251
|
end
|
|
66219
66252
|
end
|
|
66253
|
+
do
|
|
66254
|
+
local ____export = require("functions.playerEffects")
|
|
66255
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
66256
|
+
if ____exportKey ~= "default" then
|
|
66257
|
+
____exports[____exportKey] = ____exportValue
|
|
66258
|
+
end
|
|
66259
|
+
end
|
|
66260
|
+
end
|
|
66220
66261
|
do
|
|
66221
66262
|
local ____export = require("functions.playerHealth")
|
|
66222
66263
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -67405,6 +67446,14 @@ do
|
|
|
67405
67446
|
end
|
|
67406
67447
|
end
|
|
67407
67448
|
end
|
|
67449
|
+
do
|
|
67450
|
+
local ____export = require("functions.playerEffects")
|
|
67451
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
67452
|
+
if ____exportKey ~= "default" then
|
|
67453
|
+
____exports[____exportKey] = ____exportValue
|
|
67454
|
+
end
|
|
67455
|
+
end
|
|
67456
|
+
end
|
|
67408
67457
|
do
|
|
67409
67458
|
local ____export = require("functions.playerHealth")
|
|
67410
67459
|
for ____exportKey, ____exportValue in pairs(____export) do
|
package/package.json
CHANGED
|
@@ -71,7 +71,15 @@ export function characterStartsWithActiveItem(character: PlayerType): boolean {
|
|
|
71
71
|
return CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET.has(character);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Helper function to get the numerical damage multiplier for a character.
|
|
76
|
+
*
|
|
77
|
+
* @param character The character to get.
|
|
78
|
+
* @param hasWhoreOfBabylon Optional. Whether the character has the Whore of Babylon effect
|
|
79
|
+
* currently active. Defaults to false. This is necessary because Eve's
|
|
80
|
+
* damage multiplier changes from 0.75 to 1 when she has Whore of Babylon
|
|
81
|
+
* active.
|
|
82
|
+
*/
|
|
75
83
|
export function getCharacterDamageMultiplier(
|
|
76
84
|
character: PlayerType,
|
|
77
85
|
hasWhoreOfBabylon = false,
|
package/src/functions/logMisc.ts
CHANGED
|
@@ -30,8 +30,9 @@ import { hasFlag } from "./flag";
|
|
|
30
30
|
import { getIsaacAPIClassName } from "./isaacAPIClass";
|
|
31
31
|
import { getItemPoolName } from "./itemPool";
|
|
32
32
|
import { log } from "./log";
|
|
33
|
+
import { getEffectsList } from "./playerEffects";
|
|
33
34
|
import { getPlayerHealth } from "./playerHealth";
|
|
34
|
-
import {
|
|
35
|
+
import { getPlayerName } from "./players";
|
|
35
36
|
import { getRoomData, getRoomGridIndex, getRoomListIndex } from "./roomData";
|
|
36
37
|
import { combineSets, getSortedSetValues } from "./set";
|
|
37
38
|
import { iterateTableInOrder } from "./table";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CollectibleType,
|
|
3
|
+
NullItemID,
|
|
4
|
+
TrinketType,
|
|
5
|
+
} from "isaac-typescript-definitions";
|
|
6
|
+
import { PlayerType } from "isaac-typescript-definitions";
|
|
7
|
+
import { getAllPlayers } from "./playerIndex";
|
|
8
|
+
import { isCharacter } from "./players";
|
|
9
|
+
|
|
10
|
+
/** Helper function to check to see if any player has a temporary collectible effect. */
|
|
11
|
+
export function anyPlayerHasCollectibleEffect(
|
|
12
|
+
collectibleType: CollectibleType,
|
|
13
|
+
): boolean {
|
|
14
|
+
const players = getAllPlayers();
|
|
15
|
+
|
|
16
|
+
return players.some((player) => {
|
|
17
|
+
const effects = player.GetEffects();
|
|
18
|
+
return effects.HasCollectibleEffect(collectibleType);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Helper function to check to see if any player has a temporary null effect. */
|
|
23
|
+
export function anyPlayerHasNullEffect(nullItemID: NullItemID): boolean {
|
|
24
|
+
const players = getAllPlayers();
|
|
25
|
+
|
|
26
|
+
return players.some((player) => {
|
|
27
|
+
const effects = player.GetEffects();
|
|
28
|
+
return effects.HasNullEffect(nullItemID);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Helper function to check to see if any player has a temporary trinket effect. */
|
|
33
|
+
export function anyPlayerHasTrinketEffect(trinketType: TrinketType): boolean {
|
|
34
|
+
const players = getAllPlayers();
|
|
35
|
+
|
|
36
|
+
return players.some((player) => {
|
|
37
|
+
const effects = player.GetEffects();
|
|
38
|
+
return effects.HasTrinketEffect(trinketType);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
44
|
+
* don't have to manually create an array from an `EffectsList` object.
|
|
45
|
+
*/
|
|
46
|
+
export function getEffectsList(player: EntityPlayer): TemporaryEffect[] {
|
|
47
|
+
const effects = player.GetEffects();
|
|
48
|
+
const effectsList = effects.GetEffectsList();
|
|
49
|
+
|
|
50
|
+
const effectArray: TemporaryEffect[] = [];
|
|
51
|
+
for (let i = 0; i < effectsList.Size; i++) {
|
|
52
|
+
const effect = effectsList.Get(i);
|
|
53
|
+
if (effect !== undefined) {
|
|
54
|
+
effectArray.push(effect);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return effectArray;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Helper function to check if a player should have Whore of Babylon active at their current health
|
|
63
|
+
* level.
|
|
64
|
+
*
|
|
65
|
+
* - For most characters, Whore of Babylon activates when the red hearts are at 1/2 or less.
|
|
66
|
+
* - For Eve, Whore of Babylon activates when the red hearts are at 1 or less.
|
|
67
|
+
*/
|
|
68
|
+
export function shouldWhoreOfBabylonBeActive(player: EntityPlayer): boolean {
|
|
69
|
+
const redHearts = player.GetHearts();
|
|
70
|
+
const threshold = isCharacter(player, PlayerType.EVE) ? 2 : 1;
|
|
71
|
+
|
|
72
|
+
return redHearts <= threshold;
|
|
73
|
+
}
|
package/src/functions/players.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { TrinketType } from "isaac-typescript-definitions";
|
|
2
1
|
import {
|
|
3
2
|
Challenge,
|
|
4
3
|
CollectibleType,
|
|
@@ -20,38 +19,6 @@ import {
|
|
|
20
19
|
import { isNumber } from "./types";
|
|
21
20
|
import { assertDefined, repeat } from "./utils";
|
|
22
21
|
|
|
23
|
-
/** Helper function to check to see if any player has a temporary collectible effect. */
|
|
24
|
-
export function anyPlayerHasCollectibleEffect(
|
|
25
|
-
collectibleType: CollectibleType,
|
|
26
|
-
): boolean {
|
|
27
|
-
const players = getAllPlayers();
|
|
28
|
-
|
|
29
|
-
return players.some((player) => {
|
|
30
|
-
const effects = player.GetEffects();
|
|
31
|
-
return effects.HasCollectibleEffect(collectibleType);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** Helper function to check to see if any player has a temporary null effect. */
|
|
36
|
-
export function anyPlayerHasNullEffect(nullItemID: NullItemID): boolean {
|
|
37
|
-
const players = getAllPlayers();
|
|
38
|
-
|
|
39
|
-
return players.some((player) => {
|
|
40
|
-
const effects = player.GetEffects();
|
|
41
|
-
return effects.HasNullEffect(nullItemID);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** Helper function to check to see if any player has a temporary trinket effect. */
|
|
46
|
-
export function anyPlayerHasTrinketEffect(trinketType: TrinketType): boolean {
|
|
47
|
-
const players = getAllPlayers();
|
|
48
|
-
|
|
49
|
-
return players.some((player) => {
|
|
50
|
-
const effects = player.GetEffects();
|
|
51
|
-
return effects.HasTrinketEffect(trinketType);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
22
|
/**
|
|
56
23
|
* Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
57
24
|
* activation, a poop from IBS, etc.).
|
|
@@ -101,6 +68,9 @@ export function canPlayerCrushRocks(player: EntityPlayer): boolean {
|
|
|
101
68
|
* If the player does not have an item currently queued, then this function will be a no-op.
|
|
102
69
|
*
|
|
103
70
|
* Returns whether an item was actually dequeued.
|
|
71
|
+
*
|
|
72
|
+
* Under the hood, this clones the `QueuedItemData`, since directly setting the `Item` field to
|
|
73
|
+
* `undefined` does not work for some reason.
|
|
104
74
|
*/
|
|
105
75
|
export function dequeueItem(player: EntityPlayer): boolean {
|
|
106
76
|
if (player.QueuedItem.Item === undefined) {
|
|
@@ -159,25 +129,6 @@ export function getClosestPlayer(position: Vector): EntityPlayer {
|
|
|
159
129
|
return closestPlayer;
|
|
160
130
|
}
|
|
161
131
|
|
|
162
|
-
/**
|
|
163
|
-
* Helper function to get an array of temporary effects for a player. This is helpful so that you
|
|
164
|
-
* don't have to manually create an array from an `EffectsList` object.
|
|
165
|
-
*/
|
|
166
|
-
export function getEffectsList(player: EntityPlayer): TemporaryEffect[] {
|
|
167
|
-
const effects = player.GetEffects();
|
|
168
|
-
const effectsList = effects.GetEffectsList();
|
|
169
|
-
|
|
170
|
-
const effectArray: TemporaryEffect[] = [];
|
|
171
|
-
for (let i = 0; i < effectsList.Size; i++) {
|
|
172
|
-
const effect = effectsList.Get(i);
|
|
173
|
-
if (effect !== undefined) {
|
|
174
|
-
effectArray.push(effect);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return effectArray;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
132
|
/**
|
|
182
133
|
* Helper function to return the player with the highest ID, according to the `Isaac.GetPlayer`
|
|
183
134
|
* method.
|
|
@@ -457,6 +408,7 @@ export function isEden(player: EntityPlayer): boolean {
|
|
|
457
408
|
return character === PlayerType.EDEN || character === PlayerType.EDEN_B;
|
|
458
409
|
}
|
|
459
410
|
|
|
411
|
+
/** Not exported since end-users should use the `isTainted` helper function directly. */
|
|
460
412
|
function isTaintedModded(player: EntityPlayer) {
|
|
461
413
|
// This algorithm only works for modded characters because the `Isaac.GetPlayerTypeByName` method
|
|
462
414
|
// is bugged.
|
package/src/index.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from "./functions/pills";
|
|
|
90
90
|
export * from "./functions/playerCenter";
|
|
91
91
|
export * from "./functions/playerCollectibles";
|
|
92
92
|
export * from "./functions/playerDataStructures";
|
|
93
|
+
export * from "./functions/playerEffects";
|
|
93
94
|
export * from "./functions/playerHealth";
|
|
94
95
|
export * from "./functions/playerIndex";
|
|
95
96
|
export * from "./functions/playerTrinkets";
|