isaacscript-common 55.2.0 → 56.1.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.
Files changed (32) hide show
  1. package/dist/index.rollup.d.ts +26 -17
  2. package/dist/isaacscript-common.lua +336 -214
  3. package/dist/src/core/constants.d.ts +2 -2
  4. package/dist/src/core/constants.lua +2 -2
  5. package/dist/src/functions/bosses.d.ts +5 -0
  6. package/dist/src/functions/bosses.d.ts.map +1 -1
  7. package/dist/src/functions/bosses.lua +15 -7
  8. package/dist/src/functions/cards.d.ts +18 -15
  9. package/dist/src/functions/cards.d.ts.map +1 -1
  10. package/dist/src/functions/cards.lua +18 -15
  11. package/dist/src/objects/bossIDToEntityTypeVariant.d.ts +1 -0
  12. package/dist/src/objects/bossIDToEntityTypeVariant.d.ts.map +1 -1
  13. package/dist/src/objects/bossIDToEntityTypeVariant.lua +1 -0
  14. package/dist/src/objects/bossNamePNGFileNames.d.ts +106 -102
  15. package/dist/src/objects/bossNamePNGFileNames.d.ts.map +1 -1
  16. package/dist/src/objects/bossNamePNGFileNames.lua +104 -102
  17. package/dist/src/objects/bossNames.d.ts +111 -0
  18. package/dist/src/objects/bossNames.d.ts.map +1 -0
  19. package/dist/src/objects/bossNames.lua +112 -0
  20. package/dist/src/objects/bossPortraitPNGFileNames.d.ts +106 -102
  21. package/dist/src/objects/bossPortraitPNGFileNames.d.ts.map +1 -1
  22. package/dist/src/objects/bossPortraitPNGFileNames.lua +104 -102
  23. package/package.json +2 -2
  24. package/src/core/constants.ts +2 -2
  25. package/src/functions/bosses.ts +11 -0
  26. package/src/functions/cards.ts +18 -15
  27. package/src/functions/collectibles.ts +1 -1
  28. package/src/objects/bossIDToEntityTypeVariant.ts +5 -1
  29. package/src/objects/bossNamePNGFileNames.ts +112 -106
  30. package/src/objects/bossNames.ts +118 -0
  31. package/src/objects/bossPortraitPNGFileNames.ts +115 -109
  32. package/src/sets/itemConfigCardTypesForCardsSet.ts +4 -4
@@ -4954,6 +4954,12 @@ export declare function getBossID(): BossID | 0;
4954
4954
 
4955
4955
  export declare function getBossIDFromEntityTypeVariant(entityType: EntityType, variant: int): BossID | undefined;
4956
4956
 
4957
+ /**
4958
+ * Helper function to get the proper English name for a boss. For example, the name for
4959
+ * `BossID.WRETCHED` (36) is "The Wretched".
4960
+ */
4961
+ export declare function getBossName(bossID: BossID): string;
4962
+
4957
4963
  /**
4958
4964
  * Helper function to get the path to the name file that corresponds to the graphic shown on the
4959
4965
  * versus screen for the particular boss.
@@ -4987,9 +4993,12 @@ export declare function getBossRushDoor(): GridEntityDoor | undefined;
4987
4993
  export declare function getBossSet(stage: LevelStage, stageType: StageType): ReadonlySet<BossID> | undefined;
4988
4994
 
4989
4995
  /**
4990
- * Helper function to get a card description from a Card enum value.
4996
+ * Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
4997
+ * provided card type is not valid.
4991
4998
  *
4992
- * For example, `getCardDescription(card)` returns "Where journey begins".
4999
+ * This function works for both vanilla and modded trinkets.
5000
+ *
5001
+ * For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
4993
5002
  */
4994
5003
  export declare function getCardDescription(cardType: CardType): string;
4995
5004
 
@@ -8659,11 +8668,12 @@ export declare function isBossRoomOf(roomData: RoomConfig, bossID: BossID): bool
8659
8668
  export declare function isBossRushDoor(door: GridEntityDoor): boolean;
8660
8669
 
8661
8670
  /**
8662
- * Returns true for cards that have the following card type:
8663
- * - CardType.TAROT
8664
- * - CardType.SUIT
8665
- * - CardType.SPECIAL
8666
- * - CardType.TAROT_REVERSE
8671
+ * Returns true for card types that have the following item config card type:
8672
+ *
8673
+ * - `ItemConfigCardType.TAROT` (0)
8674
+ * - `ItemConfigCardType.SUIT` (1)
8675
+ * - `ItemConfigCardType.SPECIAL` (3)
8676
+ * - `ItemConfigCardType.TAROT_REVERSE` (5)
8667
8677
  */
8668
8678
  export declare function isCard(cardType: CardType): boolean;
8669
8679
 
@@ -9277,7 +9287,7 @@ export declare function isMirrorRoom(roomData: RoomConfig): boolean;
9277
9287
  */
9278
9288
  export declare function isMissedTear(tear: EntityTear): boolean;
9279
9289
 
9280
- /** Returns true for any card or rune added by a mod. */
9290
+ /** Returns true for any card type added by a mod. */
9281
9291
  export declare function isModdedCardType(cardType: CardType): boolean;
9282
9292
 
9283
9293
  export declare function isModdedCharacter(character: PlayerType): boolean;
@@ -9362,7 +9372,7 @@ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
9362
9372
  */
9363
9373
  export declare function isPlayerAbleToAim(player: EntityPlayer): boolean;
9364
9374
 
9365
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
9375
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
9366
9376
  export declare function isPocketItemObject(cardType: CardType): boolean;
9367
9377
 
9368
9378
  /** Helper function to detect if a variable is of type `GridEntityPoop`. */
@@ -9468,7 +9478,7 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
9468
9478
  */
9469
9479
  export declare function isRepentanceStage(stageType: StageType): boolean;
9470
9480
 
9471
- /** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
9481
+ /** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
9472
9482
  export declare function isReverseTarotCard(cardType: CardType): boolean;
9473
9483
 
9474
9484
  /** Helper function to check if something is an instantiated `RNG` object. */
@@ -9516,7 +9526,7 @@ export declare function isRoomType(roomData: RoomConfig, ...roomTypes: RoomType[
9516
9526
  */
9517
9527
  export declare function isRoomVisible(roomGridIndexOrRoomDescriptor: int | RoomDescriptor, minimapAPI?: boolean): boolean;
9518
9528
 
9519
- /** Returns true for cards that have `ItemConfigCardType.RUNE`. */
9529
+ /** Returns true for card types that have `ItemConfigCardType.RUNE`. */
9520
9530
  export declare function isRune(cardType: CardType): boolean;
9521
9531
 
9522
9532
  /** For `PickupVariant.SACK` (69). */
@@ -9625,7 +9635,7 @@ export declare function isSlot(entity: Entity): entity is EntitySlot;
9625
9635
  /** Returns true for the specific variants of `EntityType.SLOT` that are machines. */
9626
9636
  export declare function isSlotMachine(entity: Entity): boolean;
9627
9637
 
9628
- /** Returns true for cards that have `ItemConfigCardType.SPECIAL`. */
9638
+ /** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
9629
9639
  export declare function isSpecialCard(cardType: CardType): boolean;
9630
9640
 
9631
9641
  /** Helper function to detect if a variable is of type `GridEntitySpikes`. */
@@ -9695,7 +9705,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
9695
9705
 
9696
9706
  export declare function isString(variable: unknown): variable is string;
9697
9707
 
9698
- /** Returns true for cards that have `ItemConfigCardType.SUIT`. */
9708
+ /** Returns true for card types that have `ItemConfigCardType.SUIT`. */
9699
9709
  export declare function isSuitCard(cardType: CardType): boolean;
9700
9710
 
9701
9711
  export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
@@ -9709,7 +9719,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
9709
9719
  /** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
9710
9720
  export declare function isTaintedLazarus(player: EntityPlayer): boolean;
9711
9721
 
9712
- /** Returns true for cards that have `ItemConfigCardType.TAROT`. */
9722
+ /** Returns true for card types that have `ItemConfigCardType.TAROT`. */
9713
9723
  export declare function isTarotCard(cardType: CardType): boolean;
9714
9724
 
9715
9725
  /** Helper function to detect if a variable is of type `EntityTear`. */
@@ -9793,7 +9803,6 @@ export declare function isValidCollectibleType(collectibleType: CollectibleType)
9793
9803
  */
9794
9804
  export declare function isValidGridPosition(gridPosition: Vector, roomShape: RoomShape): boolean;
9795
9805
 
9796
- /** Returns true for any vanilla card or rune. */
9797
9806
  export declare function isVanillaCardType(cardType: CardType): boolean;
9798
9807
 
9799
9808
  export declare function isVanillaCharacter(character: PlayerType): boolean;
@@ -15169,8 +15178,8 @@ export declare function PriorityCallbackCustom<T extends ModCallbackCustom>(modC
15169
15178
  export declare type PublicInterface<T> = Pick<T, keyof T>;
15170
15179
 
15171
15180
  /**
15172
- * An array representing every valid collectible type quality. Specifically, this is `[0, 1, 2, 3,
15173
- * 4]`.
15181
+ * An array representing every valid collectible type quality. Specifically, this is: `[0, 1, 2, 3,
15182
+ * 4]`
15174
15183
  */
15175
15184
  export declare const QUALITIES: readonly Quality[];
15176
15185