isaacscript-common 39.1.0 → 39.2.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.
@@ -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;
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 39.1.0
3
+ isaacscript-common 39.2.0
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
@@ -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,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,EAAE,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAM3E;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,IAAI,SAAS,EAAE,CAEjD;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;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,E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EAAE,UAAU,GACrB,yBAAyB,CAQ3B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAgBhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,GACrB,wBAAwB,CAQ1B;AAED,sEAAsE;AACtE,wBAAgB,qBAAqB,IAAI,UAAU,EAAE,CAEpD;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,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAEnE"}
@@ -149,6 +149,11 @@ end
149
149
  function ____exports.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.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -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
  }