isaacscript-common 8.8.2 → 9.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.
- package/dist/core/constantsFirstLast.d.ts +4 -4
- package/dist/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/core/constantsFirstLast.lua +4 -4
- package/dist/features/customStage/exports.d.ts +11 -1
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +10 -4
- package/dist/features/customStage/versusScreen.d.ts.map +1 -1
- package/dist/features/customStage/versusScreen.lua +3 -3
- package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
- package/dist/features/firstLast.d.ts +9 -9
- package/dist/features/firstLast.d.ts.map +1 -1
- package/dist/features/firstLast.lua +26 -26
- package/dist/features/preventCollectibleRotation.lua +2 -2
- package/dist/functions/cards.d.ts +27 -36
- package/dist/functions/cards.d.ts.map +1 -1
- package/dist/functions/cards.lua +70 -79
- package/dist/functions/collectibles.d.ts +1 -6
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +1 -6
- package/dist/functions/gridEntities.d.ts +1 -13
- package/dist/functions/gridEntities.d.ts.map +1 -1
- package/dist/functions/gridEntities.lua +45 -66
- package/dist/functions/gridEntitiesSpecific.d.ts +49 -4
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -1
- package/dist/functions/gridEntitiesSpecific.lua +81 -3
- package/dist/functions/pickupsSpecific.d.ts +9 -9
- package/dist/functions/pickupsSpecific.d.ts.map +1 -1
- package/dist/functions/pickupsSpecific.lua +16 -16
- package/dist/functions/pills.d.ts +1 -6
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +1 -6
- package/dist/functions/pocketItems.lua +4 -4
- package/dist/functions/rockAlt.lua +2 -2
- package/dist/functions/trinkets.d.ts +1 -6
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.lua +1 -6
- package/dist/functions/types.d.ts +3 -3
- package/dist/functions/types.d.ts.map +1 -1
- package/dist/functions/types.lua +2 -2
- package/dist/index.d.ts +111 -85
- package/dist/maps/cardMap.d.ts +2 -2
- package/dist/maps/cardMap.d.ts.map +1 -1
- package/dist/maps/cardMap.lua +203 -203
- package/dist/objects/cardDescriptions.d.ts +2 -2
- package/dist/objects/cardDescriptions.d.ts.map +1 -1
- package/dist/objects/cardDescriptions.lua +99 -99
- package/dist/objects/cardNames.d.ts +2 -2
- package/dist/objects/cardNames.d.ts.map +1 -1
- package/dist/objects/cardNames.lua +99 -99
- package/dist/objects/cardTypeToItemConfigCardType.d.ts +6 -0
- package/dist/objects/cardTypeToItemConfigCardType.d.ts.map +1 -0
- package/dist/objects/cardTypeToItemConfigCardType.lua +106 -0
- package/package.json +2 -2
- package/src/core/constantsFirstLast.ts +4 -4
- package/src/features/customStage/exports.ts +15 -7
- package/src/features/customStage/versusScreen.ts +3 -3
- package/src/features/extraConsoleCommands/listCommands.ts +16 -16
- package/src/features/firstLast.ts +26 -26
- package/src/features/preventCollectibleRotation.ts +2 -2
- package/src/functions/cards.ts +102 -88
- package/src/functions/collectibles.ts +1 -6
- package/src/functions/gridEntities.ts +0 -29
- package/src/functions/gridEntitiesSpecific.ts +119 -3
- package/src/functions/pickupsSpecific.ts +16 -13
- package/src/functions/pills.ts +1 -6
- package/src/functions/pocketItems.ts +4 -4
- package/src/functions/rockAlt.ts +2 -2
- package/src/functions/trinkets.ts +1 -6
- package/src/functions/types.ts +3 -3
- package/src/maps/cardMap.ts +204 -204
- package/src/objects/cardDescriptions.ts +100 -100
- package/src/objects/cardNames.ts +100 -100
- package/src/objects/cardTypeToItemConfigCardType.ts +106 -0
- package/dist/objects/cardTypes.d.ts +0 -6
- package/dist/objects/cardTypes.d.ts.map +0 -1
- package/dist/objects/cardTypes.lua +0 -106
- package/src/objects/cardTypes.ts +0 -104
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { BombVariant } from 'isaac-typescript-definitions';
|
|
|
10
10
|
import { BossID } from 'isaac-typescript-definitions';
|
|
11
11
|
import { ButtonAction } from 'isaac-typescript-definitions';
|
|
12
12
|
import { CacheFlag } from 'isaac-typescript-definitions';
|
|
13
|
-
import {
|
|
13
|
+
import { CardType } from 'isaac-typescript-definitions';
|
|
14
14
|
import { Challenge } from 'isaac-typescript-definitions';
|
|
15
15
|
import { CoinSubType } from 'isaac-typescript-definitions';
|
|
16
16
|
import { CollectiblePedestalType } from 'isaac-typescript-definitions';
|
|
@@ -454,12 +454,12 @@ export declare function arrayToBitFlags<T extends BitFlag | BitFlag128>(array: T
|
|
|
454
454
|
export declare function arrayToString<T>(array: T[] | readonly T[]): string;
|
|
455
455
|
|
|
456
456
|
/**
|
|
457
|
-
* Helper function to safely cast a `number` to a `
|
|
457
|
+
* Helper function to safely cast a `number` to a `CardType`. (This is better than using the `as`
|
|
458
458
|
* TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
459
459
|
*
|
|
460
460
|
* This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
461
461
|
*/
|
|
462
|
-
export declare function
|
|
462
|
+
export declare function asCardType(num: number): CardType;
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
465
|
* Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
|
|
@@ -605,7 +605,7 @@ export declare function canRunUnlockAchievements(): boolean;
|
|
|
605
605
|
export declare function capitalizeFirstLetter(string: string): string;
|
|
606
606
|
|
|
607
607
|
/** Maps card names to card sub-types. */
|
|
608
|
-
export declare const CARD_MAP: ReadonlyMap<string,
|
|
608
|
+
export declare const CARD_MAP: ReadonlyMap<string, CardType>;
|
|
609
609
|
|
|
610
610
|
/**
|
|
611
611
|
* Helper function for quickly switching to a new room without playing a particular animation. Use
|
|
@@ -954,6 +954,19 @@ export declare function countEntities(entityType?: EntityType, variant?: number,
|
|
|
954
954
|
*/
|
|
955
955
|
export declare function countSetBits(n: int): int;
|
|
956
956
|
|
|
957
|
+
/**
|
|
958
|
+
* Equal to -1. Setting the stage to an invalid stage value is useful in that it prevents backdrops
|
|
959
|
+
* and shadows from loading.
|
|
960
|
+
*/
|
|
961
|
+
export declare const CUSTOM_FLOOR_STAGE: LevelStage;
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* We must use `StageType.WRATH_OF_THE_LAMB` instead of `StageType.ORIGINAL` or else the walls will
|
|
965
|
+
* not render properly. DeadInfinity suspects that this might be because it is trying to use the
|
|
966
|
+
* Dark Room's backdrop (instead of The Chest).
|
|
967
|
+
*/
|
|
968
|
+
export declare const CUSTOM_FLOOR_STAGE_TYPE = StageType.WRATH_OF_THE_LAMB;
|
|
969
|
+
|
|
957
970
|
/**
|
|
958
971
|
* An object that represents a possible boss for a custom stage. This can be for a vanilla boss or a
|
|
959
972
|
* custom boss.
|
|
@@ -2107,7 +2120,7 @@ export declare function fireProjectiles(npc: EntityNPC | undefined, position: Ve
|
|
|
2107
2120
|
export declare function fireProjectilesInCircle(npc: EntityNPC | undefined, position: Vector, speed: float, numProjectiles: int): EntityProjectile[];
|
|
2108
2121
|
|
|
2109
2122
|
/** Equal to `Card.FOOL`. */
|
|
2110
|
-
export declare const
|
|
2123
|
+
export declare const FIRST_CARD_TYPE = CardType.FOOL;
|
|
2111
2124
|
|
|
2112
2125
|
/** Equal to `PlayerType.ISAAC`. */
|
|
2113
2126
|
export declare const FIRST_CHARACTER = PlayerType.ISAAC;
|
|
@@ -2296,7 +2309,7 @@ export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlyS
|
|
|
2296
2309
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
2297
2310
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
2298
2311
|
*/
|
|
2299
|
-
export declare function
|
|
2312
|
+
export declare function getAllCardTypes(): CardType[];
|
|
2300
2313
|
|
|
2301
2314
|
/**
|
|
2302
2315
|
* Helper function to get an array with every valid `Dimension` (not including `Dimension.CURRENT`).
|
|
@@ -2455,44 +2468,32 @@ export declare function getBossSet(stage: int, stageType: StageType): ReadonlySe
|
|
|
2455
2468
|
/**
|
|
2456
2469
|
* Helper function to get a card description from a Card enum value.
|
|
2457
2470
|
*
|
|
2458
|
-
* For example
|
|
2459
|
-
*
|
|
2460
|
-
* ```ts
|
|
2461
|
-
* const card = Card.FOOL;
|
|
2462
|
-
* const cardDescription = getCardDescription(card); // cardDescription is "Where journey begins"
|
|
2463
|
-
* ```
|
|
2471
|
+
* For example, `getCardDescription(card)` returns "Where journey begins".
|
|
2464
2472
|
*/
|
|
2465
|
-
export declare function getCardDescription(
|
|
2473
|
+
export declare function getCardDescription(cardType: CardType): string;
|
|
2466
2474
|
|
|
2467
2475
|
/**
|
|
2468
2476
|
* Helper function to get a card name from a Card.
|
|
2469
2477
|
*
|
|
2470
|
-
* For example
|
|
2471
|
-
*
|
|
2472
|
-
* ```ts
|
|
2473
|
-
* const card = Card.FOOL;
|
|
2474
|
-
* const cardName = getCardName(card); // cardName is "0 - The Fool"
|
|
2475
|
-
* ```
|
|
2478
|
+
* For example, `getCardName(Card.FOOL)` would return "0 - The Fool".
|
|
2476
2479
|
*/
|
|
2477
|
-
export declare function getCardName(
|
|
2480
|
+
export declare function getCardName(cardType: CardType): string;
|
|
2478
2481
|
|
|
2479
2482
|
/**
|
|
2480
2483
|
* Helper function to get all of the card entities in the room.
|
|
2481
2484
|
*
|
|
2482
|
-
* @param
|
|
2483
|
-
*
|
|
2485
|
+
* @param cardType Optional. If specified, will only get the cards that match the sub-type. Default
|
|
2486
|
+
* is -1, which matches every sub-type.
|
|
2484
2487
|
*/
|
|
2485
|
-
export declare function getCards(
|
|
2488
|
+
export declare function getCards(cardType?: CardType): EntityPickupCard[];
|
|
2486
2489
|
|
|
2487
2490
|
/**
|
|
2488
|
-
* Helper function to get a set of
|
|
2491
|
+
* Helper function to get a set of card types matching the `ItemConfigCardType`.
|
|
2489
2492
|
*
|
|
2490
2493
|
* This function is variadic, meaning that you can you can specify N card types to get a set
|
|
2491
2494
|
* containing cards that match any of the specified types.
|
|
2492
2495
|
*/
|
|
2493
|
-
export declare function
|
|
2494
|
-
|
|
2495
|
-
export declare function getCardType(card: Card): ItemConfigCardType;
|
|
2496
|
+
export declare function getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
|
|
2496
2497
|
|
|
2497
2498
|
/** Get the proper name for a `Challenge` enum. This will only work for vanilla challenges. */
|
|
2498
2499
|
export declare function getChallengeName(challenge: Challenge): string;
|
|
@@ -2685,12 +2686,7 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
|
|
|
2685
2686
|
* Helper function to get the name of a collectible. Returns "Unknown" if the provided collectible
|
|
2686
2687
|
* type is not valid.
|
|
2687
2688
|
*
|
|
2688
|
-
* For example
|
|
2689
|
-
*
|
|
2690
|
-
* ```ts
|
|
2691
|
-
* const collectibleType = CollectibleType.SAD_ONION;
|
|
2692
|
-
* const collectibleName = getCollectibleName(collectibleType); // collectibleName is "Sad Onion"
|
|
2693
|
-
* ```
|
|
2689
|
+
* For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
|
|
2694
2690
|
*/
|
|
2695
2691
|
export declare function getCollectibleName(collectibleType: CollectibleType): string;
|
|
2696
2692
|
|
|
@@ -2798,7 +2794,8 @@ export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntit
|
|
|
2798
2794
|
export declare function getCombinedBossSet(stage: int): ReadonlySet<string> | undefined;
|
|
2799
2795
|
|
|
2800
2796
|
/**
|
|
2801
|
-
* Helper function to get all of the
|
|
2797
|
+
* Helper function to get all of the grid entities of type `GridEntityType.CRAWL_SPACE` (18) in the
|
|
2798
|
+
* room.
|
|
2802
2799
|
*
|
|
2803
2800
|
* @param crawlSpaceVariant Optional. If specified, will only get the crawl spaces that match the
|
|
2804
2801
|
* variant. Default is -1, which matches every variant.
|
|
@@ -3121,7 +3118,7 @@ export declare function getFirstCardOrPill(player: EntityPlayer): PocketItemDesc
|
|
|
3121
3118
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3122
3119
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3123
3120
|
*/
|
|
3124
|
-
export declare function
|
|
3121
|
+
export declare function getFirstModdedCardType(): CardType | undefined;
|
|
3125
3122
|
|
|
3126
3123
|
/**
|
|
3127
3124
|
* Returns the first modded collectible type, or undefined if there are no modded collectibles.
|
|
@@ -3313,6 +3310,8 @@ export declare function getHUDOffsetVector(): Vector;
|
|
|
3313
3310
|
*/
|
|
3314
3311
|
export declare function getIsaacAPIClassName(object: unknown): string | undefined;
|
|
3315
3312
|
|
|
3313
|
+
export declare function getItemConfigCardType(cardType: CardType): ItemConfigCardType;
|
|
3314
|
+
|
|
3316
3315
|
/**
|
|
3317
3316
|
* Helper function to calculate what the resulting `BitFlags<DoorSlotFlag>` value would be for a
|
|
3318
3317
|
* given JSON room.
|
|
@@ -3403,7 +3402,7 @@ export declare function getLasers(laserVariant?: LaserVariant, subType?: number)
|
|
|
3403
3402
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3404
3403
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3405
3404
|
*/
|
|
3406
|
-
export declare function
|
|
3405
|
+
export declare function getLastCardType(): CardType;
|
|
3407
3406
|
|
|
3408
3407
|
/**
|
|
3409
3408
|
* Will change depending on how many modded collectibles there are.
|
|
@@ -3456,7 +3455,7 @@ export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: stri
|
|
|
3456
3455
|
export declare function getLastPillEffect(): PillEffect;
|
|
3457
3456
|
|
|
3458
3457
|
/**
|
|
3459
|
-
* Will change depending on how many modded
|
|
3458
|
+
* Will change depending on how many modded trinkets there are.
|
|
3460
3459
|
*
|
|
3461
3460
|
* This is equal to the number of trinket types, since all trinket types are contiguous (unlike
|
|
3462
3461
|
* collectibles).
|
|
@@ -3511,7 +3510,7 @@ export declare function getMatchingGridEntities(gridEntityType: GridEntityType,
|
|
|
3511
3510
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3512
3511
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3513
3512
|
*/
|
|
3514
|
-
export declare function
|
|
3513
|
+
export declare function getModdedCardTypes(): CardType[];
|
|
3515
3514
|
|
|
3516
3515
|
/**
|
|
3517
3516
|
* Returns an array containing every modded collectible type in the game.
|
|
@@ -3710,7 +3709,7 @@ export declare function getNumBitsOfN(n: int): int;
|
|
|
3710
3709
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3711
3710
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3712
3711
|
*/
|
|
3713
|
-
export declare function
|
|
3712
|
+
export declare function getNumCardTypes(): int;
|
|
3714
3713
|
|
|
3715
3714
|
/**
|
|
3716
3715
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
@@ -3722,7 +3721,7 @@ export declare function getNumCollectibleTypes(): int;
|
|
|
3722
3721
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3723
3722
|
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
3724
3723
|
*/
|
|
3725
|
-
export declare function
|
|
3724
|
+
export declare function getNumModdedCardTypes(): int;
|
|
3726
3725
|
|
|
3727
3726
|
/**
|
|
3728
3727
|
* Unlike vanilla collectible types, modded collectible types are always contiguous.
|
|
@@ -3762,7 +3761,7 @@ export declare function getNumPillEffects(): int;
|
|
|
3762
3761
|
export declare function getNumRooms(): int;
|
|
3763
3762
|
|
|
3764
3763
|
/**
|
|
3765
|
-
* Will change depending on how many modded
|
|
3764
|
+
* Will change depending on how many modded trinkets there are.
|
|
3766
3765
|
*
|
|
3767
3766
|
* Equal to `itemConfig.GetTrinkets().Size - 1`. (We subtract one to account for
|
|
3768
3767
|
* `TrinketType.NULL`.)
|
|
@@ -3868,12 +3867,7 @@ export declare function getPillEffectClass(pillEffect: PillEffect): ItemConfigPi
|
|
|
3868
3867
|
/**
|
|
3869
3868
|
* Helper function to get a pill effect name from a PillEffect enum value.
|
|
3870
3869
|
*
|
|
3871
|
-
* For example
|
|
3872
|
-
*
|
|
3873
|
-
* ```ts
|
|
3874
|
-
* const pillEffect = PillEffect.BAD_GAS;
|
|
3875
|
-
* const pillEffectName = getPillEffectName(pillEffect); // trinketName is "Bad Gas"
|
|
3876
|
-
* ```
|
|
3870
|
+
* For example, `getPillEffectName(PillEffect.BAD_GAS)` would return "Bad Gas".
|
|
3877
3871
|
*/
|
|
3878
3872
|
export declare function getPillEffectName(pillEffect: PillEffect): string;
|
|
3879
3873
|
|
|
@@ -4273,15 +4267,16 @@ export declare function getRandomArrayIndex<T>(array: T[] | readonly T[], seedOr
|
|
|
4273
4267
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4274
4268
|
* @param exceptions Optional. An array of cards to not select.
|
|
4275
4269
|
*/
|
|
4276
|
-
export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?:
|
|
4270
|
+
export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4277
4271
|
|
|
4278
4272
|
/**
|
|
4279
|
-
* @param
|
|
4273
|
+
* @param itemConfigCardType The item config card type that represents the pool of cards to select
|
|
4274
|
+
* from.
|
|
4280
4275
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
4281
4276
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4282
4277
|
* @param exceptions Optional. An array of cards to not select.
|
|
4283
4278
|
*/
|
|
4284
|
-
export declare function
|
|
4279
|
+
export declare function getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4285
4280
|
|
|
4286
4281
|
/**
|
|
4287
4282
|
* Helper function to get a random color.
|
|
@@ -4375,7 +4370,7 @@ export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number):
|
|
|
4375
4370
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4376
4371
|
* @param exceptions Optional. An array of runes to not select.
|
|
4377
4372
|
*/
|
|
4378
|
-
export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?:
|
|
4373
|
+
export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4379
4374
|
|
|
4380
4375
|
/**
|
|
4381
4376
|
* Helper function to get a random `Seed` value to be used in spawning entities and so on. Use this
|
|
@@ -5014,8 +5009,8 @@ export declare function getTransformationName(playerForm: PlayerForm): string;
|
|
|
5014
5009
|
export declare function getTransformationsForCollectibleType(collectibleType: CollectibleType): Set<PlayerForm>;
|
|
5015
5010
|
|
|
5016
5011
|
/**
|
|
5017
|
-
* Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` in the
|
|
5018
|
-
* Specify a specific trapdoor variant to select only trapdoors of that variant.
|
|
5012
|
+
* Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` (17) in the
|
|
5013
|
+
* room. Specify a specific trapdoor variant to select only trapdoors of that variant.
|
|
5019
5014
|
*/
|
|
5020
5015
|
export declare function getTrapdoors(trapdoorVariant?: TrapdoorVariant): GridEntity[];
|
|
5021
5016
|
|
|
@@ -5056,12 +5051,7 @@ export declare function getTrinketGfxFilename(trinketType: TrinketType): string;
|
|
|
5056
5051
|
* Helper function to get the name of a trinket. Returns "Unknown" if the provided trinket type is
|
|
5057
5052
|
* not valid.
|
|
5058
5053
|
*
|
|
5059
|
-
* For example
|
|
5060
|
-
*
|
|
5061
|
-
* ```ts
|
|
5062
|
-
* const trinketType = TrinketType.SWALLOWED_PENNY;
|
|
5063
|
-
* const trinketName = getTrinketName(trinketType); // trinketName is "Swallowed Penny"
|
|
5064
|
-
* ```
|
|
5054
|
+
* For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
|
|
5065
5055
|
*/
|
|
5066
5056
|
export declare function getTrinketName(trinketType: TrinketType): string;
|
|
5067
5057
|
|
|
@@ -5116,7 +5106,7 @@ export declare function getTSTLClassName(object: unknown): string | undefined;
|
|
|
5116
5106
|
export declare function getUnusedDoorSlots(): DoorSlot[];
|
|
5117
5107
|
|
|
5118
5108
|
/** Helper function to get an array with every valid vanilla card sub-type. */
|
|
5119
|
-
export declare function
|
|
5109
|
+
export declare function getVanillaCardTypes(): CardType[];
|
|
5120
5110
|
|
|
5121
5111
|
/**
|
|
5122
5112
|
* Returns an array containing every valid vanilla collectible type in the game.
|
|
@@ -5478,8 +5468,6 @@ export declare function inSecretShop(): boolean;
|
|
|
5478
5468
|
*/
|
|
5479
5469
|
export declare function inStartingRoom(): boolean;
|
|
5480
5470
|
|
|
5481
|
-
export declare const INVALID_STAGE_VALUE: LevelStage;
|
|
5482
|
-
|
|
5483
5471
|
/**
|
|
5484
5472
|
* Helper function to return an array with the elements from start to end, inclusive. (The "i"
|
|
5485
5473
|
* stands for inclusive.)
|
|
@@ -5592,13 +5580,13 @@ export declare function isBoolean(variable: unknown): variable is boolean;
|
|
|
5592
5580
|
* - CardType.SPECIAL
|
|
5593
5581
|
* - CardType.TAROT_REVERSE
|
|
5594
5582
|
*/
|
|
5595
|
-
export declare function isCard(
|
|
5583
|
+
export declare function isCard(cardType: CardType): boolean;
|
|
5596
5584
|
|
|
5597
5585
|
/** For `PickupVariant.TAROT_CARD` (300) */
|
|
5598
5586
|
export declare function isCardPickup(pickup: EntityPickup): pickup is EntityPickupCard;
|
|
5599
5587
|
|
|
5600
|
-
/** Returns whether or not the given card matches the specified card type. */
|
|
5601
|
-
export declare function isCardType(
|
|
5588
|
+
/** Returns whether or not the given card type matches the specified item config card type. */
|
|
5589
|
+
export declare function isCardType(cardType: CardType, itemConfigCardType: ItemConfigCardType): boolean;
|
|
5602
5590
|
|
|
5603
5591
|
/**
|
|
5604
5592
|
* Helper function to check if a player is a specific character (i.e. `PlayerType`).
|
|
@@ -5929,7 +5917,7 @@ export declare function isLRoom(roomShape: RoomShape): boolean;
|
|
|
5929
5917
|
export declare function isLuaDebugEnabled(): boolean;
|
|
5930
5918
|
|
|
5931
5919
|
/** Returns true for any card or rune added by a mod. */
|
|
5932
|
-
export declare function
|
|
5920
|
+
export declare function isModdedCardType(cardType: CardType): boolean;
|
|
5933
5921
|
|
|
5934
5922
|
export declare function isModdedCharacter(character: PlayerType): boolean;
|
|
5935
5923
|
|
|
@@ -5996,8 +5984,8 @@ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
|
|
|
5996
5984
|
*/
|
|
5997
5985
|
export declare function isPlayerUsingPony(player: EntityPlayer): boolean;
|
|
5998
5986
|
|
|
5999
|
-
/** Returns true for cards that have `
|
|
6000
|
-
export declare function isPocketItemObject(
|
|
5987
|
+
/** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
|
|
5988
|
+
export declare function isPocketItemObject(cardType: CardType): boolean;
|
|
6001
5989
|
|
|
6002
5990
|
/** Helper function to detect if a variable is of type `GridEntityPoop`. */
|
|
6003
5991
|
export declare function isPoop(variable: unknown): variable is GridEntityPoop;
|
|
@@ -6054,8 +6042,8 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
|
|
|
6054
6042
|
|
|
6055
6043
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
6056
6044
|
|
|
6057
|
-
/** Returns true for cards that have `
|
|
6058
|
-
export declare function isReverseTarotCard(
|
|
6045
|
+
/** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
6046
|
+
export declare function isReverseTarotCard(cardType: CardType): boolean;
|
|
6059
6047
|
|
|
6060
6048
|
/** Helper function to check if something is an instantiated `RNG` object. */
|
|
6061
6049
|
export declare function isRNG(object: unknown): object is RNG;
|
|
@@ -6081,7 +6069,7 @@ export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
|
|
|
6081
6069
|
export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
|
|
6082
6070
|
|
|
6083
6071
|
/** Returns true for cards that have `CardType.RUNE`. */
|
|
6084
|
-
export declare function isRune(
|
|
6072
|
+
export declare function isRune(cardType: CardType): boolean;
|
|
6085
6073
|
|
|
6086
6074
|
/** For `PickupVariant.SACK` (69) */
|
|
6087
6075
|
export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
|
|
@@ -6158,7 +6146,7 @@ export declare function isSingleUseCollectible(collectibleType: CollectibleType)
|
|
|
6158
6146
|
export declare function isSlot(entity: Entity): entity is EntitySlot;
|
|
6159
6147
|
|
|
6160
6148
|
/** Returns true for cards that have `CardType.SPECIAL`. */
|
|
6161
|
-
export declare function isSpecialCard(
|
|
6149
|
+
export declare function isSpecialCard(cardType: CardType): boolean;
|
|
6162
6150
|
|
|
6163
6151
|
/** Helper function to detect if a variable is of type `GridEntitySpikes`. */
|
|
6164
6152
|
export declare function isSpikes(variable: unknown): variable is GridEntitySpikes;
|
|
@@ -6173,7 +6161,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
|
|
|
6173
6161
|
export declare function isString(variable: unknown): variable is string;
|
|
6174
6162
|
|
|
6175
6163
|
/** Returns true for cards that have `CardType.SUIT`. */
|
|
6176
|
-
export declare function isSuitCard(
|
|
6164
|
+
export declare function isSuitCard(cardType: CardType): boolean;
|
|
6177
6165
|
|
|
6178
6166
|
export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
|
|
6179
6167
|
|
|
@@ -6184,7 +6172,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
|
|
|
6184
6172
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
6185
6173
|
|
|
6186
6174
|
/** Returns true for cards that have `CardType.TAROT`. */
|
|
6187
|
-
export declare function isTarotCard(
|
|
6175
|
+
export declare function isTarotCard(cardType: CardType): boolean;
|
|
6188
6176
|
|
|
6189
6177
|
/** Helper function to detect if a variable is of type `EntityTear`. */
|
|
6190
6178
|
export declare function isTear(variable: unknown): variable is EntityTear;
|
|
@@ -6228,7 +6216,7 @@ export declare function isValidCollectibleType(collectibleType: CollectibleType)
|
|
|
6228
6216
|
export declare function isValidGridPosition(gridPosition: Vector, roomShape: RoomShape): boolean;
|
|
6229
6217
|
|
|
6230
6218
|
/** Returns true for any vanilla card or rune. */
|
|
6231
|
-
export declare function
|
|
6219
|
+
export declare function isVanillaCardType(cardType: CardType): boolean;
|
|
6232
6220
|
|
|
6233
6221
|
export declare function isVanillaCharacter(character: PlayerType): boolean;
|
|
6234
6222
|
|
|
@@ -6428,7 +6416,7 @@ export declare const LAST_ROOM_TYPE: RoomType;
|
|
|
6428
6416
|
export declare const LAST_STAGE: LevelStage;
|
|
6429
6417
|
|
|
6430
6418
|
/** Calculated from the `Card` enum. */
|
|
6431
|
-
export declare const
|
|
6419
|
+
export declare const LAST_VANILLA_CARD_TYPE: CardType;
|
|
6432
6420
|
|
|
6433
6421
|
/** Calculated from the `PlayerType` enum. */
|
|
6434
6422
|
export declare const LAST_VANILLA_CHARACTER: PlayerType;
|
|
@@ -8219,7 +8207,7 @@ export declare const NUM_NORMAL_PILL_COLORS: number;
|
|
|
8219
8207
|
export declare const NUM_PILLS_IN_POOL: number;
|
|
8220
8208
|
|
|
8221
8209
|
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
8222
|
-
export declare const
|
|
8210
|
+
export declare const NUM_VANILLA_CARD_TYPES: number;
|
|
8223
8211
|
|
|
8224
8212
|
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
8225
8213
|
export declare const NUM_VANILLA_COLLECTIBLE_TYPES: number;
|
|
@@ -9070,12 +9058,12 @@ export declare function removeAllBombs(bombVariant?: BombVariant, subType?: numb
|
|
|
9070
9058
|
/**
|
|
9071
9059
|
* Helper function to remove all of the cards in the room.
|
|
9072
9060
|
*
|
|
9073
|
-
* @param
|
|
9074
|
-
*
|
|
9061
|
+
* @param cardType Optional. If specified, will only remove cards that match this sub-type. Default
|
|
9062
|
+
* is -1, which matches every sub-type.
|
|
9075
9063
|
* @param cap Optional. If specified, will only remove the given amount of cards.
|
|
9076
9064
|
* @returns The cards that were removed.
|
|
9077
9065
|
*/
|
|
9078
|
-
export declare function removeAllCards(
|
|
9066
|
+
export declare function removeAllCards(cardType?: CardType, cap?: int): EntityPickupCard[];
|
|
9079
9067
|
|
|
9080
9068
|
export declare function removeAllCharacters(string: string, character: string): string;
|
|
9081
9069
|
|
|
@@ -9099,6 +9087,19 @@ export declare function removeAllCoins(coinSubType?: CoinSubType, cap?: int): En
|
|
|
9099
9087
|
*/
|
|
9100
9088
|
export declare function removeAllCollectibles(collectibleType?: CollectibleType, cap?: int): EntityPickupCollectible[];
|
|
9101
9089
|
|
|
9090
|
+
/**
|
|
9091
|
+
* Helper function to remove all of the `GridEntityType.CRAWL_SPACE` (18) in the room.
|
|
9092
|
+
*
|
|
9093
|
+
* @param crawlSpaceVariant Optional. If specified, will only remove the crawl spaces that match
|
|
9094
|
+
* this variant. Default is -1, which matches every variant.
|
|
9095
|
+
* @param updateRoom Optional. Whether or not to update the room after the crawl spaces are removed.
|
|
9096
|
+
* Default is false. For more information, see the description of the
|
|
9097
|
+
* `removeGridEntities` helper function.
|
|
9098
|
+
* @param cap Optional. If specified, will only remove the given amount of crawl spaces.
|
|
9099
|
+
* @returns The crawl spaces that were removed.
|
|
9100
|
+
*/
|
|
9101
|
+
export declare function removeAllCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant, updateRoom?: boolean, cap?: int): GridEntity[];
|
|
9102
|
+
|
|
9102
9103
|
/**
|
|
9103
9104
|
* Helper function to remove all of the doors in the room. By default, it will remove every door.
|
|
9104
9105
|
* You can optionally specify one or more room types to remove only the doors that match the
|
|
@@ -9412,6 +9413,19 @@ export declare function removeAllTears(tearVariant?: TearVariant, subType?: numb
|
|
|
9412
9413
|
*/
|
|
9413
9414
|
export declare function removeAllTNT(variant?: number, updateRoom?: boolean, cap?: int): GridEntityTNT[];
|
|
9414
9415
|
|
|
9416
|
+
/**
|
|
9417
|
+
* Helper function to remove all of the `GridEntityType.TRAPDOOR` (17) in the room.
|
|
9418
|
+
*
|
|
9419
|
+
* @param trapdoorVariant Optional. If specified, will only remove the trapdoors that match this
|
|
9420
|
+
* variant. Default is -1, which matches every variant.
|
|
9421
|
+
* @param updateRoom Optional. Whether or not to update the room after the trapdoors are removed.
|
|
9422
|
+
* Default is false. For more information, see the description of the
|
|
9423
|
+
* `removeGridEntities` helper function.
|
|
9424
|
+
* @param cap Optional. If specified, will only remove the given amount of trapdoors.
|
|
9425
|
+
* @returns The trapdoors that were removed.
|
|
9426
|
+
*/
|
|
9427
|
+
export declare function removeAllTrapdoors(trapdoorVariant?: TrapdoorVariant, updateRoom?: boolean, cap?: int): GridEntity[];
|
|
9428
|
+
|
|
9415
9429
|
/**
|
|
9416
9430
|
* Helper function to remove all of the trinkets in the room.
|
|
9417
9431
|
*
|
|
@@ -10726,13 +10740,13 @@ export declare function spawnBossWithSeed(entityType: EntityType, variant: int,
|
|
|
10726
10740
|
/**
|
|
10727
10741
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
10728
10742
|
*/
|
|
10729
|
-
export declare function spawnCard(
|
|
10743
|
+
export declare function spawnCard(cardType: CardType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
10730
10744
|
|
|
10731
10745
|
/**
|
|
10732
10746
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
|
|
10733
10747
|
* and a specific seed.
|
|
10734
10748
|
*/
|
|
10735
|
-
export declare function spawnCardWithSeed(
|
|
10749
|
+
export declare function spawnCardWithSeed(cardType: CardType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
|
|
10736
10750
|
|
|
10737
10751
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
10738
10752
|
export declare function spawnCoin(coinSubType: CoinSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
|
|
@@ -10761,6 +10775,12 @@ export declare function spawnCoinWithSeed(coinSubType: CoinSubType, position: Ve
|
|
|
10761
10775
|
*/
|
|
10762
10776
|
export declare function spawnCollectible(collectibleType: CollectibleType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
10763
10777
|
|
|
10778
|
+
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18). */
|
|
10779
|
+
export declare function spawnCrawlSpace(gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
10780
|
+
|
|
10781
|
+
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18) with a specific variant. */
|
|
10782
|
+
export declare function spawnCrawlSpaceWithVariant(crawlSpaceVariant: CrawlSpaceVariant, gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
10783
|
+
|
|
10764
10784
|
/**
|
|
10765
10785
|
* Helper function to spawn a custom door. This is intended to be called from the `POST_NEW_ROOM`
|
|
10766
10786
|
* callback when the player enters a room that should have a custom door. (You could also call it
|
|
@@ -10870,10 +10890,10 @@ export declare function spawnCustomTrapdoor(gridIndexOrPosition: int | Vector, c
|
|
|
10870
10890
|
*/
|
|
10871
10891
|
export declare function spawnCustomTrapdoorToVanilla(gridIndexOrPosition: int | Vector, stage?: LevelStage, stageType?: StageType, anm2Path?: string, spawnOpen?: boolean): GridEntity;
|
|
10872
10892
|
|
|
10873
|
-
/** Helper function to spawn a `GridEntityType.
|
|
10893
|
+
/** Helper function to spawn a `GridEntityType.PIT` (7) with a specific variant. */
|
|
10874
10894
|
export declare function spawnDoor(gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
|
|
10875
10895
|
|
|
10876
|
-
/** Helper function to spawn a `GridEntityType.DOOR` (16)
|
|
10896
|
+
/** Helper function to spawn a `GridEntityType.DOOR` (16). */
|
|
10877
10897
|
export declare function spawnDoorWithVariant(doorVariant: DoorVariant, gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
|
|
10878
10898
|
|
|
10879
10899
|
/** Helper function to spawn a `EntityType.EFFECT` (1000). */
|
|
@@ -11006,7 +11026,7 @@ export declare function spawnPill(pillColor: PillColor, position: Vector, veloci
|
|
|
11006
11026
|
*/
|
|
11007
11027
|
export declare function spawnPillWithSeed(pillColor: PillColor, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupPill;
|
|
11008
11028
|
|
|
11009
|
-
/** Helper function to spawn a `GridEntityType.
|
|
11029
|
+
/** Helper function to spawn a `GridEntityType.DOOR` (16) with a specific variant. */
|
|
11010
11030
|
export declare function spawnPit(gridIndexOrPosition: int | Vector): GridEntityPit | undefined;
|
|
11011
11031
|
|
|
11012
11032
|
/** Helper function to spawn a `GridEntityType.PIT` (7) with a specific variant. */
|
|
@@ -11099,6 +11119,12 @@ export declare function spawnTNT(gridIndexOrPosition: int | Vector): GridEntityT
|
|
|
11099
11119
|
/** Helper function to spawn a `GridEntityType.TNT` (12) with a specific variant. */
|
|
11100
11120
|
export declare function spawnTNTWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
|
|
11101
11121
|
|
|
11122
|
+
/** Helper function to spawn a `GridEntityType.TRAPDOOR` (17). */
|
|
11123
|
+
export declare function spawnTrapdoor(gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
11124
|
+
|
|
11125
|
+
/** Helper function to spawn a `GridEntityType.TRAPDOOR` (17) with a specific variant. */
|
|
11126
|
+
export declare function spawnTrapdoorWithVariant(trapdoorVariant: TrapdoorVariant, gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
11127
|
+
|
|
11102
11128
|
/**
|
|
11103
11129
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
11104
11130
|
*/
|
package/dist/maps/cardMap.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CardType } from "isaac-typescript-definitions";
|
|
2
2
|
/** Maps card names to card sub-types. */
|
|
3
|
-
export declare const CARD_MAP: ReadonlyMap<string,
|
|
3
|
+
export declare const CARD_MAP: ReadonlyMap<string, CardType>;
|
|
4
4
|
//# sourceMappingURL=cardMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardMap.d.ts","sourceRoot":"","sources":["../../src/maps/cardMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cardMap.d.ts","sourceRoot":"","sources":["../../src/maps/cardMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIxD,yCAAyC;AACzC,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CA2MjD,CAAC"}
|