isaacscript-common 39.1.0 → 39.2.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.
@@ -8661,6 +8661,9 @@ export declare function isGlitchedCollectible(collectible: EntityPickup): boolea
8661
8661
 
8662
8662
  export declare function isGoldenTrinketType(trinketType: TrinketType): boolean;
8663
8663
 
8664
+ /** Helper function to see if the given pill color is either a gold pill or a horse gold pill. */
8665
+ export declare function isGoldPill(pillColor: PillColor): boolean;
8666
+
8664
8667
  /**
8665
8668
  * Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
8666
8669
  * `Difficulty.GREEDIER`.
@@ -8713,6 +8716,7 @@ export declare function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean;
8713
8716
  */
8714
8717
  export declare function isHomeCloset(roomData: RoomConfig): boolean;
8715
8718
 
8719
+ /** Helper function to see if the given pill color is a horse pill. */
8716
8720
  export declare function isHorsePill(pillColor: PillColor): boolean;
8717
8721
 
8718
8722
  export declare function isInteger(variable: unknown): variable is int;
@@ -9042,7 +9046,7 @@ export declare function isRoomType(roomData: RoomConfig, ...roomTypes: RoomType[
9042
9046
  */
9043
9047
  export declare function isRoomVisible(roomGridIndexOrRoomDescriptor: int | RoomDescriptor, minimapAPI?: boolean): boolean;
9044
9048
 
9045
- /** Returns true for cards that have `CardType.RUNE`. */
9049
+ /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
9046
9050
  export declare function isRune(cardType: CardType): boolean;
9047
9051
 
9048
9052
  /** For `PickupVariant.SACK` (69). */
@@ -9151,7 +9155,7 @@ export declare function isSlot(entity: Entity): entity is EntitySlot;
9151
9155
  /** Returns true for the specific variants of `EntityType.SLOT` that are machines. */
9152
9156
  export declare function isSlotMachine(entity: Entity): boolean;
9153
9157
 
9154
- /** Returns true for cards that have `CardType.SPECIAL`. */
9158
+ /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
9155
9159
  export declare function isSpecialCard(cardType: CardType): boolean;
9156
9160
 
9157
9161
  /** Helper function to detect if a variable is of type `GridEntitySpikes`. */
@@ -9221,7 +9225,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
9221
9225
 
9222
9226
  export declare function isString(variable: unknown): variable is string;
9223
9227
 
9224
- /** Returns true for cards that have `CardType.SUIT`. */
9228
+ /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
9225
9229
  export declare function isSuitCard(cardType: CardType): boolean;
9226
9230
 
9227
9231
  export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
@@ -9235,7 +9239,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
9235
9239
  /** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
9236
9240
  export declare function isTaintedLazarus(player: EntityPlayer): boolean;
9237
9241
 
9238
- /** Returns true for cards that have `CardType.TAROT`. */
9242
+ /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
9239
9243
  export declare function isTarotCard(cardType: CardType): boolean;
9240
9244
 
9241
9245
  /** Helper function to detect if a variable is of type `EntityTear`. */
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 39.1.0
3
+ isaacscript-common 39.2.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -33142,6 +33142,9 @@ end
33142
33142
  function ____exports.getVanillaPillEffects(self)
33143
33143
  return iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
33144
33144
  end
33145
+ function ____exports.isGoldPill(self, pillColor)
33146
+ return pillColor == PillColor.GOLD or pillColor == PillColor.HORSE_GOLD
33147
+ end
33145
33148
  function ____exports.isHorsePill(self, pillColor)
33146
33149
  return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
33147
33150
  end
@@ -42,13 +42,13 @@ export declare function isModdedCardType(cardType: CardType): boolean;
42
42
  export declare function isPocketItemObject(cardType: CardType): boolean;
43
43
  /** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
44
44
  export declare function isReverseTarotCard(cardType: CardType): boolean;
45
- /** Returns true for cards that have `CardType.RUNE`. */
45
+ /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
46
46
  export declare function isRune(cardType: CardType): boolean;
47
- /** Returns true for cards that have `CardType.SPECIAL`. */
47
+ /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
48
48
  export declare function isSpecialCard(cardType: CardType): boolean;
49
- /** Returns true for cards that have `CardType.SUIT`. */
49
+ /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
50
50
  export declare function isSuitCard(cardType: CardType): boolean;
51
- /** Returns true for cards that have `CardType.TAROT`. */
51
+ /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
52
52
  export declare function isTarotCard(cardType: CardType): boolean;
53
53
  /** Returns true for any vanilla card or rune. */
54
54
  export declare function isVanillaCardType(cardType: CardType): boolean;
@@ -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;AAe3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgB7D;AAED;;;;GAIG;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;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,QAAQ,EAAE,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAOlD;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,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AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,QAAQ,EAAE,CAEhD;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"}
@@ -97,19 +97,19 @@ end
97
97
  function ____exports.isReverseTarotCard(self, cardType)
98
98
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT_REVERSE)
99
99
  end
100
- --- Returns true for cards that have `CardType.RUNE`.
100
+ --- Returns true for cards that have `ItemConfigCardType.RUNE`.
101
101
  function ____exports.isRune(self, cardType)
102
102
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.RUNE)
103
103
  end
104
- --- Returns true for cards that have `CardType.SPECIAL`.
104
+ --- Returns true for cards that have `ItemConfigCardType.SPECIAL`.
105
105
  function ____exports.isSpecialCard(self, cardType)
106
106
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.SPECIAL)
107
107
  end
108
- --- Returns true for cards that have `CardType.SUIT`.
108
+ --- Returns true for cards that have `ItemConfigCardType.SUIT`.
109
109
  function ____exports.isSuitCard(self, cardType)
110
110
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.SUIT)
111
111
  end
112
- --- Returns true for cards that have `CardType.TAROT`.
112
+ --- Returns true for cards that have `ItemConfigCardType.TAROT`.
113
113
  function ____exports.isTarotCard(self, cardType)
114
114
  return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT)
115
115
  end
@@ -77,6 +77,9 @@ export declare function getPillEffectName(pillEffect: PillEffect): string;
77
77
  export declare function getPillEffectType(pillEffect: PillEffect): ItemConfigPillEffectType;
78
78
  /** Helper function to get an array with every vanilla pill effect. */
79
79
  export declare function getVanillaPillEffects(): PillEffect[];
80
+ /** Helper function to see if the given pill color is either a gold pill or a horse gold pill. */
81
+ export declare function isGoldPill(pillColor: PillColor): boolean;
82
+ /** Helper function to see if the given pill color is a horse pill. */
80
83
  export declare function isHorsePill(pillColor: PillColor): boolean;
81
84
  export declare function isModdedPillEffect(pillEffect: PillEffect): boolean;
82
85
  export declare function isVanillaPillEffect(pillEffect: PillEffect): boolean;
@@ -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,EAAE,CAE9C;AAED;;;GAGG;AACH,wB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ports.getVanillaPillEffects(self)
150
150
  return iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
151
151
  end
152
+ --- Helper function to see if the given pill color is either a gold pill or a horse gold pill.
153
+ function ____exports.isGoldPill(self, pillColor)
154
+ return pillColor == PillColor.GOLD or pillColor == PillColor.HORSE_GOLD
155
+ end
156
+ --- Helper function to see if the given pill color is a horse pill.
152
157
  function ____exports.isHorsePill(self, pillColor)
153
158
  return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
154
159
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "39.1.0",
3
+ "version": "39.2.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -126,22 +126,22 @@ export function isReverseTarotCard(cardType: CardType): boolean {
126
126
  return isCardType(cardType, ItemConfigCardType.TAROT_REVERSE);
127
127
  }
128
128
 
129
- /** Returns true for cards that have `CardType.RUNE`. */
129
+ /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
130
130
  export function isRune(cardType: CardType): boolean {
131
131
  return isCardType(cardType, ItemConfigCardType.RUNE);
132
132
  }
133
133
 
134
- /** Returns true for cards that have `CardType.SPECIAL`. */
134
+ /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
135
135
  export function isSpecialCard(cardType: CardType): boolean {
136
136
  return isCardType(cardType, ItemConfigCardType.SPECIAL);
137
137
  }
138
138
 
139
- /** Returns true for cards that have `CardType.SUIT`. */
139
+ /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
140
140
  export function isSuitCard(cardType: CardType): boolean {
141
141
  return isCardType(cardType, ItemConfigCardType.SUIT);
142
142
  }
143
143
 
144
- /** Returns true for cards that have `CardType.TAROT`. */
144
+ /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
145
145
  export function isTarotCard(cardType: CardType): boolean {
146
146
  return isCardType(cardType, ItemConfigCardType.TAROT);
147
147
  }
@@ -198,6 +198,12 @@ export function getVanillaPillEffects(): PillEffect[] {
198
198
  return iRange(FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT);
199
199
  }
200
200
 
201
+ /** Helper function to see if the given pill color is either a gold pill or a horse gold pill. */
202
+ export function isGoldPill(pillColor: PillColor): boolean {
203
+ return pillColor === PillColor.GOLD || pillColor === PillColor.HORSE_GOLD;
204
+ }
205
+
206
+ /** Helper function to see if the given pill color is a horse pill. */
201
207
  export function isHorsePill(pillColor: PillColor): boolean {
202
208
  return asNumber(pillColor) > HORSE_PILL_ADJUSTMENT;
203
209
  }