isaacscript-common 83.2.0 → 83.4.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.
@@ -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":"AA+IA;;;;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;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,C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;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,IAAI,CAqCnE;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAsB1C;AAED,uDAAuD;AACvD,wBAAgB,MAAM,IAAI,IAAI,CAM7B;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,IAAI,IAAI,CAInC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAkB1C;AAED,wCAAwC;AACxC,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,4CAA4C;AAC5C,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE5C;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC;AAED,yCAAyC;AACzC,wBAAgB,EAAE,IAAI,IAAI,CAEzB"}
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,EAA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AAG,IAAI,CAE5C;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC;AAED,yCAAyC;AACzC,wBAAgB,EAAE,IAAI,IAAI,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
@@ -130,6 +130,11 @@ export declare function filterMap<OldT, NewT>(array: readonly OldT[], func: (ele
130
130
  * the length of the array.
131
131
  */
132
132
  export declare function getArrayCombinations<T>(array: readonly T[], includeEmptyArray: boolean, min?: int, max?: int): ReadonlyArray<readonly T[]>;
133
+ /**
134
+ * Helper function to get the duplicate elements in an array. Only one element for each value will
135
+ * be returned. The elements will be sorted before they are returned.
136
+ */
137
+ export declare function getArrayDuplicateElements<T>(array: readonly T[]): readonly T[];
133
138
  /**
134
139
  * Helper function to get an array containing the indexes of an array.
135
140
  *
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":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H,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAM3E"}
@@ -13,9 +13,11 @@ local __TS__ArraySlice = ____lualib.__TS__ArraySlice
13
13
  local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
14
14
  local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
15
15
  local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
16
+ local Set = ____lualib.Set
17
+ local __TS__Spread = ____lualib.__TS__Spread
18
+ local __TS__ArraySort = ____lualib.__TS__ArraySort
16
19
  local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
17
20
  local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
18
- local Set = ____lualib.Set
19
21
  local __TS__ArraySome = ____lualib.__TS__ArraySome
20
22
  local __TS__ArrayReduce = ____lualib.__TS__ArrayReduce
21
23
  local ____exports = {}
@@ -373,6 +375,20 @@ function ____exports.getArrayCombinations(self, array, includeEmptyArray, min, m
373
375
  end
374
376
  return all
375
377
  end
378
+ --- Helper function to get the duplicate elements in an array. Only one element for each value will
379
+ -- be returned. The elements will be sorted before they are returned.
380
+ function ____exports.getArrayDuplicateElements(self, array)
381
+ local duplicateElements = __TS__New(Set)
382
+ local set = __TS__New(Set)
383
+ for ____, element in ipairs(array) do
384
+ if set:has(element) then
385
+ duplicateElements:add(element)
386
+ end
387
+ set:add(element)
388
+ end
389
+ local values = {__TS__Spread(duplicateElements)}
390
+ return __TS__ArraySort(values)
391
+ end
376
392
  --- Helper function to get an array containing the indexes of an array.
377
393
  --
378
394
  -- For example, an array of `["Apple", "Banana"]` would return an array of `[0, 1]`.
@@ -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;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAEjE;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,IAAI,SAAS,SAAS,EAAE,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAI3E;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,IAAI,SAAS,SAAS,EAAE,CAE1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAGnE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAWxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,GACrB,yBAAyB,CAQ3B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAgBhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,GACrB,wBAAwB,CAQ1B;AAED,wBAA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U,GAAG,SAAS,CAWxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,GACrB,yBAAyB,CAQ3B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAgBhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,GACrB,wBAAwB,CAQ1B;AAED,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,wBAAwB,GACvC,SAAS,UAAU,EAAE,CAEvB;AAED,iGAAiG;AACjG,wBAAgB,UAAU,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAExD;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAEzD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAElE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,GAAG,GAAG,UAAU,IAAI,UAAU,CAI3E;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAEnE"}
@@ -1,7 +1,7 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__ArraySlice = ____lualib.__TS__ArraySlice
3
3
  local ____exports = {}
4
- local HORSE_PILL_ADJUSTMENT
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) > HORSE_PILL_ADJUSTMENT
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
- HORSE_PILL_ADJUSTMENT = 2048
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 + HORSE_PILL_ADJUSTMENT
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 - HORSE_PILL_ADJUSTMENT) or 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)
@@ -5003,6 +5003,12 @@ export declare function getAngleDifference(angle1: float, angle2: float): float;
5003
5003
  */
5004
5004
  export declare function getArrayCombinations<T>(array: readonly T[], includeEmptyArray: boolean, min?: int, max?: int): ReadonlyArray<readonly T[]>;
5005
5005
 
5006
+ /**
5007
+ * Helper function to get the duplicate elements in an array. Only one element for each value will
5008
+ * be returned. The elements will be sorted before they are returned.
5009
+ */
5010
+ export declare function getArrayDuplicateElements<T>(array: readonly T[]): readonly T[];
5011
+
5006
5012
  /**
5007
5013
  * Helper function to get an array containing the indexes of an array.
5008
5014
  *
@@ -6101,6 +6107,8 @@ export declare function getHighestEnumValue<T extends TranspiledEnum>(transpiled
6101
6107
  *
6102
6108
  * For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
6103
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.
6104
6112
  */
6105
6113
  export declare function getHorsePillColor(pillColor: PillColor): PillColor;
6106
6114
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 83.1.0
3
+ isaacscript-common 83.3.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -18692,9 +18692,11 @@ local __TS__ArraySlice = ____lualib.__TS__ArraySlice
18692
18692
  local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
18693
18693
  local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
18694
18694
  local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
18695
+ local Set = ____lualib.Set
18696
+ local __TS__Spread = ____lualib.__TS__Spread
18697
+ local __TS__ArraySort = ____lualib.__TS__ArraySort
18695
18698
  local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
18696
18699
  local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
18697
- local Set = ____lualib.Set
18698
18700
  local __TS__ArraySome = ____lualib.__TS__ArraySome
18699
18701
  local __TS__ArrayReduce = ____lualib.__TS__ArrayReduce
18700
18702
  local ____exports = {}
@@ -19052,6 +19054,20 @@ function ____exports.getArrayCombinations(self, array, includeEmptyArray, min, m
19052
19054
  end
19053
19055
  return all
19054
19056
  end
19057
+ --- Helper function to get the duplicate elements in an array. Only one element for each value will
19058
+ -- be returned. The elements will be sorted before they are returned.
19059
+ function ____exports.getArrayDuplicateElements(self, array)
19060
+ local duplicateElements = __TS__New(Set)
19061
+ local set = __TS__New(Set)
19062
+ for ____, element in ipairs(array) do
19063
+ if set:has(element) then
19064
+ duplicateElements:add(element)
19065
+ end
19066
+ set:add(element)
19067
+ end
19068
+ local values = {__TS__Spread(duplicateElements)}
19069
+ return __TS__ArraySort(values)
19070
+ end
19055
19071
  --- Helper function to get an array containing the indexes of an array.
19056
19072
  --
19057
19073
  -- For example, an array of `["Apple", "Banana"]` would return an array of `[0, 1]`.
@@ -38609,7 +38625,7 @@ return ____exports
38609
38625
  local ____lualib = require("lualib_bundle")
38610
38626
  local __TS__ArraySlice = ____lualib.__TS__ArraySlice
38611
38627
  local ____exports = {}
38612
- local HORSE_PILL_ADJUSTMENT
38628
+ local HORSE_PILL_COLOR_ADJUSTMENT
38613
38629
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
38614
38630
  local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
38615
38631
  local ____cachedEnumValues = require("arrays.cachedEnumValues")
@@ -38646,12 +38662,12 @@ local ____utils = require("functions.utils")
38646
38662
  local iRange = ____utils.iRange
38647
38663
  --- Helper function to see if the given pill color is a horse pill.
38648
38664
  function ____exports.isHorsePill(self, pillColor)
38649
- return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
38665
+ return asNumber(nil, pillColor) > HORSE_PILL_COLOR_ADJUSTMENT
38650
38666
  end
38651
38667
  function ____exports.isVanillaPillEffect(self, pillEffect)
38652
38668
  return pillEffect <= LAST_VANILLA_PILL_EFFECT
38653
38669
  end
38654
- HORSE_PILL_ADJUSTMENT = 2048
38670
+ HORSE_PILL_COLOR_ADJUSTMENT = 2048
38655
38671
  --- Helper function to get an array with every non-null pill color. This includes all gold colors and
38656
38672
  -- all horse colors.
38657
38673
  function ____exports.getAllPillColors(self)
@@ -38667,8 +38683,10 @@ end
38667
38683
  --
38668
38684
  -- For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
38669
38685
  -- corresponds to the horse pill color for blue/blue.
38686
+ --
38687
+ -- If passed a horse pill color, this function will return the unmodified pill color.
38670
38688
  function ____exports.getHorsePillColor(self, pillColor)
38671
- return pillColor + HORSE_PILL_ADJUSTMENT
38689
+ return ____exports.isHorsePill(nil, pillColor) and pillColor or pillColor + HORSE_PILL_COLOR_ADJUSTMENT
38672
38690
  end
38673
38691
  --- Helper function to get an array with every non-gold horse pill color.
38674
38692
  function ____exports.getHorsePillColors(self)
@@ -38680,7 +38698,7 @@ end
38680
38698
  --
38681
38699
  -- If called with a non-horse pill color, this function will return back the same color.
38682
38700
  function ____exports.getNormalPillColorFromHorse(self, pillColor)
38683
- return ____exports.isHorsePill(nil, pillColor) and asPillColor(nil, pillColor - HORSE_PILL_ADJUSTMENT) or pillColor
38701
+ return ____exports.isHorsePill(nil, pillColor) and asPillColor(nil, pillColor - HORSE_PILL_COLOR_ADJUSTMENT) or pillColor
38684
38702
  end
38685
38703
  --- Helper function to get an array with every non-gold and non-horse pill color.
38686
38704
  function ____exports.getNormalPillColors(self)
@@ -60202,6 +60220,7 @@ local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
60202
60220
  local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
60203
60221
  local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
60204
60222
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
60223
+ local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
60205
60224
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
60206
60225
  local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
60207
60226
  local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
@@ -60258,6 +60277,7 @@ local spawnCard = ____pickupsSpecific.spawnCard
60258
60277
  local spawnPill = ____pickupsSpecific.spawnPill
60259
60278
  local spawnTrinketFunction = ____pickupsSpecific.spawnTrinket
60260
60279
  local ____pills = require("functions.pills")
60280
+ local getHorsePillColor = ____pills.getHorsePillColor
60261
60281
  local getPillEffectName = ____pills.getPillEffectName
60262
60282
  local isValidPillEffect = ____pills.isValidPillEffect
60263
60283
  local ____playerCollectibles = require("functions.playerCollectibles")
@@ -60382,6 +60402,51 @@ function ____exports.oneHP(self)
60382
60402
  end
60383
60403
  print("Set every NPC to 1 HP.")
60384
60404
  end
60405
+ --- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
60406
+ -- the effect.
60407
+ --
60408
+ -- For example:
60409
+ --
60410
+ -- - `pill 5` - Gives a "Full Health" pill.
60411
+ -- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
60412
+ function ____exports.pill(self, params, isHorse)
60413
+ if isHorse == nil then
60414
+ isHorse = false
60415
+ end
60416
+ if params == "" then
60417
+ print("You must specify a pill name or number.")
60418
+ return
60419
+ end
60420
+ local pillEffect
60421
+ local num = parseIntSafe(nil, params)
60422
+ if num == nil then
60423
+ local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
60424
+ if match == nil then
60425
+ print("Unknown pill effect: " .. params)
60426
+ return
60427
+ end
60428
+ pillEffect = match[2]
60429
+ else
60430
+ if not isValidPillEffect(nil, num) then
60431
+ print("Invalid pill effect ID: " .. tostring(num))
60432
+ return
60433
+ end
60434
+ pillEffect = num
60435
+ end
60436
+ local pillEffectName = getPillEffectName(nil, pillEffect)
60437
+ Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
60438
+ if isHorse then
60439
+ local player = Isaac.GetPlayer()
60440
+ local pillColor = player:GetPill(PocketItemSlot.SLOT_1)
60441
+ local horsePillColor = getHorsePillColor(nil, pillColor)
60442
+ player:SetPill(PocketItemSlot.SLOT_1, horsePillColor)
60443
+ end
60444
+ if isHorse then
60445
+ print(((("Gave horse pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
60446
+ else
60447
+ print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
60448
+ end
60449
+ end
60385
60450
  --- Gives a poop mana charge. This only affects Tainted Blue Baby. Provide a number to give a custom
60386
60451
  -- amount of charges. (You can use negative numbers to remove charges.)
60387
60452
  function ____exports.poopMana(self, params)
@@ -61039,6 +61104,10 @@ end
61039
61104
  function ____exports.hitboxes(self)
61040
61105
  Isaac.ExecuteCommand("debug 6")
61041
61106
  end
61107
+ --- The same thing as the `pill` command, but gives a horse pill instead of a normal pill.
61108
+ function ____exports.horse(self, params)
61109
+ ____exports.pill(nil, params, true)
61110
+ end
61042
61111
  --- Warps to the Blue Womb Boss Room.
61043
61112
  function ____exports.hush(self)
61044
61113
  setStage(nil, LevelStage.BLUE_WOMB, StageType.ORIGINAL)
@@ -61163,38 +61232,6 @@ end
61163
61232
  function ____exports.noCurses(self)
61164
61233
  ____exports.disableCurses(nil)
61165
61234
  end
61166
- --- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
61167
- -- the effect.
61168
- --
61169
- -- For example:
61170
- --
61171
- -- - `pill 5` - Gives a "Full Health" pill.
61172
- -- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
61173
- function ____exports.pill(self, params)
61174
- if params == "" then
61175
- print("You must specify a pill name or number.")
61176
- return
61177
- end
61178
- local pillEffect
61179
- local num = parseIntSafe(nil, params)
61180
- if num == nil then
61181
- local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
61182
- if match == nil then
61183
- print("Unknown pill effect: " .. params)
61184
- return
61185
- end
61186
- pillEffect = match[2]
61187
- else
61188
- if not isValidPillEffect(nil, num) then
61189
- print("Invalid pill effect ID: " .. tostring(num))
61190
- return
61191
- end
61192
- pillEffect = num
61193
- end
61194
- local pillEffectName = getPillEffectName(nil, pillEffect)
61195
- Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
61196
- print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
61197
- end
61198
61235
  --- Spawns every pill on the ground, starting at the top-left-most tile.
61199
61236
  function ____exports.pills(self)
61200
61237
  local y
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "83.2.0",
3
+ "version": "83.4.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -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
- print(`Gave pill: ${pillEffectName} (${pillEffect})`);
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. */
@@ -355,6 +355,27 @@ function addCombinations<T>(
355
355
  }
356
356
  }
357
357
 
358
+ /**
359
+ * Helper function to get the duplicate elements in an array. Only one element for each value will
360
+ * be returned. The elements will be sorted before they are returned.
361
+ */
362
+ export function getArrayDuplicateElements<T>(
363
+ array: readonly T[],
364
+ ): readonly T[] {
365
+ const duplicateElements = new Set<T>();
366
+ const set = new Set<T>();
367
+
368
+ for (const element of array) {
369
+ if (set.has(element)) {
370
+ duplicateElements.add(element);
371
+ }
372
+ set.add(element);
373
+ }
374
+
375
+ const values = [...duplicateElements];
376
+ return values.sort();
377
+ }
378
+
358
379
  /**
359
380
  * Helper function to get an array containing the indexes of an array.
360
381
  *
@@ -38,7 +38,7 @@ import { iRange } from "./utils";
38
38
  *
39
39
  * 1 << 11
40
40
  */
41
- const HORSE_PILL_ADJUSTMENT = 2048;
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 + HORSE_PILL_ADJUSTMENT;
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 - HORSE_PILL_ADJUSTMENT)
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) > HORSE_PILL_ADJUSTMENT;
214
+ return asNumber(pillColor) > HORSE_PILL_COLOR_ADJUSTMENT;
211
215
  }
212
216
 
213
217
  export function isModdedPillEffect(pillEffect: PillEffect): boolean {