isaacscript-common 44.0.0 → 45.0.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 +31 -11
- package/dist/isaacscript-common.lua +5383 -5236
- package/dist/src/classes/features/other/{EdenStartingStats.d.ts → EdenStartingStatsHealth.d.ts} +17 -5
- package/dist/src/classes/features/other/EdenStartingStatsHealth.d.ts.map +1 -0
- package/dist/src/classes/features/other/EdenStartingStatsHealth.lua +75 -0
- package/dist/src/classes/features/other/ItemPoolDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/ItemPoolDetection.lua +2 -1
- package/dist/src/classes/features/other/Pause.lua +2 -2
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +4 -3
- package/dist/src/enums/ISCFeature.d.ts +1 -1
- package/dist/src/enums/ISCFeature.d.ts.map +1 -1
- package/dist/src/enums/ISCFeature.lua +2 -2
- package/dist/src/features.d.ts +3 -3
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +3 -3
- package/dist/src/functions/characters.d.ts +9 -2
- package/dist/src/functions/characters.d.ts.map +1 -1
- package/dist/src/functions/characters.lua +13 -4
- package/dist/src/functions/charge.lua +2 -2
- package/dist/src/functions/math.d.ts +1 -0
- package/dist/src/functions/math.d.ts.map +1 -1
- package/dist/src/functions/math.lua +1 -0
- package/dist/src/functions/playerCollectibles.d.ts +127 -0
- package/dist/src/functions/playerCollectibles.d.ts.map +1 -0
- package/dist/src/functions/playerCollectibles.lua +308 -0
- package/dist/src/functions/playerHealth.d.ts +1 -1
- package/dist/src/functions/playerHealth.d.ts.map +1 -1
- package/dist/src/functions/playerHealth.lua +10 -6
- package/dist/src/functions/playerTrinkets.d.ts +69 -0
- package/dist/src/functions/playerTrinkets.d.ts.map +1 -0
- package/dist/src/functions/playerTrinkets.lua +160 -0
- package/dist/src/functions/players.d.ts +5 -166
- package/dist/src/functions/players.d.ts.map +1 -1
- package/dist/src/functions/players.lua +20 -389
- package/dist/src/functions/trinketGive.lua +2 -2
- package/dist/src/functions/trinkets.d.ts +0 -30
- package/dist/src/functions/trinkets.d.ts.map +1 -1
- package/dist/src/functions/trinkets.lua +0 -71
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +16 -0
- package/dist/src/objects/{characterStartingCollectibles.d.ts → characterStartingCollectibleTypes.d.ts} +2 -2
- package/dist/src/objects/characterStartingCollectibleTypes.d.ts.map +1 -0
- package/dist/src/objects/{characterStartingCollectibles.lua → characterStartingCollectibleTypes.lua} +1 -1
- package/dist/src/objects/characterStartingTrinketTypes.d.ts +46 -0
- package/dist/src/objects/characterStartingTrinketTypes.d.ts.map +1 -0
- package/dist/src/objects/characterStartingTrinketTypes.lua +49 -0
- package/package.json +1 -1
- package/src/classes/features/other/{EdenStartingStats.ts → EdenStartingStatsHealth.ts} +38 -5
- package/src/classes/features/other/ItemPoolDetection.ts +2 -4
- package/src/classes/features/other/Pause.ts +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +3 -3
- package/src/enums/ISCFeature.ts +1 -1
- package/src/features.ts +3 -3
- package/src/functions/characters.ts +20 -4
- package/src/functions/charge.ts +1 -1
- package/src/functions/math.ts +1 -0
- package/src/functions/playerCollectibles.ts +372 -0
- package/src/functions/playerHealth.ts +23 -15
- package/src/functions/playerTrinkets.ts +184 -0
- package/src/functions/players.ts +16 -481
- package/src/functions/trinketGive.ts +1 -1
- package/src/functions/trinkets.ts +1 -84
- package/src/index.ts +2 -0
- package/src/objects/{characterStartingCollectibles.ts → characterStartingCollectibleTypes.ts} +1 -1
- package/src/objects/characterStartingTrinketTypes.ts +129 -0
- package/dist/src/classes/features/other/EdenStartingStats.d.ts.map +0 -1
- package/dist/src/classes/features/other/EdenStartingStats.lua +0 -54
- package/dist/src/objects/characterStartingCollectibles.d.ts.map +0 -1
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
3
|
-
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
4
1
|
local ____exports = {}
|
|
5
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
7
|
-
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
8
3
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
9
|
-
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
10
|
-
local TRINKET_SLOT_VALUES = ____cachedEnumValues.TRINKET_SLOT_VALUES
|
|
11
4
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
12
5
|
local itemConfig = ____cachedClasses.itemConfig
|
|
13
6
|
local ____constants = require("src.core.constants")
|
|
@@ -30,8 +23,6 @@ local ____flag = require("src.functions.flag")
|
|
|
30
23
|
local hasFlag = ____flag.hasFlag
|
|
31
24
|
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
32
25
|
local isTrinket = ____pickupVariants.isTrinket
|
|
33
|
-
local ____players = require("src.functions.players")
|
|
34
|
-
local isCharacter = ____players.isCharacter
|
|
35
26
|
local ____sprites = require("src.functions.sprites")
|
|
36
27
|
local clearSprite = ____sprites.clearSprite
|
|
37
28
|
local ____types = require("src.functions.types")
|
|
@@ -82,45 +73,6 @@ function ____exports.getMysteriousPaperEffectForFrame(self, player, frameCount)
|
|
|
82
73
|
end
|
|
83
74
|
return frameCount % NUM_MYSTERIOUS_PAPER_EFFECTS
|
|
84
75
|
end
|
|
85
|
-
--- Returns the slot number corresponding to where a trinket can be safely inserted.
|
|
86
|
-
--
|
|
87
|
-
-- For example:
|
|
88
|
-
--
|
|
89
|
-
-- ```ts
|
|
90
|
-
-- const player = Isaac.GetPlayer();
|
|
91
|
-
-- const trinketSlot = getOpenTrinketSlotNum(player);
|
|
92
|
-
-- if (trinketSlot !== undefined) {
|
|
93
|
-
-- // They have one or more open trinket slots
|
|
94
|
-
-- player.AddTrinket(TrinketType.SWALLOWED_PENNY);
|
|
95
|
-
-- }
|
|
96
|
-
-- ```
|
|
97
|
-
function ____exports.getOpenTrinketSlot(self, player)
|
|
98
|
-
local maxTrinkets = player:GetMaxTrinkets()
|
|
99
|
-
local trinketType1 = player:GetTrinket(TrinketSlot.SLOT_1)
|
|
100
|
-
local trinketType2 = player:GetTrinket(TrinketSlot.SLOT_2)
|
|
101
|
-
if maxTrinkets == 1 then
|
|
102
|
-
return trinketType1 == TrinketType.NULL and 0 or nil
|
|
103
|
-
end
|
|
104
|
-
if maxTrinkets == 2 then
|
|
105
|
-
if trinketType1 == TrinketType.NULL then
|
|
106
|
-
return 0
|
|
107
|
-
end
|
|
108
|
-
return trinketType2 == TrinketType.NULL and 1 or nil
|
|
109
|
-
end
|
|
110
|
-
error("The player has an unknown number of trinket slots: " .. tostring(maxTrinkets))
|
|
111
|
-
end
|
|
112
|
-
--- Helper function to get all of the trinkets that the player is currently holding. This will not
|
|
113
|
-
-- include any smelted trinkets.
|
|
114
|
-
function ____exports.getPlayerTrinkets(self, player)
|
|
115
|
-
local trinketTypes = {}
|
|
116
|
-
for ____, trinketSlot in ipairs(TRINKET_SLOT_VALUES) do
|
|
117
|
-
local trinketType = player:GetTrinket(trinketSlot)
|
|
118
|
-
if trinketType ~= TrinketType.NULL then
|
|
119
|
-
trinketTypes[#trinketTypes + 1] = trinketType
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
return trinketTypes
|
|
123
|
-
end
|
|
124
76
|
--- Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
|
|
125
77
|
-- trinket type was not valid.
|
|
126
78
|
--
|
|
@@ -166,29 +118,6 @@ function ____exports.getTrinketName(self, trinketType)
|
|
|
166
118
|
end
|
|
167
119
|
return DEFAULT_TRINKET_NAME
|
|
168
120
|
end
|
|
169
|
-
--- Helper function to check to see if the player is holding one or more trinkets.
|
|
170
|
-
function ____exports.hasAnyTrinket(self, player)
|
|
171
|
-
local playerTrinketTypes = __TS__ArrayMap(
|
|
172
|
-
TRINKET_SLOT_VALUES,
|
|
173
|
-
function(____, trinketSlot) return player:GetTrinket(trinketSlot) end
|
|
174
|
-
)
|
|
175
|
-
return __TS__ArraySome(
|
|
176
|
-
playerTrinketTypes,
|
|
177
|
-
function(____, trinketType) return trinketType ~= TrinketType.NULL end
|
|
178
|
-
)
|
|
179
|
-
end
|
|
180
|
-
--- Returns whether the player can hold an additional trinket, beyond what they are currently
|
|
181
|
-
-- carrying. This takes into account items that modify the max number of trinkets, like Mom's Purse.
|
|
182
|
-
--
|
|
183
|
-
-- If the player is the Tainted Soul, this always returns false, since that character cannot pick up
|
|
184
|
-
-- items. (Only Tainted Forgotten can pick up items.)
|
|
185
|
-
function ____exports.hasOpenTrinketSlot(self, player)
|
|
186
|
-
if isCharacter(nil, player, PlayerType.SOUL_B) then
|
|
187
|
-
return false
|
|
188
|
-
end
|
|
189
|
-
local openTrinketSlot = ____exports.getOpenTrinketSlot(nil, player)
|
|
190
|
-
return openTrinketSlot ~= nil
|
|
191
|
-
end
|
|
192
121
|
function ____exports.isGoldenTrinketType(self, trinketType)
|
|
193
122
|
return asNumber(nil, trinketType) > GOLDEN_TRINKET_ADJUSTMENT
|
|
194
123
|
end
|
package/dist/src/index.d.ts
CHANGED
|
@@ -86,9 +86,11 @@ export * from "./functions/pickups";
|
|
|
86
86
|
export * from "./functions/pickupsSpecific";
|
|
87
87
|
export * from "./functions/pills";
|
|
88
88
|
export * from "./functions/playerCenter";
|
|
89
|
+
export * from "./functions/playerCollectibles";
|
|
89
90
|
export * from "./functions/playerDataStructures";
|
|
90
91
|
export * from "./functions/playerHealth";
|
|
91
92
|
export * from "./functions/playerIndex";
|
|
93
|
+
export * from "./functions/playerTrinkets";
|
|
92
94
|
export * from "./functions/players";
|
|
93
95
|
export * from "./functions/pocketItems";
|
|
94
96
|
export * from "./functions/positionVelocity";
|
package/dist/src/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,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AAC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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,kBAAkB,CAAC"}
|
package/dist/src/index.lua
CHANGED
|
@@ -703,6 +703,14 @@ do
|
|
|
703
703
|
end
|
|
704
704
|
end
|
|
705
705
|
end
|
|
706
|
+
do
|
|
707
|
+
local ____export = require("src.functions.playerCollectibles")
|
|
708
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
709
|
+
if ____exportKey ~= "default" then
|
|
710
|
+
____exports[____exportKey] = ____exportValue
|
|
711
|
+
end
|
|
712
|
+
end
|
|
713
|
+
end
|
|
706
714
|
do
|
|
707
715
|
local ____export = require("src.functions.playerDataStructures")
|
|
708
716
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -727,6 +735,14 @@ do
|
|
|
727
735
|
end
|
|
728
736
|
end
|
|
729
737
|
end
|
|
738
|
+
do
|
|
739
|
+
local ____export = require("src.functions.playerTrinkets")
|
|
740
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
741
|
+
if ____exportKey ~= "default" then
|
|
742
|
+
____exports[____exportKey] = ____exportValue
|
|
743
|
+
end
|
|
744
|
+
end
|
|
745
|
+
end
|
|
730
746
|
do
|
|
731
747
|
local ____export = require("src.functions.players")
|
|
732
748
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CHARACTER_STARTING_COLLECTIBLE_TYPES: {
|
|
3
3
|
readonly [-1]: readonly [];
|
|
4
4
|
readonly 0: readonly [CollectibleType.D6];
|
|
5
5
|
readonly 1: readonly [CollectibleType.YUM_HEART];
|
|
@@ -43,4 +43,4 @@ export declare const CHARACTER_STARTING_COLLECTIBLES: {
|
|
|
43
43
|
readonly 39: readonly [CollectibleType.ANIMA_SOLA];
|
|
44
44
|
readonly 40: readonly [];
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=
|
|
46
|
+
//# sourceMappingURL=characterStartingCollectibleTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"characterStartingCollectibleTypes.d.ts","sourceRoot":"","sources":["../../../src/objects/characterStartingCollectibleTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,8BAA8B,CAAC;AAE3E,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6IkB,CAAC"}
|
package/dist/src/objects/{characterStartingCollectibles.lua → characterStartingCollectibleTypes.lua}
RENAMED
|
@@ -2,7 +2,7 @@ local ____exports = {}
|
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
4
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
5
|
-
____exports.
|
|
5
|
+
____exports.CHARACTER_STARTING_COLLECTIBLE_TYPES = {
|
|
6
6
|
[PlayerType.POSSESSOR] = {},
|
|
7
7
|
[PlayerType.ISAAC] = {CollectibleType.D6},
|
|
8
8
|
[PlayerType.MAGDALENE] = {CollectibleType.YUM_HEART},
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { TrinketType } from "isaac-typescript-definitions";
|
|
2
|
+
export declare const CHARACTER_STARTING_TRINKET_TYPE: {
|
|
3
|
+
readonly [-1]: undefined;
|
|
4
|
+
readonly 0: undefined;
|
|
5
|
+
readonly 1: undefined;
|
|
6
|
+
readonly 2: TrinketType.PAPER_CLIP;
|
|
7
|
+
readonly 3: undefined;
|
|
8
|
+
readonly 4: undefined;
|
|
9
|
+
readonly 5: undefined;
|
|
10
|
+
readonly 6: TrinketType.CHILDS_HEART;
|
|
11
|
+
readonly 7: undefined;
|
|
12
|
+
readonly 8: undefined;
|
|
13
|
+
readonly 9: undefined;
|
|
14
|
+
readonly 10: undefined;
|
|
15
|
+
readonly 11: undefined;
|
|
16
|
+
readonly 12: undefined;
|
|
17
|
+
readonly 13: undefined;
|
|
18
|
+
readonly 14: TrinketType.STORE_KEY;
|
|
19
|
+
readonly 15: undefined;
|
|
20
|
+
readonly 16: undefined;
|
|
21
|
+
readonly 17: undefined;
|
|
22
|
+
readonly 18: undefined;
|
|
23
|
+
readonly 19: undefined;
|
|
24
|
+
readonly 20: undefined;
|
|
25
|
+
readonly 21: undefined;
|
|
26
|
+
readonly 22: undefined;
|
|
27
|
+
readonly 23: undefined;
|
|
28
|
+
readonly 24: undefined;
|
|
29
|
+
readonly 25: undefined;
|
|
30
|
+
readonly 26: undefined;
|
|
31
|
+
readonly 27: undefined;
|
|
32
|
+
readonly 28: undefined;
|
|
33
|
+
readonly 29: undefined;
|
|
34
|
+
readonly 30: undefined;
|
|
35
|
+
readonly 31: undefined;
|
|
36
|
+
readonly 32: undefined;
|
|
37
|
+
readonly 33: undefined;
|
|
38
|
+
readonly 34: undefined;
|
|
39
|
+
readonly 35: undefined;
|
|
40
|
+
readonly 36: undefined;
|
|
41
|
+
readonly 37: undefined;
|
|
42
|
+
readonly 38: undefined;
|
|
43
|
+
readonly 39: undefined;
|
|
44
|
+
readonly 40: undefined;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=characterStartingTrinketTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"characterStartingTrinketTypes.d.ts","sourceRoot":"","sources":["../../../src/objects/characterStartingTrinketTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEvE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8HoB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
4
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
5
|
+
____exports.CHARACTER_STARTING_TRINKET_TYPE = {
|
|
6
|
+
[PlayerType.POSSESSOR] = nil,
|
|
7
|
+
[PlayerType.ISAAC] = nil,
|
|
8
|
+
[PlayerType.MAGDALENE] = nil,
|
|
9
|
+
[PlayerType.CAIN] = TrinketType.PAPER_CLIP,
|
|
10
|
+
[PlayerType.JUDAS] = nil,
|
|
11
|
+
[PlayerType.BLUE_BABY] = nil,
|
|
12
|
+
[PlayerType.EVE] = nil,
|
|
13
|
+
[PlayerType.SAMSON] = TrinketType.CHILDS_HEART,
|
|
14
|
+
[PlayerType.AZAZEL] = nil,
|
|
15
|
+
[PlayerType.LAZARUS] = nil,
|
|
16
|
+
[PlayerType.EDEN] = nil,
|
|
17
|
+
[PlayerType.LOST] = nil,
|
|
18
|
+
[PlayerType.LAZARUS_2] = nil,
|
|
19
|
+
[PlayerType.DARK_JUDAS] = nil,
|
|
20
|
+
[PlayerType.LILITH] = nil,
|
|
21
|
+
[PlayerType.KEEPER] = TrinketType.STORE_KEY,
|
|
22
|
+
[PlayerType.APOLLYON] = nil,
|
|
23
|
+
[PlayerType.FORGOTTEN] = nil,
|
|
24
|
+
[PlayerType.SOUL] = nil,
|
|
25
|
+
[PlayerType.BETHANY] = nil,
|
|
26
|
+
[PlayerType.JACOB] = nil,
|
|
27
|
+
[PlayerType.ESAU] = nil,
|
|
28
|
+
[PlayerType.ISAAC_B] = nil,
|
|
29
|
+
[PlayerType.MAGDALENE_B] = nil,
|
|
30
|
+
[PlayerType.CAIN_B] = nil,
|
|
31
|
+
[PlayerType.JUDAS_B] = nil,
|
|
32
|
+
[PlayerType.BLUE_BABY_B] = nil,
|
|
33
|
+
[PlayerType.EVE_B] = nil,
|
|
34
|
+
[PlayerType.SAMSON_B] = nil,
|
|
35
|
+
[PlayerType.AZAZEL_B] = nil,
|
|
36
|
+
[PlayerType.LAZARUS_B] = nil,
|
|
37
|
+
[PlayerType.EDEN_B] = nil,
|
|
38
|
+
[PlayerType.LOST_B] = nil,
|
|
39
|
+
[PlayerType.LILITH_B] = nil,
|
|
40
|
+
[PlayerType.KEEPER_B] = nil,
|
|
41
|
+
[PlayerType.APOLLYON_B] = nil,
|
|
42
|
+
[PlayerType.FORGOTTEN_B] = nil,
|
|
43
|
+
[PlayerType.BETHANY_B] = nil,
|
|
44
|
+
[PlayerType.JACOB_B] = nil,
|
|
45
|
+
[PlayerType.LAZARUS_2_B] = nil,
|
|
46
|
+
[PlayerType.JACOB_2_B] = nil,
|
|
47
|
+
[PlayerType.SOUL_B] = nil
|
|
48
|
+
}
|
|
49
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
mapGetPlayer,
|
|
6
6
|
mapSetPlayer,
|
|
7
7
|
} from "../../../functions/playerDataStructures";
|
|
8
|
+
import { getPlayerHealth } from "../../../functions/playerHealth";
|
|
8
9
|
import { isEden } from "../../../functions/players";
|
|
9
10
|
import { getPlayerStats } from "../../../functions/stats";
|
|
11
|
+
import type { PlayerHealth } from "../../../interfaces/PlayerHealth";
|
|
10
12
|
import type { PlayerStats } from "../../../interfaces/PlayerStats";
|
|
11
13
|
import type { PlayerIndex } from "../../../types/PlayerIndex";
|
|
12
14
|
import { Feature } from "../../private/Feature";
|
|
@@ -14,10 +16,11 @@ import { Feature } from "../../private/Feature";
|
|
|
14
16
|
const v = {
|
|
15
17
|
run: {
|
|
16
18
|
edenPlayerStats: new Map<PlayerIndex, PlayerStats>(),
|
|
19
|
+
edenPlayerHealth: new Map<PlayerIndex, PlayerHealth>(),
|
|
17
20
|
},
|
|
18
21
|
};
|
|
19
22
|
|
|
20
|
-
export class
|
|
23
|
+
export class EdenStartingStatsHealth extends Feature {
|
|
21
24
|
/** @internal */
|
|
22
25
|
public override v = v;
|
|
23
26
|
|
|
@@ -40,6 +43,11 @@ export class EdenStartingStats extends Feature {
|
|
|
40
43
|
return;
|
|
41
44
|
}
|
|
42
45
|
|
|
46
|
+
this.getEdenStats(player);
|
|
47
|
+
this.getEdenHealth(player);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
private getEdenStats(player: EntityPlayer): void {
|
|
43
51
|
const existingStatMap = mapGetPlayer(v.run.edenPlayerStats, player);
|
|
44
52
|
if (existingStatMap !== undefined) {
|
|
45
53
|
return;
|
|
@@ -47,11 +55,36 @@ export class EdenStartingStats extends Feature {
|
|
|
47
55
|
|
|
48
56
|
const playerStats = getPlayerStats(player);
|
|
49
57
|
mapSetPlayer(v.run.edenPlayerStats, player, playerStats);
|
|
50
|
-
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private getEdenHealth(player: EntityPlayer): void {
|
|
61
|
+
const existingHealthMap = mapGetPlayer(v.run.edenPlayerHealth, player);
|
|
62
|
+
if (existingHealthMap !== undefined) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const playerHealth = getPlayerHealth(player);
|
|
67
|
+
mapSetPlayer(v.run.edenPlayerHealth, player, playerHealth);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Helper function to get the health that Eden started with at the beginning of the run before any
|
|
72
|
+
* of the random collectibles were added.
|
|
73
|
+
*
|
|
74
|
+
* Returns undefined if passed a player that is not Eden.
|
|
75
|
+
*
|
|
76
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
|
|
77
|
+
*/
|
|
78
|
+
@Exported
|
|
79
|
+
public getEdenStartingHealth(
|
|
80
|
+
player: EntityPlayer,
|
|
81
|
+
): Readonly<PlayerHealth> | undefined {
|
|
82
|
+
return mapGetPlayer(v.run.edenPlayerHealth, player);
|
|
83
|
+
}
|
|
51
84
|
|
|
52
85
|
/**
|
|
53
|
-
* Helper function to get the value of the randomized starting stat for Eden
|
|
54
|
-
*
|
|
86
|
+
* Helper function to get the value of the randomized starting stat for Eden that was assigned at
|
|
87
|
+
* the beginning of the run before any of the random collectibles were added.
|
|
55
88
|
*
|
|
56
89
|
* Returns undefined if passed a player that is not Eden.
|
|
57
90
|
*
|
|
@@ -72,7 +105,7 @@ export class EdenStartingStats extends Feature {
|
|
|
72
105
|
|
|
73
106
|
/**
|
|
74
107
|
* Helper function to get all of the stat values that Eden started with at the beginning of the
|
|
75
|
-
* run.
|
|
108
|
+
* run before any of the random collectibles were added.
|
|
76
109
|
*
|
|
77
110
|
* Returns undefined if passed a player that is not Eden.
|
|
78
111
|
*
|
|
@@ -9,15 +9,13 @@ import { game } from "../../../core/cachedClasses";
|
|
|
9
9
|
import { Exported } from "../../../decorators";
|
|
10
10
|
import { ISCFeature } from "../../../enums/ISCFeature";
|
|
11
11
|
import { collectibleHasTag } from "../../../functions/collectibleTag";
|
|
12
|
+
import { anyPlayerHasCollectible } from "../../../functions/playerCollectibles";
|
|
12
13
|
import {
|
|
13
14
|
mapGetPlayer,
|
|
14
15
|
mapSetPlayer,
|
|
15
16
|
} from "../../../functions/playerDataStructures";
|
|
16
17
|
import { getAllPlayers } from "../../../functions/playerIndex";
|
|
17
|
-
import {
|
|
18
|
-
anyPlayerHasCollectible,
|
|
19
|
-
getPlayersOfType,
|
|
20
|
-
} from "../../../functions/players";
|
|
18
|
+
import { getPlayersOfType } from "../../../functions/players";
|
|
21
19
|
import { repeat } from "../../../functions/utils";
|
|
22
20
|
import type { PlayerIndex } from "../../../types/PlayerIndex";
|
|
23
21
|
import { Feature } from "../../private/Feature";
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
} from "../../../functions/entitiesSpecific";
|
|
15
15
|
import { isTear } from "../../../functions/isaacAPIClass";
|
|
16
16
|
import { logError } from "../../../functions/logMisc";
|
|
17
|
+
import { useActiveItemTemp } from "../../../functions/playerCollectibles";
|
|
17
18
|
import { getAllPlayers } from "../../../functions/playerIndex";
|
|
18
|
-
import { useActiveItemTemp } from "../../../functions/players";
|
|
19
19
|
import { getTSTLClassName } from "../../../functions/tstlClass";
|
|
20
20
|
import { assertDefined } from "../../../functions/utils";
|
|
21
21
|
import { ReadonlySet } from "../../../types/ReadonlySet";
|
|
@@ -107,13 +107,13 @@ import {
|
|
|
107
107
|
spawnTrinket as spawnTrinketFunction,
|
|
108
108
|
} from "../../../../functions/pickupsSpecific";
|
|
109
109
|
import { getPillEffectName } from "../../../../functions/pills";
|
|
110
|
-
import { getPlayers } from "../../../../functions/playerIndex";
|
|
111
110
|
import {
|
|
112
111
|
addCollectibleCostume,
|
|
113
|
-
getPlayerName,
|
|
114
112
|
removeCollectibleCostume,
|
|
115
113
|
useActiveItemTemp,
|
|
116
|
-
} from "../../../../functions/
|
|
114
|
+
} from "../../../../functions/playerCollectibles";
|
|
115
|
+
import { getPlayers } from "../../../../functions/playerIndex";
|
|
116
|
+
import { getPlayerName } from "../../../../functions/players";
|
|
117
117
|
import { gridCoordinatesToWorldPosition } from "../../../../functions/roomGrid";
|
|
118
118
|
import { reloadRoom as reloadRoomFunction } from "../../../../functions/roomTransition";
|
|
119
119
|
import { changeRoom } from "../../../../functions/rooms";
|
package/src/enums/ISCFeature.ts
CHANGED
package/src/features.ts
CHANGED
|
@@ -26,7 +26,7 @@ import { DebugDisplay } from "./classes/features/other/DebugDisplay";
|
|
|
26
26
|
import { DeployJSONRoom } from "./classes/features/other/DeployJSONRoom";
|
|
27
27
|
import { DisableAllSound } from "./classes/features/other/DisableAllSound";
|
|
28
28
|
import { DisableInputs } from "./classes/features/other/DisableInputs";
|
|
29
|
-
import {
|
|
29
|
+
import { EdenStartingStatsHealth } from "./classes/features/other/EdenStartingStatsHealth";
|
|
30
30
|
import { ExtraConsoleCommands } from "./classes/features/other/ExtraConsoleCommands";
|
|
31
31
|
import { FadeInRemover } from "./classes/features/other/FadeInRemover";
|
|
32
32
|
import { FastReset } from "./classes/features/other/FastReset";
|
|
@@ -92,7 +92,7 @@ export interface ISCFeatureToClass {
|
|
|
92
92
|
[ISCFeature.DEPLOY_JSON_ROOM]: DeployJSONRoom;
|
|
93
93
|
[ISCFeature.DISABLE_ALL_SOUND]: DisableAllSound;
|
|
94
94
|
[ISCFeature.DISABLE_INPUTS]: DisableInputs;
|
|
95
|
-
[ISCFeature.
|
|
95
|
+
[ISCFeature.EDEN_STARTING_STATS_HEALTH]: EdenStartingStatsHealth;
|
|
96
96
|
[ISCFeature.FADE_IN_REMOVER]: FadeInRemover;
|
|
97
97
|
[ISCFeature.FAST_RESET]: FastReset;
|
|
98
98
|
[ISCFeature.FLYING_DETECTION]: FlyingDetection;
|
|
@@ -274,7 +274,7 @@ export function getFeatures(
|
|
|
274
274
|
),
|
|
275
275
|
[ISCFeature.DISABLE_ALL_SOUND]: disableAllSound,
|
|
276
276
|
[ISCFeature.DISABLE_INPUTS]: disableInputs,
|
|
277
|
-
[ISCFeature.
|
|
277
|
+
[ISCFeature.EDEN_STARTING_STATS_HEALTH]: new EdenStartingStatsHealth(),
|
|
278
278
|
[ISCFeature.FADE_IN_REMOVER]: new FadeInRemover(),
|
|
279
279
|
[ISCFeature.FAST_RESET]: new FastReset(),
|
|
280
280
|
[ISCFeature.FLYING_DETECTION]: new FlyingDetection(moddedElementSets),
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
CollectibleType,
|
|
3
|
+
TrinketType,
|
|
4
|
+
} from "isaac-typescript-definitions";
|
|
2
5
|
import { PlayerType } from "isaac-typescript-definitions";
|
|
3
6
|
import { FLYING_CHARACTERS, MAIN_CHARACTERS } from "../core/constants";
|
|
4
7
|
import { LAST_VANILLA_CHARACTER } from "../core/constantsFirstLast";
|
|
5
8
|
import { CHARACTER_DAMAGE_MULTIPLIERS } from "../objects/characterDamageMultipliers";
|
|
6
9
|
import { CHARACTER_NAMES } from "../objects/characterNames";
|
|
7
|
-
import {
|
|
10
|
+
import { CHARACTER_STARTING_COLLECTIBLE_TYPES } from "../objects/characterStartingCollectibleTypes";
|
|
11
|
+
import { CHARACTER_STARTING_TRINKET_TYPE } from "../objects/characterStartingTrinketTypes";
|
|
8
12
|
import { CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET } from "../sets/charactersThatStartWithAnActiveItemSet";
|
|
9
13
|
import { CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET } from "../sets/charactersWithBlackHeartFromEternalHeartSet";
|
|
10
14
|
import { CHARACTERS_WITH_FREE_DEVIL_DEALS_SET } from "../sets/charactersWithFreeDevilDealsSet";
|
|
@@ -137,10 +141,22 @@ export function getCharacterName(character: PlayerType): string {
|
|
|
137
141
|
*
|
|
138
142
|
* Note that this will return an empty array for Eden and Tainted Eden.
|
|
139
143
|
*/
|
|
140
|
-
export function
|
|
144
|
+
export function getCharacterStartingCollectibleTypes(
|
|
141
145
|
character: PlayerType,
|
|
142
146
|
): readonly CollectibleType[] {
|
|
143
|
-
return
|
|
147
|
+
return CHARACTER_STARTING_COLLECTIBLE_TYPES[character];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Helper function to get the trinket that is granted to a particular character at the beginning of
|
|
152
|
+
* a run. Returns undefined if the character does not start with a trinket.
|
|
153
|
+
*
|
|
154
|
+
* Note that this will return undefined for Eden and Tainted Eden.
|
|
155
|
+
*/
|
|
156
|
+
export function getCharacterStartingTrinketType(
|
|
157
|
+
character: PlayerType,
|
|
158
|
+
): TrinketType | undefined {
|
|
159
|
+
return CHARACTER_STARTING_TRINKET_TYPE[character];
|
|
144
160
|
}
|
|
145
161
|
|
|
146
162
|
export function isFlyingCharacter(character: PlayerType): boolean {
|
package/src/functions/charge.ts
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
getCollectibleChargeType,
|
|
11
11
|
getCollectibleMaxCharges,
|
|
12
12
|
} from "./collectibles";
|
|
13
|
+
import { getActiveItemSlots } from "./playerCollectibles";
|
|
13
14
|
import { getPlayers } from "./playerIndex";
|
|
14
|
-
import { getActiveItemSlots } from "./players";
|
|
15
15
|
import { getRoomShapeCharges } from "./roomShape";
|
|
16
16
|
|
|
17
17
|
/**
|