isaacscript-common 50.0.0 → 51.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 (30) hide show
  1. package/dist/index.rollup.d.ts +17 -15
  2. package/dist/isaacscript-common.lua +370 -436
  3. package/dist/src/classes/features/other/customStages/versusScreen.d.ts.map +1 -1
  4. package/dist/src/classes/features/other/customStages/versusScreen.lua +13 -22
  5. package/dist/src/enums/ModCallbackCustom.d.ts +1 -1
  6. package/dist/src/functions/bosses.d.ts +9 -15
  7. package/dist/src/functions/bosses.d.ts.map +1 -1
  8. package/dist/src/functions/bosses.lua +14 -28
  9. package/dist/src/functions/characters.d.ts +7 -0
  10. package/dist/src/functions/characters.d.ts.map +1 -1
  11. package/dist/src/functions/characters.lua +11 -0
  12. package/dist/src/functions/versusScreen.d.ts +30 -0
  13. package/dist/src/functions/versusScreen.d.ts.map +1 -0
  14. package/dist/src/functions/versusScreen.lua +47 -0
  15. package/dist/src/objects/characterSpritePNGFileNames.d.ts +45 -0
  16. package/dist/src/objects/characterSpritePNGFileNames.d.ts.map +1 -0
  17. package/dist/src/objects/characterSpritePNGFileNames.lua +48 -0
  18. package/dist/src/sets/bossSets.d.ts +5 -5
  19. package/dist/src/sets/bossSets.d.ts.map +1 -1
  20. package/dist/src/sets/bossSets.lua +284 -396
  21. package/package.json +1 -1
  22. package/src/classes/features/other/customStages/versusScreen.ts +13 -27
  23. package/src/enums/ModCallbackCustom.ts +1 -1
  24. package/src/functions/bosses.ts +17 -29
  25. package/src/functions/characters.ts +14 -0
  26. package/src/functions/versusScreen.ts +58 -0
  27. package/src/objects/bossNamePNGFileNames.ts +1 -1
  28. package/src/objects/bossPortraitPNGFileNames.ts +1 -1
  29. package/src/objects/characterSpritePNGFileNames.ts +49 -0
  30. package/src/sets/bossSets.ts +370 -356
@@ -4722,20 +4722,18 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
4722
4722
  /**
4723
4723
  * Helper function to get the set of every boss in the game.
4724
4724
  *
4725
- * The set contains strings with the entity type and variant, separated by a period.
4726
- *
4727
4725
  * Note that this set does not include:
4728
4726
  * - mini-bosses (e.g. Ultra Pride, Krampus)
4729
4727
  * - bosses that do not appear in Boss Rooms (e.g. Uriel, Gabriel)
4730
- * - the second phase of multi-phase bosses (e.g. Mega Satan 2), with the exception of The Beast
4731
- * (Ultra Famine, Ultra Pestilence, Ultra War, and Ultra Death are included)
4728
+ * - the second phase of multi-phase bosses (e.g. Mega Satan 2, Ultra Famine, Ultra Pestilence,
4729
+ * Ultra War, Ultra Death)
4732
4730
  *
4733
4731
  * Also see the `getBossSet` and `getCombinedBossSet` functions.
4734
4732
  *
4735
- * @param includeStoryBosses Optional. Whether to include "story" bosses like Mom and It Lives!
4733
+ * @param includeStoryBosses Optional. Whether to include "story" bosses like Mom and It Lives.
4736
4734
  * Default is true.
4737
4735
  */
4738
- export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<string>;
4736
+ export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<BossID>;
4739
4737
 
4740
4738
  /**
4741
4739
  * Helper function to get every legal grid index for the current room.
@@ -4918,11 +4916,9 @@ export declare function getBossRushDoor(): GridEntityDoor | undefined;
4918
4916
  * Helper function to get the set of vanilla bosses for a particular stage and stage type
4919
4917
  * combination.
4920
4918
  *
4921
- * The set contains strings with the entity type and variant, separated by a period.
4922
- *
4923
4919
  * Also see the `getAllBossesSet` and `getCombinedBossSet` functions.
4924
4920
  */
4925
- export declare function getBossSet(stage: int, stageType: StageType): ReadonlySet<string> | undefined;
4921
+ export declare function getBossSet(stage: LevelStage, stageType: StageType): ReadonlySet<BossID> | undefined;
4926
4922
 
4927
4923
  /**
4928
4924
  * Helper function to get a card description from a Card enum value.
@@ -4975,6 +4971,14 @@ export declare function getCharacterName(character: PlayerType): string;
4975
4971
  /** Helper function to get an array containing the characters of all of the current players. */
4976
4972
  export declare function getCharacters(): PlayerType[];
4977
4973
 
4974
+ /**
4975
+ * Helper function to get the path to the sprite for a particular character.
4976
+ *
4977
+ * For example, the file path for `PlayerType.ISAAC` is
4978
+ * "characters/costumes/character_001_isaac.png".
4979
+ */
4980
+ export declare function getCharacterSpritePNGFilePath(character: PlayerType): string;
4981
+
4978
4982
  /**
4979
4983
  * Helper function to get the collectibles that are granted to a particular character at the
4980
4984
  * beginning of a run.
@@ -5200,14 +5204,12 @@ export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntit
5200
5204
 
5201
5205
  /**
5202
5206
  * Helper function to get the set of vanilla bosses for a particular stage across all of the stage
5203
- * types. For example, specifying a stage of 2 will return a set with all of the bosses for
5204
- * Basement, Cellar, Burning Basement, Downpour, and Dross.
5205
- *
5206
- * The set contains strings with the entity type and variant, separated by a period.
5207
+ * types. For example, specifying `LevelStage.BASEMENT_2` will return a set with all of the bosses
5208
+ * for Basement, Cellar, Burning Basement, Downpour, and Dross.
5207
5209
  *
5208
5210
  * Also see the `getAllBossesSet` and `getBossSet` functions.
5209
5211
  */
5210
- export declare function getCombinedBossSet(stage: int): ReadonlySet<string> | undefined;
5212
+ export declare function getCombinedBossSet(stage: LevelStage): ReadonlySet<BossID> | undefined;
5211
5213
 
5212
5214
  /** Helper function to get the entity type, variant, and sub-type from an `EntityID`. */
5213
5215
  export declare function getConstituentsFromEntityID(entityID: EntityID): [entityType: EntityType, variant: int, subType: int];
@@ -11147,7 +11149,7 @@ export declare enum ModCallbackCustom {
11147
11149
  * - in the `POST_NEW_ROOM_REORDERED` callback (firing every time a room is entered, even if the
11148
11150
  * entity was previously there on a previous room entry)
11149
11151
  * - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when the
11150
- * trapdoor appears after defeating It Lives!)
11152
+ * trapdoor appears after defeating It Lives)
11151
11153
  *
11152
11154
  * For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
11153
11155
  * callback instead.