isaacscript-common 83.3.0 → 83.4.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/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -1
- package/dist/classes/callbacks/PostPlayerFatalDamage.lua +6 -0
- package/dist/classes/features/other/extraConsoleCommands/commands.d.ts +3 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +51 -32
- package/dist/functions/pills.d.ts +2 -0
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +7 -5
- package/dist/index.rollup.d.ts +2 -0
- package/dist/isaacscript-common.lua +65 -38
- package/package.json +1 -1
- package/src/classes/callbacks/PostPlayerFatalDamage.ts +9 -5
- package/src/classes/features/other/extraConsoleCommands/commands.ts +21 -2
- package/src/functions/pills.ts +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../src/classes/callbacks/PostPlayerFatalDamage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../src/classes/callbacks/PostPlayerFatalDamage.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAYlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,wBAAwB,CAAC;IACnF,CAAC;;YANf,6DAA6D;;;MAMzC;;IAetB,UAAmB,UAAU,0BAAoB;IAEjD;;;OAGG;IAGH,OAAO,CAAC,QAAQ,CAAC,eAAe,CA8B9B;IAGF,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CA+ClC;CACH"}
|
|
@@ -7,12 +7,15 @@ local ____exports = {}
|
|
|
7
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
8
|
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
9
9
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
10
|
+
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
10
11
|
local DamageFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DamageFlagZero
|
|
11
12
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
12
13
|
local ____cachedClasses = require("core.cachedClasses")
|
|
13
14
|
local game = ____cachedClasses.game
|
|
14
15
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
15
16
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
17
|
+
local ____flag = require("functions.flag")
|
|
18
|
+
local hasFlag = ____flag.hasFlag
|
|
16
19
|
local ____playerDataStructures = require("functions.playerDataStructures")
|
|
17
20
|
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
18
21
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
@@ -62,6 +65,9 @@ function PostPlayerFatalDamage.prototype.____constructor(self)
|
|
|
62
65
|
local gameFrameCount = game:GetFrameCount()
|
|
63
66
|
local lastDamageGameFrame = mapGetPlayer(nil, v.run.playersLastDamageGameFrame, player)
|
|
64
67
|
mapSetPlayer(nil, v.run.playersLastDamageGameFrame, player, gameFrameCount)
|
|
68
|
+
if hasFlag(nil, damageFlags, DamageFlag.NO_KILL) then
|
|
69
|
+
return nil
|
|
70
|
+
end
|
|
65
71
|
if willPlayerRevive(nil, player) then
|
|
66
72
|
return nil
|
|
67
73
|
end
|
|
@@ -198,6 +198,8 @@ export declare function gridEntities(): void;
|
|
|
198
198
|
export declare function hearts(params: string): void;
|
|
199
199
|
/** Alias for the "debug 6" command. */
|
|
200
200
|
export declare function hitboxes(): void;
|
|
201
|
+
/** The same thing as the `pill` command, but gives a horse pill instead of a normal pill. */
|
|
202
|
+
export declare function horse(params: string): void;
|
|
201
203
|
/** Warps to the Blue Womb Boss Room. */
|
|
202
204
|
export declare function hush(): void;
|
|
203
205
|
/** Warps to the I AM ERROR room for the floor. */
|
|
@@ -278,7 +280,7 @@ export declare function oneHP(): void;
|
|
|
278
280
|
* - `pill 5` - Gives a "Full Health" pill.
|
|
279
281
|
* - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
280
282
|
*/
|
|
281
|
-
export declare function pill(params: string): void;
|
|
283
|
+
export declare function pill(params: string, isHorse?: boolean): void;
|
|
282
284
|
/** Spawns every pill on the ground, starting at the top-left-most tile. */
|
|
283
285
|
export declare function pills(): void;
|
|
284
286
|
/** Warps to the first Planetarium on the floor. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"AAiJA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAuC/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAG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I,CAEzB"}
|
|
@@ -16,6 +16,7 @@ local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
|
16
16
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
17
17
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
18
18
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
19
|
+
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
19
20
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
20
21
|
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
21
22
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
@@ -72,6 +73,7 @@ local spawnCard = ____pickupsSpecific.spawnCard
|
|
|
72
73
|
local spawnPill = ____pickupsSpecific.spawnPill
|
|
73
74
|
local spawnTrinketFunction = ____pickupsSpecific.spawnTrinket
|
|
74
75
|
local ____pills = require("functions.pills")
|
|
76
|
+
local getHorsePillColor = ____pills.getHorsePillColor
|
|
75
77
|
local getPillEffectName = ____pills.getPillEffectName
|
|
76
78
|
local isValidPillEffect = ____pills.isValidPillEffect
|
|
77
79
|
local ____playerCollectibles = require("functions.playerCollectibles")
|
|
@@ -196,6 +198,51 @@ function ____exports.oneHP(self)
|
|
|
196
198
|
end
|
|
197
199
|
print("Set every NPC to 1 HP.")
|
|
198
200
|
end
|
|
201
|
+
--- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
|
|
202
|
+
-- the effect.
|
|
203
|
+
--
|
|
204
|
+
-- For example:
|
|
205
|
+
--
|
|
206
|
+
-- - `pill 5` - Gives a "Full Health" pill.
|
|
207
|
+
-- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
208
|
+
function ____exports.pill(self, params, isHorse)
|
|
209
|
+
if isHorse == nil then
|
|
210
|
+
isHorse = false
|
|
211
|
+
end
|
|
212
|
+
if params == "" then
|
|
213
|
+
print("You must specify a pill name or number.")
|
|
214
|
+
return
|
|
215
|
+
end
|
|
216
|
+
local pillEffect
|
|
217
|
+
local num = parseIntSafe(nil, params)
|
|
218
|
+
if num == nil then
|
|
219
|
+
local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
|
|
220
|
+
if match == nil then
|
|
221
|
+
print("Unknown pill effect: " .. params)
|
|
222
|
+
return
|
|
223
|
+
end
|
|
224
|
+
pillEffect = match[2]
|
|
225
|
+
else
|
|
226
|
+
if not isValidPillEffect(nil, num) then
|
|
227
|
+
print("Invalid pill effect ID: " .. tostring(num))
|
|
228
|
+
return
|
|
229
|
+
end
|
|
230
|
+
pillEffect = num
|
|
231
|
+
end
|
|
232
|
+
local pillEffectName = getPillEffectName(nil, pillEffect)
|
|
233
|
+
Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
|
|
234
|
+
if isHorse then
|
|
235
|
+
local player = Isaac.GetPlayer()
|
|
236
|
+
local pillColor = player:GetPill(PocketItemSlot.SLOT_1)
|
|
237
|
+
local horsePillColor = getHorsePillColor(nil, pillColor)
|
|
238
|
+
player:SetPill(PocketItemSlot.SLOT_1, horsePillColor)
|
|
239
|
+
end
|
|
240
|
+
if isHorse then
|
|
241
|
+
print(((("Gave horse pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
242
|
+
else
|
|
243
|
+
print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
244
|
+
end
|
|
245
|
+
end
|
|
199
246
|
--- Gives a poop mana charge. This only affects Tainted Blue Baby. Provide a number to give a custom
|
|
200
247
|
-- amount of charges. (You can use negative numbers to remove charges.)
|
|
201
248
|
function ____exports.poopMana(self, params)
|
|
@@ -853,6 +900,10 @@ end
|
|
|
853
900
|
function ____exports.hitboxes(self)
|
|
854
901
|
Isaac.ExecuteCommand("debug 6")
|
|
855
902
|
end
|
|
903
|
+
--- The same thing as the `pill` command, but gives a horse pill instead of a normal pill.
|
|
904
|
+
function ____exports.horse(self, params)
|
|
905
|
+
____exports.pill(nil, params, true)
|
|
906
|
+
end
|
|
856
907
|
--- Warps to the Blue Womb Boss Room.
|
|
857
908
|
function ____exports.hush(self)
|
|
858
909
|
setStage(nil, LevelStage.BLUE_WOMB, StageType.ORIGINAL)
|
|
@@ -977,38 +1028,6 @@ end
|
|
|
977
1028
|
function ____exports.noCurses(self)
|
|
978
1029
|
____exports.disableCurses(nil)
|
|
979
1030
|
end
|
|
980
|
-
--- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
|
|
981
|
-
-- the effect.
|
|
982
|
-
--
|
|
983
|
-
-- For example:
|
|
984
|
-
--
|
|
985
|
-
-- - `pill 5` - Gives a "Full Health" pill.
|
|
986
|
-
-- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
987
|
-
function ____exports.pill(self, params)
|
|
988
|
-
if params == "" then
|
|
989
|
-
print("You must specify a pill name or number.")
|
|
990
|
-
return
|
|
991
|
-
end
|
|
992
|
-
local pillEffect
|
|
993
|
-
local num = parseIntSafe(nil, params)
|
|
994
|
-
if num == nil then
|
|
995
|
-
local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
|
|
996
|
-
if match == nil then
|
|
997
|
-
print("Unknown pill effect: " .. params)
|
|
998
|
-
return
|
|
999
|
-
end
|
|
1000
|
-
pillEffect = match[2]
|
|
1001
|
-
else
|
|
1002
|
-
if not isValidPillEffect(nil, num) then
|
|
1003
|
-
print("Invalid pill effect ID: " .. tostring(num))
|
|
1004
|
-
return
|
|
1005
|
-
end
|
|
1006
|
-
pillEffect = num
|
|
1007
|
-
end
|
|
1008
|
-
local pillEffectName = getPillEffectName(nil, pillEffect)
|
|
1009
|
-
Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
|
|
1010
|
-
print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
1011
|
-
end
|
|
1012
1031
|
--- Spawns every pill on the ground, starting at the top-left-most tile.
|
|
1013
1032
|
function ____exports.pills(self)
|
|
1014
1033
|
local y
|
|
@@ -15,6 +15,8 @@ export declare function getFalsePHDPillEffect(pillEffect: PillEffect): PillEffec
|
|
|
15
15
|
*
|
|
16
16
|
* For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
|
|
17
17
|
* corresponds to the horse pill color for blue/blue.
|
|
18
|
+
*
|
|
19
|
+
* If passed a horse pill color, this function will return the unmodified pill color.
|
|
18
20
|
*/
|
|
19
21
|
export declare function getHorsePillColor(pillColor: PillColor): PillColor;
|
|
20
22
|
/** Helper function to get an array with every non-gold horse pill color. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../src/functions/pills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAqCzD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,SAAS,EAAE,CAEvD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAGxE;AAED
|
|
1
|
+
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../src/functions/pills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAqCzD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,SAAS,EAAE,CAEvD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAGxE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,SA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|
3
3
|
local ____exports = {}
|
|
4
|
-
local
|
|
4
|
+
local HORSE_PILL_COLOR_ADJUSTMENT
|
|
5
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
6
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
7
7
|
local ____cachedEnumValues = require("arrays.cachedEnumValues")
|
|
@@ -38,12 +38,12 @@ local ____utils = require("functions.utils")
|
|
|
38
38
|
local iRange = ____utils.iRange
|
|
39
39
|
--- Helper function to see if the given pill color is a horse pill.
|
|
40
40
|
function ____exports.isHorsePill(self, pillColor)
|
|
41
|
-
return asNumber(nil, pillColor) >
|
|
41
|
+
return asNumber(nil, pillColor) > HORSE_PILL_COLOR_ADJUSTMENT
|
|
42
42
|
end
|
|
43
43
|
function ____exports.isVanillaPillEffect(self, pillEffect)
|
|
44
44
|
return pillEffect <= LAST_VANILLA_PILL_EFFECT
|
|
45
45
|
end
|
|
46
|
-
|
|
46
|
+
HORSE_PILL_COLOR_ADJUSTMENT = 2048
|
|
47
47
|
--- Helper function to get an array with every non-null pill color. This includes all gold colors and
|
|
48
48
|
-- all horse colors.
|
|
49
49
|
function ____exports.getAllPillColors(self)
|
|
@@ -59,8 +59,10 @@ end
|
|
|
59
59
|
--
|
|
60
60
|
-- For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
|
|
61
61
|
-- corresponds to the horse pill color for blue/blue.
|
|
62
|
+
--
|
|
63
|
+
-- If passed a horse pill color, this function will return the unmodified pill color.
|
|
62
64
|
function ____exports.getHorsePillColor(self, pillColor)
|
|
63
|
-
return pillColor +
|
|
65
|
+
return ____exports.isHorsePill(nil, pillColor) and pillColor or pillColor + HORSE_PILL_COLOR_ADJUSTMENT
|
|
64
66
|
end
|
|
65
67
|
--- Helper function to get an array with every non-gold horse pill color.
|
|
66
68
|
function ____exports.getHorsePillColors(self)
|
|
@@ -72,7 +74,7 @@ end
|
|
|
72
74
|
--
|
|
73
75
|
-- If called with a non-horse pill color, this function will return back the same color.
|
|
74
76
|
function ____exports.getNormalPillColorFromHorse(self, pillColor)
|
|
75
|
-
return ____exports.isHorsePill(nil, pillColor) and asPillColor(nil, pillColor -
|
|
77
|
+
return ____exports.isHorsePill(nil, pillColor) and asPillColor(nil, pillColor - HORSE_PILL_COLOR_ADJUSTMENT) or pillColor
|
|
76
78
|
end
|
|
77
79
|
--- Helper function to get an array with every non-gold and non-horse pill color.
|
|
78
80
|
function ____exports.getNormalPillColors(self)
|
package/dist/index.rollup.d.ts
CHANGED
|
@@ -6107,6 +6107,8 @@ export declare function getHighestEnumValue<T extends TranspiledEnum>(transpiled
|
|
|
6107
6107
|
*
|
|
6108
6108
|
* For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
|
|
6109
6109
|
* corresponds to the horse pill color for blue/blue.
|
|
6110
|
+
*
|
|
6111
|
+
* If passed a horse pill color, this function will return the unmodified pill color.
|
|
6110
6112
|
*/
|
|
6111
6113
|
export declare function getHorsePillColor(pillColor: PillColor): PillColor;
|
|
6112
6114
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 83.
|
|
3
|
+
isaacscript-common 83.4.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -37042,12 +37042,15 @@ local ____exports = {}
|
|
|
37042
37042
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
37043
37043
|
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
37044
37044
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
37045
|
+
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
37045
37046
|
local DamageFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DamageFlagZero
|
|
37046
37047
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
37047
37048
|
local ____cachedClasses = require("core.cachedClasses")
|
|
37048
37049
|
local game = ____cachedClasses.game
|
|
37049
37050
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
37050
37051
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
37052
|
+
local ____flag = require("functions.flag")
|
|
37053
|
+
local hasFlag = ____flag.hasFlag
|
|
37051
37054
|
local ____playerDataStructures = require("functions.playerDataStructures")
|
|
37052
37055
|
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
37053
37056
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
@@ -37097,6 +37100,9 @@ function PostPlayerFatalDamage.prototype.____constructor(self)
|
|
|
37097
37100
|
local gameFrameCount = game:GetFrameCount()
|
|
37098
37101
|
local lastDamageGameFrame = mapGetPlayer(nil, v.run.playersLastDamageGameFrame, player)
|
|
37099
37102
|
mapSetPlayer(nil, v.run.playersLastDamageGameFrame, player, gameFrameCount)
|
|
37103
|
+
if hasFlag(nil, damageFlags, DamageFlag.NO_KILL) then
|
|
37104
|
+
return nil
|
|
37105
|
+
end
|
|
37100
37106
|
if willPlayerRevive(nil, player) then
|
|
37101
37107
|
return nil
|
|
37102
37108
|
end
|
|
@@ -38625,7 +38631,7 @@ return ____exports
|
|
|
38625
38631
|
local ____lualib = require("lualib_bundle")
|
|
38626
38632
|
local __TS__ArraySlice = ____lualib.__TS__ArraySlice
|
|
38627
38633
|
local ____exports = {}
|
|
38628
|
-
local
|
|
38634
|
+
local HORSE_PILL_COLOR_ADJUSTMENT
|
|
38629
38635
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
38630
38636
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
38631
38637
|
local ____cachedEnumValues = require("arrays.cachedEnumValues")
|
|
@@ -38662,12 +38668,12 @@ local ____utils = require("functions.utils")
|
|
|
38662
38668
|
local iRange = ____utils.iRange
|
|
38663
38669
|
--- Helper function to see if the given pill color is a horse pill.
|
|
38664
38670
|
function ____exports.isHorsePill(self, pillColor)
|
|
38665
|
-
return asNumber(nil, pillColor) >
|
|
38671
|
+
return asNumber(nil, pillColor) > HORSE_PILL_COLOR_ADJUSTMENT
|
|
38666
38672
|
end
|
|
38667
38673
|
function ____exports.isVanillaPillEffect(self, pillEffect)
|
|
38668
38674
|
return pillEffect <= LAST_VANILLA_PILL_EFFECT
|
|
38669
38675
|
end
|
|
38670
|
-
|
|
38676
|
+
HORSE_PILL_COLOR_ADJUSTMENT = 2048
|
|
38671
38677
|
--- Helper function to get an array with every non-null pill color. This includes all gold colors and
|
|
38672
38678
|
-- all horse colors.
|
|
38673
38679
|
function ____exports.getAllPillColors(self)
|
|
@@ -38683,8 +38689,10 @@ end
|
|
|
38683
38689
|
--
|
|
38684
38690
|
-- For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
|
|
38685
38691
|
-- corresponds to the horse pill color for blue/blue.
|
|
38692
|
+
--
|
|
38693
|
+
-- If passed a horse pill color, this function will return the unmodified pill color.
|
|
38686
38694
|
function ____exports.getHorsePillColor(self, pillColor)
|
|
38687
|
-
return pillColor +
|
|
38695
|
+
return ____exports.isHorsePill(nil, pillColor) and pillColor or pillColor + HORSE_PILL_COLOR_ADJUSTMENT
|
|
38688
38696
|
end
|
|
38689
38697
|
--- Helper function to get an array with every non-gold horse pill color.
|
|
38690
38698
|
function ____exports.getHorsePillColors(self)
|
|
@@ -38696,7 +38704,7 @@ end
|
|
|
38696
38704
|
--
|
|
38697
38705
|
-- If called with a non-horse pill color, this function will return back the same color.
|
|
38698
38706
|
function ____exports.getNormalPillColorFromHorse(self, pillColor)
|
|
38699
|
-
return ____exports.isHorsePill(nil, pillColor) and asPillColor(nil, pillColor -
|
|
38707
|
+
return ____exports.isHorsePill(nil, pillColor) and asPillColor(nil, pillColor - HORSE_PILL_COLOR_ADJUSTMENT) or pillColor
|
|
38700
38708
|
end
|
|
38701
38709
|
--- Helper function to get an array with every non-gold and non-horse pill color.
|
|
38702
38710
|
function ____exports.getNormalPillColors(self)
|
|
@@ -60218,6 +60226,7 @@ local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
|
60218
60226
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
60219
60227
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
60220
60228
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
60229
|
+
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
60221
60230
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
60222
60231
|
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
60223
60232
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
@@ -60274,6 +60283,7 @@ local spawnCard = ____pickupsSpecific.spawnCard
|
|
|
60274
60283
|
local spawnPill = ____pickupsSpecific.spawnPill
|
|
60275
60284
|
local spawnTrinketFunction = ____pickupsSpecific.spawnTrinket
|
|
60276
60285
|
local ____pills = require("functions.pills")
|
|
60286
|
+
local getHorsePillColor = ____pills.getHorsePillColor
|
|
60277
60287
|
local getPillEffectName = ____pills.getPillEffectName
|
|
60278
60288
|
local isValidPillEffect = ____pills.isValidPillEffect
|
|
60279
60289
|
local ____playerCollectibles = require("functions.playerCollectibles")
|
|
@@ -60398,6 +60408,51 @@ function ____exports.oneHP(self)
|
|
|
60398
60408
|
end
|
|
60399
60409
|
print("Set every NPC to 1 HP.")
|
|
60400
60410
|
end
|
|
60411
|
+
--- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
|
|
60412
|
+
-- the effect.
|
|
60413
|
+
--
|
|
60414
|
+
-- For example:
|
|
60415
|
+
--
|
|
60416
|
+
-- - `pill 5` - Gives a "Full Health" pill.
|
|
60417
|
+
-- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
60418
|
+
function ____exports.pill(self, params, isHorse)
|
|
60419
|
+
if isHorse == nil then
|
|
60420
|
+
isHorse = false
|
|
60421
|
+
end
|
|
60422
|
+
if params == "" then
|
|
60423
|
+
print("You must specify a pill name or number.")
|
|
60424
|
+
return
|
|
60425
|
+
end
|
|
60426
|
+
local pillEffect
|
|
60427
|
+
local num = parseIntSafe(nil, params)
|
|
60428
|
+
if num == nil then
|
|
60429
|
+
local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
|
|
60430
|
+
if match == nil then
|
|
60431
|
+
print("Unknown pill effect: " .. params)
|
|
60432
|
+
return
|
|
60433
|
+
end
|
|
60434
|
+
pillEffect = match[2]
|
|
60435
|
+
else
|
|
60436
|
+
if not isValidPillEffect(nil, num) then
|
|
60437
|
+
print("Invalid pill effect ID: " .. tostring(num))
|
|
60438
|
+
return
|
|
60439
|
+
end
|
|
60440
|
+
pillEffect = num
|
|
60441
|
+
end
|
|
60442
|
+
local pillEffectName = getPillEffectName(nil, pillEffect)
|
|
60443
|
+
Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
|
|
60444
|
+
if isHorse then
|
|
60445
|
+
local player = Isaac.GetPlayer()
|
|
60446
|
+
local pillColor = player:GetPill(PocketItemSlot.SLOT_1)
|
|
60447
|
+
local horsePillColor = getHorsePillColor(nil, pillColor)
|
|
60448
|
+
player:SetPill(PocketItemSlot.SLOT_1, horsePillColor)
|
|
60449
|
+
end
|
|
60450
|
+
if isHorse then
|
|
60451
|
+
print(((("Gave horse pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
60452
|
+
else
|
|
60453
|
+
print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
60454
|
+
end
|
|
60455
|
+
end
|
|
60401
60456
|
--- Gives a poop mana charge. This only affects Tainted Blue Baby. Provide a number to give a custom
|
|
60402
60457
|
-- amount of charges. (You can use negative numbers to remove charges.)
|
|
60403
60458
|
function ____exports.poopMana(self, params)
|
|
@@ -61055,6 +61110,10 @@ end
|
|
|
61055
61110
|
function ____exports.hitboxes(self)
|
|
61056
61111
|
Isaac.ExecuteCommand("debug 6")
|
|
61057
61112
|
end
|
|
61113
|
+
--- The same thing as the `pill` command, but gives a horse pill instead of a normal pill.
|
|
61114
|
+
function ____exports.horse(self, params)
|
|
61115
|
+
____exports.pill(nil, params, true)
|
|
61116
|
+
end
|
|
61058
61117
|
--- Warps to the Blue Womb Boss Room.
|
|
61059
61118
|
function ____exports.hush(self)
|
|
61060
61119
|
setStage(nil, LevelStage.BLUE_WOMB, StageType.ORIGINAL)
|
|
@@ -61179,38 +61238,6 @@ end
|
|
|
61179
61238
|
function ____exports.noCurses(self)
|
|
61180
61239
|
____exports.disableCurses(nil)
|
|
61181
61240
|
end
|
|
61182
|
-
--- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
|
|
61183
|
-
-- the effect.
|
|
61184
|
-
--
|
|
61185
|
-
-- For example:
|
|
61186
|
-
--
|
|
61187
|
-
-- - `pill 5` - Gives a "Full Health" pill.
|
|
61188
|
-
-- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
61189
|
-
function ____exports.pill(self, params)
|
|
61190
|
-
if params == "" then
|
|
61191
|
-
print("You must specify a pill name or number.")
|
|
61192
|
-
return
|
|
61193
|
-
end
|
|
61194
|
-
local pillEffect
|
|
61195
|
-
local num = parseIntSafe(nil, params)
|
|
61196
|
-
if num == nil then
|
|
61197
|
-
local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
|
|
61198
|
-
if match == nil then
|
|
61199
|
-
print("Unknown pill effect: " .. params)
|
|
61200
|
-
return
|
|
61201
|
-
end
|
|
61202
|
-
pillEffect = match[2]
|
|
61203
|
-
else
|
|
61204
|
-
if not isValidPillEffect(nil, num) then
|
|
61205
|
-
print("Invalid pill effect ID: " .. tostring(num))
|
|
61206
|
-
return
|
|
61207
|
-
end
|
|
61208
|
-
pillEffect = num
|
|
61209
|
-
end
|
|
61210
|
-
local pillEffectName = getPillEffectName(nil, pillEffect)
|
|
61211
|
-
Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
|
|
61212
|
-
print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
61213
|
-
end
|
|
61214
61241
|
--- Spawns every pill on the ground, starting at the top-left-most tile.
|
|
61215
61242
|
function ____exports.pills(self)
|
|
61216
61243
|
local y
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ActiveSlot,
|
|
3
|
-
DamageFlag,
|
|
4
|
-
UseFlag,
|
|
5
|
-
} from "isaac-typescript-definitions";
|
|
1
|
+
import type { ActiveSlot, UseFlag } from "isaac-typescript-definitions";
|
|
6
2
|
import {
|
|
7
3
|
BossID,
|
|
8
4
|
CollectibleType,
|
|
5
|
+
DamageFlag,
|
|
9
6
|
DamageFlagZero,
|
|
10
7
|
ModCallback,
|
|
11
8
|
} from "isaac-typescript-definitions";
|
|
12
9
|
import { game } from "../../core/cachedClasses";
|
|
13
10
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
11
|
+
import { hasFlag } from "../../functions/flag";
|
|
14
12
|
import {
|
|
15
13
|
mapGetPlayer,
|
|
16
14
|
mapSetPlayer,
|
|
@@ -109,6 +107,12 @@ export class PostPlayerFatalDamage extends CustomCallback<ModCallbackCustom.POST
|
|
|
109
107
|
);
|
|
110
108
|
mapSetPlayer(v.run.playersLastDamageGameFrame, player, gameFrameCount);
|
|
111
109
|
|
|
110
|
+
// If the damage has the damage flag of `DamageFlag.NO_KILL` (1 << 0), this will not be fatal
|
|
111
|
+
// damage. (This is present on things like the Bad Trip pill.)
|
|
112
|
+
if (hasFlag(damageFlags, DamageFlag.NO_KILL)) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
|
|
112
116
|
// If the player has a revival item such as Dead Cat, this will not be fatal damage.
|
|
113
117
|
if (willPlayerRevive(player)) {
|
|
114
118
|
return undefined;
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
LevelStage,
|
|
56
56
|
PillColor,
|
|
57
57
|
PlayerType,
|
|
58
|
+
PocketItemSlot,
|
|
58
59
|
RoomType,
|
|
59
60
|
SoundEffect,
|
|
60
61
|
StageType,
|
|
@@ -98,6 +99,7 @@ import {
|
|
|
98
99
|
spawnTrinket as spawnTrinketFunction,
|
|
99
100
|
} from "../../../../functions/pickupsSpecific";
|
|
100
101
|
import {
|
|
102
|
+
getHorsePillColor,
|
|
101
103
|
getPillEffectName,
|
|
102
104
|
isValidPillEffect,
|
|
103
105
|
} from "../../../../functions/pills";
|
|
@@ -843,6 +845,11 @@ export function hitboxes(): void {
|
|
|
843
845
|
Isaac.ExecuteCommand("debug 6");
|
|
844
846
|
}
|
|
845
847
|
|
|
848
|
+
/** The same thing as the `pill` command, but gives a horse pill instead of a normal pill. */
|
|
849
|
+
export function horse(params: string): void {
|
|
850
|
+
pill(params, true);
|
|
851
|
+
}
|
|
852
|
+
|
|
846
853
|
/** Warps to the Blue Womb Boss Room. */
|
|
847
854
|
export function hush(): void {
|
|
848
855
|
setStage(LevelStage.BLUE_WOMB, StageType.ORIGINAL);
|
|
@@ -1036,7 +1043,7 @@ export function oneHP(): void {
|
|
|
1036
1043
|
* - `pill 5` - Gives a "Full Health" pill.
|
|
1037
1044
|
* - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
|
|
1038
1045
|
*/
|
|
1039
|
-
export function pill(params: string): void {
|
|
1046
|
+
export function pill(params: string, isHorse = false): void {
|
|
1040
1047
|
if (params === "") {
|
|
1041
1048
|
print("You must specify a pill name or number.");
|
|
1042
1049
|
return;
|
|
@@ -1063,7 +1070,19 @@ export function pill(params: string): void {
|
|
|
1063
1070
|
|
|
1064
1071
|
const pillEffectName = getPillEffectName(pillEffect);
|
|
1065
1072
|
Isaac.ExecuteCommand(`g p${pillEffect}`);
|
|
1066
|
-
|
|
1073
|
+
|
|
1074
|
+
if (isHorse) {
|
|
1075
|
+
const player = Isaac.GetPlayer();
|
|
1076
|
+
const pillColor = player.GetPill(PocketItemSlot.SLOT_1);
|
|
1077
|
+
const horsePillColor = getHorsePillColor(pillColor);
|
|
1078
|
+
player.SetPill(PocketItemSlot.SLOT_1, horsePillColor);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
if (isHorse) {
|
|
1082
|
+
print(`Gave horse pill: ${pillEffectName} (${pillEffect})`);
|
|
1083
|
+
} else {
|
|
1084
|
+
print(`Gave pill: ${pillEffectName} (${pillEffect})`);
|
|
1085
|
+
}
|
|
1067
1086
|
}
|
|
1068
1087
|
|
|
1069
1088
|
/** Spawns every pill on the ground, starting at the top-left-most tile. */
|
package/src/functions/pills.ts
CHANGED
|
@@ -38,7 +38,7 @@ import { iRange } from "./utils";
|
|
|
38
38
|
*
|
|
39
39
|
* 1 << 11
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const HORSE_PILL_COLOR_ADJUSTMENT = 2048;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Helper function to get an array with every non-null pill color. This includes all gold colors and
|
|
@@ -62,9 +62,13 @@ export function getFalsePHDPillEffect(pillEffect: PillEffect): PillEffect {
|
|
|
62
62
|
*
|
|
63
63
|
* For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
|
|
64
64
|
* corresponds to the horse pill color for blue/blue.
|
|
65
|
+
*
|
|
66
|
+
* If passed a horse pill color, this function will return the unmodified pill color.
|
|
65
67
|
*/
|
|
66
68
|
export function getHorsePillColor(pillColor: PillColor): PillColor {
|
|
67
|
-
return pillColor
|
|
69
|
+
return isHorsePill(pillColor)
|
|
70
|
+
? pillColor
|
|
71
|
+
: pillColor + HORSE_PILL_COLOR_ADJUSTMENT;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
/** Helper function to get an array with every non-gold horse pill color. */
|
|
@@ -81,7 +85,7 @@ export function getHorsePillColors(): readonly PillColor[] {
|
|
|
81
85
|
*/
|
|
82
86
|
export function getNormalPillColorFromHorse(pillColor: PillColor): PillColor {
|
|
83
87
|
return isHorsePill(pillColor)
|
|
84
|
-
? asPillColor(pillColor -
|
|
88
|
+
? asPillColor(pillColor - HORSE_PILL_COLOR_ADJUSTMENT)
|
|
85
89
|
: pillColor;
|
|
86
90
|
}
|
|
87
91
|
|
|
@@ -207,7 +211,7 @@ export function isGoldPill(pillColor: PillColor): boolean {
|
|
|
207
211
|
|
|
208
212
|
/** Helper function to see if the given pill color is a horse pill. */
|
|
209
213
|
export function isHorsePill(pillColor: PillColor): boolean {
|
|
210
|
-
return asNumber(pillColor) >
|
|
214
|
+
return asNumber(pillColor) > HORSE_PILL_COLOR_ADJUSTMENT;
|
|
211
215
|
}
|
|
212
216
|
|
|
213
217
|
export function isModdedPillEffect(pillEffect: PillEffect): boolean {
|