isaacscript-common 1.2.12 → 1.2.16

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.
@@ -1,4 +1,16 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
+ import { PillEffectClass } from "../types/PillEffectClass";
3
+ import { PillEffectType } from "../types/PillEffectType";
4
+ /**
5
+ * Helper function to get a pill effect class from a PillEffect enum value. In this context, the
6
+ * class is equal to the numerical prefix in the "class" tag in the "pocketitems.xml" file. Use the
7
+ * `getPillEffectType` helper function to determine whether or not the pill effect is positive,
8
+ * negative, or neutral.
9
+ *
10
+ * Due to limitations in the API, this function will not work properly for modded pill effects, and
11
+ * will always return `DEFAULT_PILL_EFFECT_CLASS` in those cases.
12
+ */
13
+ export declare function getPillEffectClass(pillEffect: PillEffect | int): PillEffectClass;
2
14
  /**
3
15
  * Helper function to get a pill effect name from a PillEffect enum value.
4
16
  *
@@ -9,3 +21,13 @@
9
21
  * ```
10
22
  */
11
23
  export declare function getPillEffectName(pillEffect: PillEffect | int): string;
24
+ /**
25
+ * Helper function to get a pill effect type from a PillEffect enum value. In this context, the
26
+ * type is equal to positive, negative, or neutral. This is derived from the suffix of the the
27
+ * "class" tag in the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to
28
+ * determine the "power" of the pill.
29
+ *
30
+ * Due to limitations in the API, this function will not work properly for modded pill effects, and
31
+ * will always return `DEFAULT_PILL_EFFECT_TYPE` in those cases.
32
+ */
33
+ export declare function getPillEffectType(pillEffect: PillEffect | int): PillEffectType;
@@ -2,8 +2,20 @@
2
2
  local ____lualib = require("lualib_bundle")
3
3
  local Map = ____lualib.Map
4
4
  local ____exports = {}
5
+ local ____pillEffectClassMap = require("maps.pillEffectClassMap")
6
+ local PILL_EFFECT_CLASS_MAP = ____pillEffectClassMap.PILL_EFFECT_CLASS_MAP
5
7
  local ____pillEffectNameMap = require("maps.pillEffectNameMap")
6
8
  local PILL_EFFECT_NAME_MAP = ____pillEffectNameMap.PILL_EFFECT_NAME_MAP
9
+ local ____pillEffectTypeMap = require("maps.pillEffectTypeMap")
10
+ local PILL_EFFECT_TYPE_MAP = ____pillEffectTypeMap.PILL_EFFECT_TYPE_MAP
11
+ local ____PillEffectClass = require("types.PillEffectClass")
12
+ local DEFAULT_PILL_EFFECT_CLASS = ____PillEffectClass.DEFAULT_PILL_EFFECT_CLASS
13
+ local ____PillEffectType = require("types.PillEffectType")
14
+ local DEFAULT_PILL_EFFECT_TYPE = ____PillEffectType.DEFAULT_PILL_EFFECT_TYPE
15
+ function ____exports.getPillEffectClass(self, pillEffect)
16
+ local pillEffectClass = PILL_EFFECT_CLASS_MAP:get(pillEffect)
17
+ return pillEffectClass == nil and DEFAULT_PILL_EFFECT_CLASS or pillEffectClass
18
+ end
7
19
  function ____exports.getPillEffectName(self, pillEffect)
8
20
  local itemConfig = Isaac.GetItemConfig()
9
21
  local defaultName = "Unknown"
@@ -20,4 +32,8 @@ function ____exports.getPillEffectName(self, pillEffect)
20
32
  end
21
33
  return itemConfigPillEffect.Name
22
34
  end
35
+ function ____exports.getPillEffectType(self, pillEffect)
36
+ local pillEffectClass = PILL_EFFECT_TYPE_MAP:get(pillEffect)
37
+ return pillEffectClass == nil and DEFAULT_PILL_EFFECT_TYPE or pillEffectClass
38
+ end
23
39
  return ____exports
@@ -59,6 +59,10 @@ export declare function getClosestPlayer(position: Vector): EntityPlayer;
59
59
  * Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
60
60
  */
61
61
  export declare function getDeathAnimationName(player: EntityPlayer): string;
62
+ /**
63
+ * Helper function to return the player with the highest index, according to the
64
+ * `Isaac.GetPlayer()` method.
65
+ */
62
66
  export declare function getFinalPlayer(): EntityPlayer;
63
67
  /**
64
68
  * Helper function that returns the type of the rightmost heart, not including golden hearts since
@@ -217,6 +221,12 @@ export declare function canTakeFreeDevilDeals(player: EntityPlayer): boolean;
217
221
  export declare function isTainted(player: EntityPlayer): boolean;
218
222
  /** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
219
223
  export declare function isTaintedLazarus(player: EntityPlayer): boolean;
224
+ export declare function isModdedCharacter(player: EntityPlayer): boolean;
225
+ export declare function isVanillaCharacter(player: EntityPlayer): boolean;
226
+ /**
227
+ * Helper function to remove a collectible costume from a player. Use this helper function to avoid
228
+ * having to request the collectible from the item config.
229
+ */
220
230
  export declare function removeCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType | int): void;
221
231
  /**
222
232
  * Helper function to remove the Dead Eye multiplier from a player.
@@ -225,6 +235,10 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
225
235
  * chance of working, so this function calls it 100 times to be safe.
226
236
  */
227
237
  export declare function removeDeadEyeMultiplier(player: EntityPlayer): void;
238
+ /**
239
+ * Helper function to remove a trinket costume from a player. Use this helper function to avoid
240
+ * having to request the trinket from the item config.
241
+ */
228
242
  export declare function removeTrinketCostume(player: EntityPlayer, trinketType: TrinketType | int): void;
229
243
  /**
230
244
  * Helper function to set an active collectible to a particular slot. This has different behavior
@@ -9,7 +9,7 @@ local __TS__Iterator = ____lualib.__TS__Iterator
9
9
  local __TS__ArrayPush = ____lualib.__TS__ArrayPush
10
10
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
11
11
  local ____exports = {}
12
- local getAdjustedPlayerName, EXCLUDED_CHARACTERS
12
+ local getAdjustedPlayerName, isTaintedModded, EXCLUDED_CHARACTERS
13
13
  local ____constants = require("constants")
14
14
  local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART = ____constants.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART
15
15
  local CHARACTERS_WITH_FREE_DEVIL_DEALS = ____constants.CHARACTERS_WITH_FREE_DEVIL_DEALS
@@ -17,6 +17,7 @@ local CHARACTERS_WITH_NO_RED_HEARTS = ____constants.CHARACTERS_WITH_NO_RED_HEART
17
17
  local CHARACTERS_WITH_NO_SOUL_HEARTS = ____constants.CHARACTERS_WITH_NO_SOUL_HEARTS
18
18
  local LOST_STYLE_PLAYER_TYPES = ____constants.LOST_STYLE_PLAYER_TYPES
19
19
  local MAX_PLAYER_HEART_CONTAINERS = ____constants.MAX_PLAYER_HEART_CONTAINERS
20
+ local MAX_VANILLA_CHARACTER = ____constants.MAX_VANILLA_CHARACTER
20
21
  local ____HealthType = require("types.HealthType")
21
22
  local HealthType = ____HealthType.HealthType
22
23
  local ____array = require("functions.array")
@@ -149,7 +150,26 @@ function ____exports.isChildPlayer(self, player)
149
150
  end
150
151
  function ____exports.isTainted(self, player)
151
152
  local character = player:GetPlayerType()
152
- return character >= PlayerType.PLAYER_ISAAC_B
153
+ local ____isVanillaCharacter_result_0
154
+ if ____exports.isVanillaCharacter(nil, player) then
155
+ ____isVanillaCharacter_result_0 = character >= PlayerType.PLAYER_ISAAC_B
156
+ else
157
+ ____isVanillaCharacter_result_0 = isTaintedModded(nil, player)
158
+ end
159
+ return ____isVanillaCharacter_result_0
160
+ end
161
+ function isTaintedModded(self, player)
162
+ local character = player:GetPlayerType()
163
+ local name = player:GetName()
164
+ local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
165
+ return character == taintedCharacter
166
+ end
167
+ function ____exports.isModdedCharacter(self, player)
168
+ local character = player:GetPlayerType()
169
+ return character > MAX_VANILLA_CHARACTER
170
+ end
171
+ function ____exports.isVanillaCharacter(self, player)
172
+ return not ____exports.isModdedCharacter(nil, player)
153
173
  end
154
174
  EXCLUDED_CHARACTERS = __TS__New(Set, {PlayerType.PLAYER_ESAU, PlayerType.PLAYER_THESOUL_B})
155
175
  function ____exports.addCollectibleCostume(self, player, collectibleType)
@@ -524,9 +544,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
524
544
  itemPool:RemoveCollectible(collectibleType)
525
545
  end
526
546
  repeat
527
- local ____switch121 = activeSlot
528
- local ____cond121 = ____switch121 == ActiveSlot.SLOT_PRIMARY
529
- if ____cond121 then
547
+ local ____switch124 = activeSlot
548
+ local ____cond124 = ____switch124 == ActiveSlot.SLOT_PRIMARY
549
+ if ____cond124 then
530
550
  do
531
551
  if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
532
552
  player:RemoveCollectible(primaryCollectibleType)
@@ -535,8 +555,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
535
555
  break
536
556
  end
537
557
  end
538
- ____cond121 = ____cond121 or ____switch121 == ActiveSlot.SLOT_SECONDARY
539
- if ____cond121 then
558
+ ____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_SECONDARY
559
+ if ____cond124 then
540
560
  do
541
561
  if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
542
562
  player:RemoveCollectible(primaryCollectibleType)
@@ -551,16 +571,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
551
571
  break
552
572
  end
553
573
  end
554
- ____cond121 = ____cond121 or ____switch121 == ActiveSlot.SLOT_POCKET
555
- if ____cond121 then
574
+ ____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_POCKET
575
+ if ____cond124 then
556
576
  do
557
577
  player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
558
578
  player:SetActiveCharge(charge, activeSlot)
559
579
  break
560
580
  end
561
581
  end
562
- ____cond121 = ____cond121 or ____switch121 == ActiveSlot.SLOT_POCKET2
563
- if ____cond121 then
582
+ ____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_POCKET2
583
+ if ____cond124 then
564
584
  do
565
585
  player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
566
586
  break
package/dist/index.d.ts CHANGED
@@ -57,7 +57,9 @@ export * from "./functions/vector";
57
57
  export * from "./maps/cardNameMap";
58
58
  export * from "./maps/collectibleNameMap";
59
59
  export * from "./maps/gridEntityXMLMap";
60
+ export * from "./maps/pillEffectClassMap";
60
61
  export * from "./maps/pillEffectNameMap";
62
+ export * from "./maps/pillEffectTypeMap";
61
63
  export * from "./maps/roomShapeToTopLeftWallGridIndexMap";
62
64
  export * from "./maps/transformationMaps";
63
65
  export * from "./maps/transformationNameMap";
@@ -74,6 +76,8 @@ export * from "./types/JSONSpawn";
74
76
  export * from "./types/ModCallbacksCustom";
75
77
  export * from "./types/ModUpgraded";
76
78
  export * from "./types/PickingUpItem";
79
+ export * from "./types/PillEffectClass";
80
+ export * from "./types/PillEffectType";
77
81
  export * from "./types/PlayerHealth";
78
82
  export * from "./types/PocketItemDescription";
79
83
  export * from "./types/PocketItemType";
package/dist/index.lua CHANGED
@@ -462,6 +462,14 @@ do
462
462
  end
463
463
  end
464
464
  end
465
+ do
466
+ local ____export = require("maps.pillEffectClassMap")
467
+ for ____exportKey, ____exportValue in pairs(____export) do
468
+ if ____exportKey ~= "default" then
469
+ ____exports[____exportKey] = ____exportValue
470
+ end
471
+ end
472
+ end
465
473
  do
466
474
  local ____export = require("maps.pillEffectNameMap")
467
475
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -470,6 +478,14 @@ do
470
478
  end
471
479
  end
472
480
  end
481
+ do
482
+ local ____export = require("maps.pillEffectTypeMap")
483
+ for ____exportKey, ____exportValue in pairs(____export) do
484
+ if ____exportKey ~= "default" then
485
+ ____exports[____exportKey] = ____exportValue
486
+ end
487
+ end
488
+ end
473
489
  do
474
490
  local ____export = require("maps.roomShapeToTopLeftWallGridIndexMap")
475
491
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -534,6 +550,22 @@ do
534
550
  end
535
551
  end
536
552
  end
553
+ do
554
+ local ____export = require("types.PillEffectClass")
555
+ for ____exportKey, ____exportValue in pairs(____export) do
556
+ if ____exportKey ~= "default" then
557
+ ____exports[____exportKey] = ____exportValue
558
+ end
559
+ end
560
+ end
561
+ do
562
+ local ____export = require("types.PillEffectType")
563
+ for ____exportKey, ____exportValue in pairs(____export) do
564
+ if ____exportKey ~= "default" then
565
+ ____exports[____exportKey] = ____exportValue
566
+ end
567
+ end
568
+ end
537
569
  do
538
570
  local ____export = require("types.PocketItemType")
539
571
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { PillEffectClass } from "../types/PillEffectClass";
3
+ export declare const PILL_EFFECT_CLASS_MAP: Map<PillEffect, PillEffectClass>;
@@ -0,0 +1,60 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
4
+ local __TS__New = ____lualib.__TS__New
5
+ local ____exports = {}
6
+ local ____PillEffectClass = require("types.PillEffectClass")
7
+ local PillEffectClass = ____PillEffectClass.PillEffectClass
8
+ ____exports.PILL_EFFECT_CLASS_MAP = __TS__New(Map, {
9
+ {PillEffect.PILLEFFECT_BAD_GAS, PillEffectClass.MINOR},
10
+ {PillEffect.PILLEFFECT_BAD_TRIP, PillEffectClass.MEDIUM},
11
+ {PillEffect.PILLEFFECT_BALLS_OF_STEEL, PillEffectClass.MEDIUM},
12
+ {PillEffect.PILLEFFECT_BOMBS_ARE_KEYS, PillEffectClass.MEDIUM},
13
+ {PillEffect.PILLEFFECT_EXPLOSIVE_DIARRHEA, PillEffectClass.MINOR},
14
+ {PillEffect.PILLEFFECT_FULL_HEALTH, PillEffectClass.MEDIUM},
15
+ {PillEffect.PILLEFFECT_HEALTH_DOWN, PillEffectClass.MAJOR},
16
+ {PillEffect.PILLEFFECT_HEALTH_UP, PillEffectClass.MAJOR},
17
+ {PillEffect.PILLEFFECT_I_FOUND_PILLS, PillEffectClass.JOKE},
18
+ {PillEffect.PILLEFFECT_PUBERTY, PillEffectClass.JOKE},
19
+ {PillEffect.PILLEFFECT_PRETTY_FLY, PillEffectClass.MEDIUM},
20
+ {PillEffect.PILLEFFECT_RANGE_DOWN, PillEffectClass.MAJOR},
21
+ {PillEffect.PILLEFFECT_RANGE_UP, PillEffectClass.MAJOR},
22
+ {PillEffect.PILLEFFECT_SPEED_DOWN, PillEffectClass.MAJOR},
23
+ {PillEffect.PILLEFFECT_SPEED_UP, PillEffectClass.MAJOR},
24
+ {PillEffect.PILLEFFECT_TEARS_DOWN, PillEffectClass.MAJOR},
25
+ {PillEffect.PILLEFFECT_TEARS_UP, PillEffectClass.MAJOR},
26
+ {PillEffect.PILLEFFECT_LUCK_DOWN, PillEffectClass.MAJOR},
27
+ {PillEffect.PILLEFFECT_LUCK_UP, PillEffectClass.MAJOR},
28
+ {PillEffect.PILLEFFECT_TELEPILLS, PillEffectClass.MAJOR},
29
+ {PillEffect.PILLEFFECT_48HOUR_ENERGY, PillEffectClass.MEDIUM},
30
+ {PillEffect.PILLEFFECT_HEMATEMESIS, PillEffectClass.MEDIUM},
31
+ {PillEffect.PILLEFFECT_PARALYSIS, PillEffectClass.MINOR},
32
+ {PillEffect.PILLEFFECT_SEE_FOREVER, PillEffectClass.MEDIUM},
33
+ {PillEffect.PILLEFFECT_PHEROMONES, PillEffectClass.MINOR},
34
+ {PillEffect.PILLEFFECT_AMNESIA, PillEffectClass.MEDIUM},
35
+ {PillEffect.PILLEFFECT_LEMON_PARTY, PillEffectClass.MINOR},
36
+ {PillEffect.PILLEFFECT_WIZARD, PillEffectClass.MINOR},
37
+ {PillEffect.PILLEFFECT_PERCS, PillEffectClass.MINOR},
38
+ {PillEffect.PILLEFFECT_ADDICTED, PillEffectClass.MINOR},
39
+ {PillEffect.PILLEFFECT_RELAX, PillEffectClass.JOKE},
40
+ {PillEffect.PILLEFFECT_QUESTIONMARK, PillEffectClass.MINOR},
41
+ {PillEffect.PILLEFFECT_LARGER, PillEffectClass.MINOR},
42
+ {PillEffect.PILLEFFECT_SMALLER, PillEffectClass.MINOR},
43
+ {PillEffect.PILLEFFECT_INFESTED_EXCLAMATION, PillEffectClass.MINOR},
44
+ {PillEffect.PILLEFFECT_INFESTED_QUESTION, PillEffectClass.MINOR},
45
+ {PillEffect.PILLEFFECT_POWER, PillEffectClass.MINOR},
46
+ {PillEffect.PILLEFFECT_RETRO_VISION, PillEffectClass.MINOR},
47
+ {PillEffect.PILLEFFECT_FRIENDS_TILL_THE_END, PillEffectClass.MINOR},
48
+ {PillEffect.PILLEFFECT_X_LAX, PillEffectClass.MINOR},
49
+ {PillEffect.PILLEFFECT_SOMETHINGS_WRONG, PillEffectClass.JOKE},
50
+ {PillEffect.PILLEFFECT_IM_DROWSY, PillEffectClass.MINOR},
51
+ {PillEffect.PILLEFFECT_IM_EXCITED, PillEffectClass.MINOR},
52
+ {PillEffect.PILLEFFECT_GULP, PillEffectClass.MEDIUM},
53
+ {PillEffect.PILLEFFECT_HORF, PillEffectClass.JOKE},
54
+ {PillEffect.PILLEFFECT_SUNSHINE, PillEffectClass.MINOR},
55
+ {PillEffect.PILLEFFECT_VURP, PillEffectClass.MEDIUM},
56
+ {PillEffect.PILLEFFECT_SHOT_SPEED_DOWN, PillEffectClass.MAJOR},
57
+ {PillEffect.PILLEFFECT_SHOT_SPEED_UP, PillEffectClass.MAJOR},
58
+ {PillEffect.PILLEFFECT_EXPERIMENTAL, PillEffectClass.MAJOR}
59
+ })
60
+ return ____exports
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { PillEffectType } from "../types/PillEffectType";
3
+ export declare const PILL_EFFECT_TYPE_MAP: Map<PillEffect, PillEffectType>;
@@ -0,0 +1,60 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
4
+ local __TS__New = ____lualib.__TS__New
5
+ local ____exports = {}
6
+ local ____PillEffectType = require("types.PillEffectType")
7
+ local PillEffectType = ____PillEffectType.PillEffectType
8
+ ____exports.PILL_EFFECT_TYPE_MAP = __TS__New(Map, {
9
+ {PillEffect.PILLEFFECT_BAD_GAS, PillEffectType.POSITIVE},
10
+ {PillEffect.PILLEFFECT_BAD_TRIP, PillEffectType.NEGATIVE},
11
+ {PillEffect.PILLEFFECT_BALLS_OF_STEEL, PillEffectType.POSITIVE},
12
+ {PillEffect.PILLEFFECT_BOMBS_ARE_KEYS, PillEffectType.NEUTRAL},
13
+ {PillEffect.PILLEFFECT_EXPLOSIVE_DIARRHEA, PillEffectType.NEUTRAL},
14
+ {PillEffect.PILLEFFECT_FULL_HEALTH, PillEffectType.POSITIVE},
15
+ {PillEffect.PILLEFFECT_HEALTH_DOWN, PillEffectType.NEGATIVE},
16
+ {PillEffect.PILLEFFECT_HEALTH_UP, PillEffectType.POSITIVE},
17
+ {PillEffect.PILLEFFECT_I_FOUND_PILLS, PillEffectType.NEUTRAL},
18
+ {PillEffect.PILLEFFECT_PUBERTY, PillEffectType.NEUTRAL},
19
+ {PillEffect.PILLEFFECT_PRETTY_FLY, PillEffectType.POSITIVE},
20
+ {PillEffect.PILLEFFECT_RANGE_DOWN, PillEffectType.NEGATIVE},
21
+ {PillEffect.PILLEFFECT_RANGE_UP, PillEffectType.POSITIVE},
22
+ {PillEffect.PILLEFFECT_SPEED_DOWN, PillEffectType.NEGATIVE},
23
+ {PillEffect.PILLEFFECT_SPEED_UP, PillEffectType.POSITIVE},
24
+ {PillEffect.PILLEFFECT_TEARS_DOWN, PillEffectType.NEGATIVE},
25
+ {PillEffect.PILLEFFECT_TEARS_UP, PillEffectType.POSITIVE},
26
+ {PillEffect.PILLEFFECT_LUCK_DOWN, PillEffectType.NEGATIVE},
27
+ {PillEffect.PILLEFFECT_LUCK_UP, PillEffectType.POSITIVE},
28
+ {PillEffect.PILLEFFECT_TELEPILLS, PillEffectType.NEUTRAL},
29
+ {PillEffect.PILLEFFECT_48HOUR_ENERGY, PillEffectType.POSITIVE},
30
+ {PillEffect.PILLEFFECT_HEMATEMESIS, PillEffectType.NEUTRAL},
31
+ {PillEffect.PILLEFFECT_PARALYSIS, PillEffectType.NEGATIVE},
32
+ {PillEffect.PILLEFFECT_SEE_FOREVER, PillEffectType.POSITIVE},
33
+ {PillEffect.PILLEFFECT_PHEROMONES, PillEffectType.POSITIVE},
34
+ {PillEffect.PILLEFFECT_AMNESIA, PillEffectType.NEGATIVE},
35
+ {PillEffect.PILLEFFECT_LEMON_PARTY, PillEffectType.POSITIVE},
36
+ {PillEffect.PILLEFFECT_WIZARD, PillEffectType.NEGATIVE},
37
+ {PillEffect.PILLEFFECT_PERCS, PillEffectType.POSITIVE},
38
+ {PillEffect.PILLEFFECT_ADDICTED, PillEffectType.NEGATIVE},
39
+ {PillEffect.PILLEFFECT_RELAX, PillEffectType.NEUTRAL},
40
+ {PillEffect.PILLEFFECT_QUESTIONMARK, PillEffectType.NEGATIVE},
41
+ {PillEffect.PILLEFFECT_LARGER, PillEffectType.NEUTRAL},
42
+ {PillEffect.PILLEFFECT_SMALLER, PillEffectType.NEUTRAL},
43
+ {PillEffect.PILLEFFECT_INFESTED_EXCLAMATION, PillEffectType.POSITIVE},
44
+ {PillEffect.PILLEFFECT_INFESTED_QUESTION, PillEffectType.POSITIVE},
45
+ {PillEffect.PILLEFFECT_POWER, PillEffectType.POSITIVE},
46
+ {PillEffect.PILLEFFECT_RETRO_VISION, PillEffectType.NEGATIVE},
47
+ {PillEffect.PILLEFFECT_FRIENDS_TILL_THE_END, PillEffectType.POSITIVE},
48
+ {PillEffect.PILLEFFECT_X_LAX, PillEffectType.NEGATIVE},
49
+ {PillEffect.PILLEFFECT_SOMETHINGS_WRONG, PillEffectType.POSITIVE},
50
+ {PillEffect.PILLEFFECT_IM_DROWSY, PillEffectType.NEUTRAL},
51
+ {PillEffect.PILLEFFECT_IM_EXCITED, PillEffectType.NEUTRAL},
52
+ {PillEffect.PILLEFFECT_GULP, PillEffectType.POSITIVE},
53
+ {PillEffect.PILLEFFECT_HORF, PillEffectType.NEUTRAL},
54
+ {PillEffect.PILLEFFECT_SUNSHINE, PillEffectType.POSITIVE},
55
+ {PillEffect.PILLEFFECT_VURP, PillEffectType.POSITIVE},
56
+ {PillEffect.PILLEFFECT_SHOT_SPEED_DOWN, PillEffectType.NEGATIVE},
57
+ {PillEffect.PILLEFFECT_SHOT_SPEED_UP, PillEffectType.POSITIVE},
58
+ {PillEffect.PILLEFFECT_EXPERIMENTAL, PillEffectType.NEUTRAL}
59
+ })
60
+ return ____exports
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Equal to the number in the "class" tag in the "pocketitems.xml" file. The "+" or "-" part of the
3
+ * tag is contained within the `PillEffectType` enum.
4
+ */
5
+ export declare enum PillEffectClass {
6
+ JOKE = 0,
7
+ MINOR = 1,
8
+ MEDIUM = 2,
9
+ MAJOR = 3
10
+ }
11
+ export declare const DEFAULT_PILL_EFFECT_CLASS = PillEffectClass.MEDIUM;
@@ -0,0 +1,13 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ ____exports.PillEffectClass = PillEffectClass or ({})
4
+ ____exports.PillEffectClass.JOKE = 0
5
+ ____exports.PillEffectClass[____exports.PillEffectClass.JOKE] = "JOKE"
6
+ ____exports.PillEffectClass.MINOR = 1
7
+ ____exports.PillEffectClass[____exports.PillEffectClass.MINOR] = "MINOR"
8
+ ____exports.PillEffectClass.MEDIUM = 2
9
+ ____exports.PillEffectClass[____exports.PillEffectClass.MEDIUM] = "MEDIUM"
10
+ ____exports.PillEffectClass.MAJOR = 3
11
+ ____exports.PillEffectClass[____exports.PillEffectClass.MAJOR] = "MAJOR"
12
+ ____exports.DEFAULT_PILL_EFFECT_CLASS = ____exports.PillEffectClass.MEDIUM
13
+ return ____exports
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Equal to the suffix of the "class" tag in the "pocketitems.xml" file. "+" is equal to `POSITIVE`,
3
+ * "-" is equal to `NEGATIVE`, and no suffix is equal to `NEUTRAL`.
4
+ */
5
+ export declare enum PillEffectType {
6
+ POSITIVE = 0,
7
+ NEGATIVE = 1,
8
+ NEUTRAL = 2
9
+ }
10
+ export declare const DEFAULT_PILL_EFFECT_TYPE = PillEffectType.NEUTRAL;
@@ -0,0 +1,11 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ ____exports.PillEffectType = PillEffectType or ({})
4
+ ____exports.PillEffectType.POSITIVE = 0
5
+ ____exports.PillEffectType[____exports.PillEffectType.POSITIVE] = "POSITIVE"
6
+ ____exports.PillEffectType.NEGATIVE = 1
7
+ ____exports.PillEffectType[____exports.PillEffectType.NEGATIVE] = "NEGATIVE"
8
+ ____exports.PillEffectType.NEUTRAL = 2
9
+ ____exports.PillEffectType[____exports.PillEffectType.NEUTRAL] = "NEUTRAL"
10
+ ____exports.DEFAULT_PILL_EFFECT_TYPE = ____exports.PillEffectType.NEUTRAL
11
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.12",
3
+ "version": "1.2.16",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "devDependencies": {
28
28
  "@zamiell/typescript-to-lua": "^1.4.0",
29
- "isaac-typescript-definitions": "^1.0.336",
29
+ "isaac-typescript-definitions": "^1.0.337",
30
30
  "isaacscript-lint": "^1.0.79",
31
31
  "isaacscript-tsconfig": "^1.1.8",
32
32
  "typedoc": "^0.22.11",