isaacscript-common 55.2.0 → 56.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.
@@ -4987,9 +4987,12 @@ export declare function getBossRushDoor(): GridEntityDoor | undefined;
4987
4987
  export declare function getBossSet(stage: LevelStage, stageType: StageType): ReadonlySet<BossID> | undefined;
4988
4988
 
4989
4989
  /**
4990
- * Helper function to get a card description from a Card enum value.
4990
+ * Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
4991
+ * provided card type is not valid.
4991
4992
  *
4992
- * For example, `getCardDescription(card)` returns "Where journey begins".
4993
+ * This function works for both vanilla and modded trinkets.
4994
+ *
4995
+ * For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
4993
4996
  */
4994
4997
  export declare function getCardDescription(cardType: CardType): string;
4995
4998
 
@@ -8659,11 +8662,12 @@ export declare function isBossRoomOf(roomData: RoomConfig, bossID: BossID): bool
8659
8662
  export declare function isBossRushDoor(door: GridEntityDoor): boolean;
8660
8663
 
8661
8664
  /**
8662
- * Returns true for cards that have the following card type:
8663
- * - CardType.TAROT
8664
- * - CardType.SUIT
8665
- * - CardType.SPECIAL
8666
- * - CardType.TAROT_REVERSE
8665
+ * Returns true for card types that have the following item config card type:
8666
+ *
8667
+ * - `ItemConfigCardType.TAROT` (0)
8668
+ * - `ItemConfigCardType.SUIT` (1)
8669
+ * - `ItemConfigCardType.SPECIAL` (3)
8670
+ * - `ItemConfigCardType.TAROT_REVERSE` (5)
8667
8671
  */
8668
8672
  export declare function isCard(cardType: CardType): boolean;
8669
8673
 
@@ -9277,7 +9281,7 @@ export declare function isMirrorRoom(roomData: RoomConfig): boolean;
9277
9281
  */
9278
9282
  export declare function isMissedTear(tear: EntityTear): boolean;
9279
9283
 
9280
- /** Returns true for any card or rune added by a mod. */
9284
+ /** Returns true for any card type added by a mod. */
9281
9285
  export declare function isModdedCardType(cardType: CardType): boolean;
9282
9286
 
9283
9287
  export declare function isModdedCharacter(character: PlayerType): boolean;
@@ -9362,7 +9366,7 @@ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
9362
9366
  */
9363
9367
  export declare function isPlayerAbleToAim(player: EntityPlayer): boolean;
9364
9368
 
9365
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
9369
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
9366
9370
  export declare function isPocketItemObject(cardType: CardType): boolean;
9367
9371
 
9368
9372
  /** Helper function to detect if a variable is of type `GridEntityPoop`. */
@@ -9468,7 +9472,7 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
9468
9472
  */
9469
9473
  export declare function isRepentanceStage(stageType: StageType): boolean;
9470
9474
 
9471
- /** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
9475
+ /** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
9472
9476
  export declare function isReverseTarotCard(cardType: CardType): boolean;
9473
9477
 
9474
9478
  /** Helper function to check if something is an instantiated `RNG` object. */
@@ -9516,7 +9520,7 @@ export declare function isRoomType(roomData: RoomConfig, ...roomTypes: RoomType[
9516
9520
  */
9517
9521
  export declare function isRoomVisible(roomGridIndexOrRoomDescriptor: int | RoomDescriptor, minimapAPI?: boolean): boolean;
9518
9522
 
9519
- /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
9523
+ /** Returns true for card types that have `ItemConfigCardType.RUNE`. */
9520
9524
  export declare function isRune(cardType: CardType): boolean;
9521
9525
 
9522
9526
  /** For `PickupVariant.SACK` (69). */
@@ -9625,7 +9629,7 @@ export declare function isSlot(entity: Entity): entity is EntitySlot;
9625
9629
  /** Returns true for the specific variants of `EntityType.SLOT` that are machines. */
9626
9630
  export declare function isSlotMachine(entity: Entity): boolean;
9627
9631
 
9628
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
9632
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
9629
9633
  export declare function isSpecialCard(cardType: CardType): boolean;
9630
9634
 
9631
9635
  /** Helper function to detect if a variable is of type `GridEntitySpikes`. */
@@ -9695,7 +9699,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
9695
9699
 
9696
9700
  export declare function isString(variable: unknown): variable is string;
9697
9701
 
9698
- /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
9702
+ /** Returns true for card types that have `ItemConfigCardType.SUIT`. */
9699
9703
  export declare function isSuitCard(cardType: CardType): boolean;
9700
9704
 
9701
9705
  export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
@@ -9709,7 +9713,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
9709
9713
  /** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
9710
9714
  export declare function isTaintedLazarus(player: EntityPlayer): boolean;
9711
9715
 
9712
- /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
9716
+ /** Returns true for card types that have `ItemConfigCardType.TAROT`. */
9713
9717
  export declare function isTarotCard(cardType: CardType): boolean;
9714
9718
 
9715
9719
  /** Helper function to detect if a variable is of type `EntityTear`. */
@@ -9793,7 +9797,6 @@ export declare function isValidCollectibleType(collectibleType: CollectibleType)
9793
9797
  */
9794
9798
  export declare function isValidGridPosition(gridPosition: Vector, roomShape: RoomShape): boolean;
9795
9799
 
9796
- /** Returns true for any vanilla card or rune. */
9797
9800
  export declare function isVanillaCardType(cardType: CardType): boolean;
9798
9801
 
9799
9802
  export declare function isVanillaCharacter(character: PlayerType): boolean;
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 55.2.0
3
+ isaacscript-common 56.0.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -8889,8 +8889,8 @@ ____exports.TrinketType.CURSED_SKULL = 43
8889
8889
  ____exports.TrinketType[____exports.TrinketType.CURSED_SKULL] = "CURSED_SKULL"
8890
8890
  ____exports.TrinketType.SAFETY_CAP = 44
8891
8891
  ____exports.TrinketType[____exports.TrinketType.SAFETY_CAP] = "SAFETY_CAP"
8892
- ____exports.TrinketType.ACE_SPADES = 45
8893
- ____exports.TrinketType[____exports.TrinketType.ACE_SPADES] = "ACE_SPADES"
8892
+ ____exports.TrinketType.ACE_OF_SPADES = 45
8893
+ ____exports.TrinketType[____exports.TrinketType.ACE_OF_SPADES] = "ACE_OF_SPADES"
8894
8894
  ____exports.TrinketType.ISAACS_FORK = 46
8895
8895
  ____exports.TrinketType[____exports.TrinketType.ISAACS_FORK] = "ISAACS_FORK"
8896
8896
  ____exports.TrinketType.MISSING_PAGE = 48
@@ -8911,8 +8911,8 @@ ____exports.TrinketType.MAGGYS_FAITH = 55
8911
8911
  ____exports.TrinketType[____exports.TrinketType.MAGGYS_FAITH] = "MAGGYS_FAITH"
8912
8912
  ____exports.TrinketType.JUDAS_TONGUE = 56
8913
8913
  ____exports.TrinketType[____exports.TrinketType.JUDAS_TONGUE] = "JUDAS_TONGUE"
8914
- ____exports.TrinketType.SOUL = 57
8915
- ____exports.TrinketType[____exports.TrinketType.SOUL] = "SOUL"
8914
+ ____exports.TrinketType.BLUE_BABYS_SOUL = 57
8915
+ ____exports.TrinketType[____exports.TrinketType.BLUE_BABYS_SOUL] = "BLUE_BABYS_SOUL"
8916
8916
  ____exports.TrinketType.SAMSONS_LOCK = 58
8917
8917
  ____exports.TrinketType[____exports.TrinketType.SAMSONS_LOCK] = "SAMSONS_LOCK"
8918
8918
  ____exports.TrinketType.CAINS_EYE = 59
@@ -1,9 +1,12 @@
1
1
  import type { CardType } from "isaac-typescript-definitions";
2
2
  import { ItemConfigCardType } from "isaac-typescript-definitions";
3
3
  /**
4
- * Helper function to get a card description from a Card enum value.
4
+ * Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
5
+ * provided card type is not valid.
5
6
  *
6
- * For example, `getCardDescription(card)` returns "Where journey begins".
7
+ * This function works for both vanilla and modded trinkets.
8
+ *
9
+ * For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
7
10
  */
8
11
  export declare function getCardDescription(cardType: CardType): string;
9
12
  /**
@@ -23,30 +26,30 @@ export declare function getCardName(cardType: CardType): string;
23
26
  */
24
27
  export declare function getItemConfigCardType(cardType: CardType): ItemConfigCardType | undefined;
25
28
  /**
26
- * Returns true for cards that have the following card type:
27
- * - CardType.TAROT
28
- * - CardType.SUIT
29
- * - CardType.SPECIAL
30
- * - CardType.TAROT_REVERSE
29
+ * Returns true for card types that have the following item config card type:
30
+ *
31
+ * - `ItemConfigCardType.TAROT` (0)
32
+ * - `ItemConfigCardType.SUIT` (1)
33
+ * - `ItemConfigCardType.SPECIAL` (3)
34
+ * - `ItemConfigCardType.TAROT_REVERSE` (5)
31
35
  */
32
36
  export declare function isCard(cardType: CardType): boolean;
33
37
  /** Returns whether the given card type matches the specified item config card type. */
34
38
  export declare function isCardType(cardType: CardType, itemConfigCardType: ItemConfigCardType): boolean;
35
- /** Returns true for any card or rune added by a mod. */
39
+ /** Returns true for any card type added by a mod. */
36
40
  export declare function isModdedCardType(cardType: CardType): boolean;
37
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
41
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
38
42
  export declare function isPocketItemObject(cardType: CardType): boolean;
39
- /** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
43
+ /** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
40
44
  export declare function isReverseTarotCard(cardType: CardType): boolean;
41
- /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
45
+ /** Returns true for card types that have `ItemConfigCardType.RUNE`. */
42
46
  export declare function isRune(cardType: CardType): boolean;
43
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
47
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
44
48
  export declare function isSpecialCard(cardType: CardType): boolean;
45
- /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
49
+ /** Returns true for card types that have `ItemConfigCardType.SUIT`. */
46
50
  export declare function isSuitCard(cardType: CardType): boolean;
47
- /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
51
+ /** Returns true for card types that have `ItemConfigCardType.TAROT`. */
48
52
  export declare function isTarotCard(cardType: CardType): boolean;
49
- /** Returns true for any vanilla card or rune. */
50
53
  export declare function isVanillaCardType(cardType: CardType): boolean;
51
54
  /**
52
55
  * Helper function to use a card without showing an animation and without the announcer voice
@@ -1 +1 @@
1
- {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../src/functions/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAW,MAAM,8BAA8B,CAAC;AAW3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgB7D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgBtD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,GACjB,kBAAkB,GAAG,SAAS,CAOhC;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAOlD;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAET;AAED,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE5D;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D;AAED,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAElD;AAED,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEzD;AAED,kEAAkE;AAClE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEtD;AAED,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEvD;AAED,iDAAiD;AACjD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAG1E"}
1
+ {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../src/functions/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAW,MAAM,8BAA8B,CAAC;AAW3E;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgB7D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgBtD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,GACjB,kBAAkB,GAAG,SAAS,CAOhC;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAOlD;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAET;AAED,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE5D;AAED,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAElD;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEzD;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEtD;AAED,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEvD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAG1E"}
@@ -16,13 +16,15 @@ local ____itemConfigCardTypesForCardsSet = require("src.sets.itemConfigCardTypes
16
16
  local ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET = ____itemConfigCardTypesForCardsSet.ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET
17
17
  local ____flag = require("src.functions.flag")
18
18
  local addFlag = ____flag.addFlag
19
- --- Returns true for any vanilla card or rune.
20
19
  function ____exports.isVanillaCardType(self, cardType)
21
20
  return cardType <= LAST_VANILLA_CARD_TYPE
22
21
  end
23
- --- Helper function to get a card description from a Card enum value.
22
+ --- Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
23
+ -- provided card type is not valid.
24
24
  --
25
- -- For example, `getCardDescription(card)` returns "Where journey begins".
25
+ -- This function works for both vanilla and modded trinkets.
26
+ --
27
+ -- For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
26
28
  function ____exports.getCardDescription(self, cardType)
27
29
  local cardDescription = CARD_DESCRIPTIONS[cardType]
28
30
  if cardDescription ~= nil then
@@ -62,11 +64,12 @@ function ____exports.getItemConfigCardType(self, cardType)
62
64
  end
63
65
  return itemConfigCard.CardType
64
66
  end
65
- --- Returns true for cards that have the following card type:
66
- -- - CardType.TAROT
67
- -- - CardType.SUIT
68
- -- - CardType.SPECIAL
69
- -- - CardType.TAROT_REVERSE
67
+ --- Returns true for card types that have the following item config card type:
68
+ --
69
+ -- - `ItemConfigCardType.TAROT` (0)
70
+ -- - `ItemConfigCardType.SUIT` (1)
71
+ -- - `ItemConfigCardType.SPECIAL` (3)
72
+ -- - `ItemConfigCardType.TAROT_REVERSE` (5)
70
73
  function ____exports.isCard(self, cardType)
71
74
  local itemConfigCardType = ____exports.getItemConfigCardType(nil, cardType)
72
75
  if itemConfigCardType == nil then
@@ -78,31 +81,31 @@ end
78
81
  function ____exports.isCardType(self, cardType, itemConfigCardType)
79
82
  return itemConfigCardType == ____exports.getItemConfigCardType(nil, cardType)
80
83
  end
81
- --- Returns true for any card or rune added by a mod.
84
+ --- Returns true for any card type added by a mod.
82
85
  function ____exports.isModdedCardType(self, cardType)
83
86
  return not ____exports.isVanillaCardType(nil, cardType)
84
87
  end
85
- --- Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`.
88
+ --- Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`.
86
89
  function ____exports.isPocketItemObject(self, cardType)
87
90
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.SPECIAL_OBJECT)
88
91
  end
89
- --- Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`.
92
+ --- Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`.
90
93
  function ____exports.isReverseTarotCard(self, cardType)
91
94
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT_REVERSE)
92
95
  end
93
- --- Returns true for cards that have `ItemConfigCardType.RUNE`.
96
+ --- Returns true for card types that have `ItemConfigCardType.RUNE`.
94
97
  function ____exports.isRune(self, cardType)
95
98
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.RUNE)
96
99
  end
97
- --- Returns true for cards that have `ItemConfigCardType.SPECIAL`.
100
+ --- Returns true for card types that have `ItemConfigCardType.SPECIAL`.
98
101
  function ____exports.isSpecialCard(self, cardType)
99
102
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.SPECIAL)
100
103
  end
101
- --- Returns true for cards that have `ItemConfigCardType.SUIT`.
104
+ --- Returns true for card types that have `ItemConfigCardType.SUIT`.
102
105
  function ____exports.isSuitCard(self, cardType)
103
106
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.SUIT)
104
107
  end
105
- --- Returns true for cards that have `ItemConfigCardType.TAROT`.
108
+ --- Returns true for card types that have `ItemConfigCardType.TAROT`.
106
109
  function ____exports.isTarotCard(self, cardType)
107
110
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT)
108
111
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "55.2.0",
3
+ "version": "56.0.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -25,6 +25,6 @@
25
25
  "main": "dist/src/index",
26
26
  "types": "dist/index.rollup.d.ts",
27
27
  "dependencies": {
28
- "isaac-typescript-definitions": "^25.0.0"
28
+ "isaac-typescript-definitions": "^26.0.0"
29
29
  }
30
30
  }
@@ -11,9 +11,12 @@ import { ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET } from "../sets/itemConfigCardType
11
11
  import { addFlag } from "./flag";
12
12
 
13
13
  /**
14
- * Helper function to get a card description from a Card enum value.
14
+ * Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
15
+ * provided card type is not valid.
15
16
  *
16
- * For example, `getCardDescription(card)` returns "Where journey begins".
17
+ * This function works for both vanilla and modded trinkets.
18
+ *
19
+ * For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
17
20
  */
18
21
  export function getCardDescription(cardType: CardType): string {
19
22
  // "ItemConfigCard.Description" is bugged with vanilla cards on patch v1.7.6, so we use a
@@ -77,11 +80,12 @@ export function getItemConfigCardType(
77
80
  }
78
81
 
79
82
  /**
80
- * Returns true for cards that have the following card type:
81
- * - CardType.TAROT
82
- * - CardType.SUIT
83
- * - CardType.SPECIAL
84
- * - CardType.TAROT_REVERSE
83
+ * Returns true for card types that have the following item config card type:
84
+ *
85
+ * - `ItemConfigCardType.TAROT` (0)
86
+ * - `ItemConfigCardType.SUIT` (1)
87
+ * - `ItemConfigCardType.SPECIAL` (3)
88
+ * - `ItemConfigCardType.TAROT_REVERSE` (5)
85
89
  */
86
90
  export function isCard(cardType: CardType): boolean {
87
91
  const itemConfigCardType = getItemConfigCardType(cardType);
@@ -100,42 +104,41 @@ export function isCardType(
100
104
  return itemConfigCardType === getItemConfigCardType(cardType);
101
105
  }
102
106
 
103
- /** Returns true for any card or rune added by a mod. */
107
+ /** Returns true for any card type added by a mod. */
104
108
  export function isModdedCardType(cardType: CardType): boolean {
105
109
  return !isVanillaCardType(cardType);
106
110
  }
107
111
 
108
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
112
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
109
113
  export function isPocketItemObject(cardType: CardType): boolean {
110
114
  return isCardType(cardType, ItemConfigCardType.SPECIAL_OBJECT);
111
115
  }
112
116
 
113
- /** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
117
+ /** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
114
118
  export function isReverseTarotCard(cardType: CardType): boolean {
115
119
  return isCardType(cardType, ItemConfigCardType.TAROT_REVERSE);
116
120
  }
117
121
 
118
- /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
122
+ /** Returns true for card types that have `ItemConfigCardType.RUNE`. */
119
123
  export function isRune(cardType: CardType): boolean {
120
124
  return isCardType(cardType, ItemConfigCardType.RUNE);
121
125
  }
122
126
 
123
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
127
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
124
128
  export function isSpecialCard(cardType: CardType): boolean {
125
129
  return isCardType(cardType, ItemConfigCardType.SPECIAL);
126
130
  }
127
131
 
128
- /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
132
+ /** Returns true for card types that have `ItemConfigCardType.SUIT`. */
129
133
  export function isSuitCard(cardType: CardType): boolean {
130
134
  return isCardType(cardType, ItemConfigCardType.SUIT);
131
135
  }
132
136
 
133
- /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
137
+ /** Returns true for card types that have `ItemConfigCardType.TAROT`. */
134
138
  export function isTarotCard(cardType: CardType): boolean {
135
139
  return isCardType(cardType, ItemConfigCardType.TAROT);
136
140
  }
137
141
 
138
- /** Returns true for any vanilla card or rune. */
139
142
  export function isVanillaCardType(cardType: CardType): boolean {
140
143
  return cardType <= LAST_VANILLA_CARD_TYPE;
141
144
  }
@@ -4,8 +4,8 @@ import { ReadonlySet } from "../types/ReadonlySet";
4
4
  /** The set of all `ItemConfigCardType` values that are not a rune or special object. */
5
5
  export const ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET =
6
6
  new ReadonlySet<ItemConfigCardType>([
7
- ItemConfigCardType.TAROT,
8
- ItemConfigCardType.SUIT,
9
- ItemConfigCardType.SPECIAL,
10
- ItemConfigCardType.TAROT_REVERSE,
7
+ ItemConfigCardType.TAROT, // 0
8
+ ItemConfigCardType.SUIT, // 1
9
+ ItemConfigCardType.SPECIAL, // 3
10
+ ItemConfigCardType.TAROT_REVERSE, // 5
11
11
  ]);