isaacscript-common 8.9.0 → 9.0.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.
- package/dist/callbacks/postPlayerCollectible.d.ts.map +1 -1
- package/dist/callbacks/postPlayerCollectible.lua +78 -9
- 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/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/playerInventory.d.ts.map +1 -1
- package/dist/features/playerInventory.lua +8 -10
- 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/collectibleCacheFlag.d.ts +4 -1
- package/dist/functions/collectibleCacheFlag.d.ts.map +1 -1
- package/dist/functions/collectibleCacheFlag.lua +5 -2
- 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/familiars.d.ts.map +1 -1
- package/dist/functions/itemPool.lua +9 -11
- 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/players.d.ts +6 -0
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +7 -1
- 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 +63 -78
- 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/callbacks/postPlayerCollectible.ts +89 -10
- package/src/core/constantsFirstLast.ts +4 -4
- package/src/features/extraConsoleCommands/listCommands.ts +16 -16
- package/src/features/firstLast.ts +26 -26
- package/src/features/playerInventory.ts +6 -10
- package/src/features/preventCollectibleRotation.ts +2 -2
- package/src/functions/cards.ts +102 -86
- package/src/functions/collectibleCacheFlag.ts +6 -2
- package/src/functions/collectibles.ts +1 -6
- package/src/functions/familiars.ts +1 -0
- package/src/functions/itemPool.ts +6 -7
- package/src/functions/pickupsSpecific.ts +16 -13
- package/src/functions/pills.ts +1 -6
- package/src/functions/players.ts +14 -1
- 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
|
|
@@ -2120,7 +2120,7 @@ export declare function fireProjectiles(npc: EntityNPC | undefined, position: Ve
|
|
|
2120
2120
|
export declare function fireProjectilesInCircle(npc: EntityNPC | undefined, position: Vector, speed: float, numProjectiles: int): EntityProjectile[];
|
|
2121
2121
|
|
|
2122
2122
|
/** Equal to `Card.FOOL`. */
|
|
2123
|
-
export declare const
|
|
2123
|
+
export declare const FIRST_CARD_TYPE = CardType.FOOL;
|
|
2124
2124
|
|
|
2125
2125
|
/** Equal to `PlayerType.ISAAC`. */
|
|
2126
2126
|
export declare const FIRST_CHARACTER = PlayerType.ISAAC;
|
|
@@ -2309,7 +2309,7 @@ export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlyS
|
|
|
2309
2309
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
2310
2310
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
2311
2311
|
*/
|
|
2312
|
-
export declare function
|
|
2312
|
+
export declare function getAllCardTypes(): CardType[];
|
|
2313
2313
|
|
|
2314
2314
|
/**
|
|
2315
2315
|
* Helper function to get an array with every valid `Dimension` (not including `Dimension.CURRENT`).
|
|
@@ -2468,44 +2468,32 @@ export declare function getBossSet(stage: int, stageType: StageType): ReadonlySe
|
|
|
2468
2468
|
/**
|
|
2469
2469
|
* Helper function to get a card description from a Card enum value.
|
|
2470
2470
|
*
|
|
2471
|
-
* For example
|
|
2472
|
-
*
|
|
2473
|
-
* ```ts
|
|
2474
|
-
* const card = Card.FOOL;
|
|
2475
|
-
* const cardDescription = getCardDescription(card); // cardDescription is "Where journey begins"
|
|
2476
|
-
* ```
|
|
2471
|
+
* For example, `getCardDescription(card)` returns "Where journey begins".
|
|
2477
2472
|
*/
|
|
2478
|
-
export declare function getCardDescription(
|
|
2473
|
+
export declare function getCardDescription(cardType: CardType): string;
|
|
2479
2474
|
|
|
2480
2475
|
/**
|
|
2481
2476
|
* Helper function to get a card name from a Card.
|
|
2482
2477
|
*
|
|
2483
|
-
* For example
|
|
2484
|
-
*
|
|
2485
|
-
* ```ts
|
|
2486
|
-
* const card = Card.FOOL;
|
|
2487
|
-
* const cardName = getCardName(card); // cardName is "0 - The Fool"
|
|
2488
|
-
* ```
|
|
2478
|
+
* For example, `getCardName(Card.FOOL)` would return "0 - The Fool".
|
|
2489
2479
|
*/
|
|
2490
|
-
export declare function getCardName(
|
|
2480
|
+
export declare function getCardName(cardType: CardType): string;
|
|
2491
2481
|
|
|
2492
2482
|
/**
|
|
2493
2483
|
* Helper function to get all of the card entities in the room.
|
|
2494
2484
|
*
|
|
2495
|
-
* @param
|
|
2496
|
-
*
|
|
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.
|
|
2497
2487
|
*/
|
|
2498
|
-
export declare function getCards(
|
|
2488
|
+
export declare function getCards(cardType?: CardType): EntityPickupCard[];
|
|
2499
2489
|
|
|
2500
2490
|
/**
|
|
2501
|
-
* Helper function to get a set of
|
|
2491
|
+
* Helper function to get a set of card types matching the `ItemConfigCardType`.
|
|
2502
2492
|
*
|
|
2503
2493
|
* This function is variadic, meaning that you can you can specify N card types to get a set
|
|
2504
2494
|
* containing cards that match any of the specified types.
|
|
2505
2495
|
*/
|
|
2506
|
-
export declare function
|
|
2507
|
-
|
|
2508
|
-
export declare function getCardType(card: Card): ItemConfigCardType;
|
|
2496
|
+
export declare function getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
|
|
2509
2497
|
|
|
2510
2498
|
/** Get the proper name for a `Challenge` enum. This will only work for vanilla challenges. */
|
|
2511
2499
|
export declare function getChallengeName(challenge: Challenge): string;
|
|
@@ -2698,12 +2686,7 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
|
|
|
2698
2686
|
* Helper function to get the name of a collectible. Returns "Unknown" if the provided collectible
|
|
2699
2687
|
* type is not valid.
|
|
2700
2688
|
*
|
|
2701
|
-
* For example
|
|
2702
|
-
*
|
|
2703
|
-
* ```ts
|
|
2704
|
-
* const collectibleType = CollectibleType.SAD_ONION;
|
|
2705
|
-
* const collectibleName = getCollectibleName(collectibleType); // collectibleName is "Sad Onion"
|
|
2706
|
-
* ```
|
|
2689
|
+
* For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
|
|
2707
2690
|
*/
|
|
2708
2691
|
export declare function getCollectibleName(collectibleType: CollectibleType): string;
|
|
2709
2692
|
|
|
@@ -3135,7 +3118,7 @@ export declare function getFirstCardOrPill(player: EntityPlayer): PocketItemDesc
|
|
|
3135
3118
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3136
3119
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3137
3120
|
*/
|
|
3138
|
-
export declare function
|
|
3121
|
+
export declare function getFirstModdedCardType(): CardType | undefined;
|
|
3139
3122
|
|
|
3140
3123
|
/**
|
|
3141
3124
|
* Returns the first modded collectible type, or undefined if there are no modded collectibles.
|
|
@@ -3327,6 +3310,8 @@ export declare function getHUDOffsetVector(): Vector;
|
|
|
3327
3310
|
*/
|
|
3328
3311
|
export declare function getIsaacAPIClassName(object: unknown): string | undefined;
|
|
3329
3312
|
|
|
3313
|
+
export declare function getItemConfigCardType(cardType: CardType): ItemConfigCardType;
|
|
3314
|
+
|
|
3330
3315
|
/**
|
|
3331
3316
|
* Helper function to calculate what the resulting `BitFlags<DoorSlotFlag>` value would be for a
|
|
3332
3317
|
* given JSON room.
|
|
@@ -3417,7 +3402,7 @@ export declare function getLasers(laserVariant?: LaserVariant, subType?: number)
|
|
|
3417
3402
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3418
3403
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3419
3404
|
*/
|
|
3420
|
-
export declare function
|
|
3405
|
+
export declare function getLastCardType(): CardType;
|
|
3421
3406
|
|
|
3422
3407
|
/**
|
|
3423
3408
|
* Will change depending on how many modded collectibles there are.
|
|
@@ -3470,7 +3455,7 @@ export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: stri
|
|
|
3470
3455
|
export declare function getLastPillEffect(): PillEffect;
|
|
3471
3456
|
|
|
3472
3457
|
/**
|
|
3473
|
-
* Will change depending on how many modded
|
|
3458
|
+
* Will change depending on how many modded trinkets there are.
|
|
3474
3459
|
*
|
|
3475
3460
|
* This is equal to the number of trinket types, since all trinket types are contiguous (unlike
|
|
3476
3461
|
* collectibles).
|
|
@@ -3525,7 +3510,7 @@ export declare function getMatchingGridEntities(gridEntityType: GridEntityType,
|
|
|
3525
3510
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3526
3511
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3527
3512
|
*/
|
|
3528
|
-
export declare function
|
|
3513
|
+
export declare function getModdedCardTypes(): CardType[];
|
|
3529
3514
|
|
|
3530
3515
|
/**
|
|
3531
3516
|
* Returns an array containing every modded collectible type in the game.
|
|
@@ -3724,7 +3709,7 @@ export declare function getNumBitsOfN(n: int): int;
|
|
|
3724
3709
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3725
3710
|
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
3726
3711
|
*/
|
|
3727
|
-
export declare function
|
|
3712
|
+
export declare function getNumCardTypes(): int;
|
|
3728
3713
|
|
|
3729
3714
|
/**
|
|
3730
3715
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
@@ -3736,7 +3721,7 @@ export declare function getNumCollectibleTypes(): int;
|
|
|
3736
3721
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3737
3722
|
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
3738
3723
|
*/
|
|
3739
|
-
export declare function
|
|
3724
|
+
export declare function getNumModdedCardTypes(): int;
|
|
3740
3725
|
|
|
3741
3726
|
/**
|
|
3742
3727
|
* Unlike vanilla collectible types, modded collectible types are always contiguous.
|
|
@@ -3776,7 +3761,7 @@ export declare function getNumPillEffects(): int;
|
|
|
3776
3761
|
export declare function getNumRooms(): int;
|
|
3777
3762
|
|
|
3778
3763
|
/**
|
|
3779
|
-
* Will change depending on how many modded
|
|
3764
|
+
* Will change depending on how many modded trinkets there are.
|
|
3780
3765
|
*
|
|
3781
3766
|
* Equal to `itemConfig.GetTrinkets().Size - 1`. (We subtract one to account for
|
|
3782
3767
|
* `TrinketType.NULL`.)
|
|
@@ -3882,12 +3867,7 @@ export declare function getPillEffectClass(pillEffect: PillEffect): ItemConfigPi
|
|
|
3882
3867
|
/**
|
|
3883
3868
|
* Helper function to get a pill effect name from a PillEffect enum value.
|
|
3884
3869
|
*
|
|
3885
|
-
* For example
|
|
3886
|
-
*
|
|
3887
|
-
* ```ts
|
|
3888
|
-
* const pillEffect = PillEffect.BAD_GAS;
|
|
3889
|
-
* const pillEffectName = getPillEffectName(pillEffect); // trinketName is "Bad Gas"
|
|
3890
|
-
* ```
|
|
3870
|
+
* For example, `getPillEffectName(PillEffect.BAD_GAS)` would return "Bad Gas".
|
|
3891
3871
|
*/
|
|
3892
3872
|
export declare function getPillEffectName(pillEffect: PillEffect): string;
|
|
3893
3873
|
|
|
@@ -3946,18 +3926,22 @@ export declare function getPlayerCloserThan(position: Vector, distance: float):
|
|
|
3946
3926
|
* collectible type(s) provided.
|
|
3947
3927
|
*
|
|
3948
3928
|
* This function is variadic, meaning that you can specify N collectible types.
|
|
3929
|
+
*
|
|
3930
|
+
* Note that this will filter out non-real collectibles like Lilith's Incubus.
|
|
3949
3931
|
*/
|
|
3950
3932
|
export declare function getPlayerCollectibleCount(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): int;
|
|
3951
3933
|
|
|
3952
3934
|
/**
|
|
3953
3935
|
* Iterates over every item in the game and returns a map containing the number of each item that
|
|
3954
3936
|
* the player has.
|
|
3937
|
+
*
|
|
3938
|
+
* Note that this will filter out non-real collectibles like Lilith's Incubus.
|
|
3955
3939
|
*/
|
|
3956
3940
|
export declare function getPlayerCollectibleMap(player: EntityPlayer): Map<CollectibleType, int>;
|
|
3957
3941
|
|
|
3958
3942
|
/**
|
|
3959
3943
|
* Returns an array containing every collectible type that the player has that matches the provided
|
|
3960
|
-
* CacheFlag
|
|
3944
|
+
* `CacheFlag`.
|
|
3961
3945
|
*
|
|
3962
3946
|
* For example, if the cache flag is `CacheFlag.FLYING`, and the player has one Lord of the Pit and
|
|
3963
3947
|
* two Dead Doves, then this function would return:
|
|
@@ -3970,6 +3954,9 @@ export declare function getPlayerCollectibleMap(player: EntityPlayer): Map<Colle
|
|
|
3970
3954
|
* ]
|
|
3971
3955
|
* ```
|
|
3972
3956
|
*
|
|
3957
|
+
* Note that this array will not include collectibles that the player does not really have, like
|
|
3958
|
+
* Lilith's Incubus.
|
|
3959
|
+
*
|
|
3973
3960
|
* This function can only be called if at least one callback has been executed. This is because not
|
|
3974
3961
|
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
3975
3962
|
*/
|
|
@@ -4287,15 +4274,16 @@ export declare function getRandomArrayIndex<T>(array: T[] | readonly T[], seedOr
|
|
|
4287
4274
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4288
4275
|
* @param exceptions Optional. An array of cards to not select.
|
|
4289
4276
|
*/
|
|
4290
|
-
export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?:
|
|
4277
|
+
export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4291
4278
|
|
|
4292
4279
|
/**
|
|
4293
|
-
* @param
|
|
4280
|
+
* @param itemConfigCardType The item config card type that represents the pool of cards to select
|
|
4281
|
+
* from.
|
|
4294
4282
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
4295
4283
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4296
4284
|
* @param exceptions Optional. An array of cards to not select.
|
|
4297
4285
|
*/
|
|
4298
|
-
export declare function
|
|
4286
|
+
export declare function getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4299
4287
|
|
|
4300
4288
|
/**
|
|
4301
4289
|
* Helper function to get a random color.
|
|
@@ -4389,7 +4377,7 @@ export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number):
|
|
|
4389
4377
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4390
4378
|
* @param exceptions Optional. An array of runes to not select.
|
|
4391
4379
|
*/
|
|
4392
|
-
export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?:
|
|
4380
|
+
export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4393
4381
|
|
|
4394
4382
|
/**
|
|
4395
4383
|
* Helper function to get a random `Seed` value to be used in spawning entities and so on. Use this
|
|
@@ -5002,6 +4990,8 @@ export declare function getTotalCharge(player: EntityPlayer, activeSlot: ActiveS
|
|
|
5002
4990
|
/**
|
|
5003
4991
|
* Returns the total number of collectibles amongst all players. For example, if player 1 has 1 Sad
|
|
5004
4992
|
* Onion and player 2 has 2 Sad Onions, then this function would return 3.
|
|
4993
|
+
*
|
|
4994
|
+
* Note that this will filter out non-real collectibles like Lilith's Incubus.
|
|
5005
4995
|
*/
|
|
5006
4996
|
export declare function getTotalPlayerCollectibles(collectibleType: CollectibleType): int;
|
|
5007
4997
|
|
|
@@ -5070,12 +5060,7 @@ export declare function getTrinketGfxFilename(trinketType: TrinketType): string;
|
|
|
5070
5060
|
* Helper function to get the name of a trinket. Returns "Unknown" if the provided trinket type is
|
|
5071
5061
|
* not valid.
|
|
5072
5062
|
*
|
|
5073
|
-
* For example
|
|
5074
|
-
*
|
|
5075
|
-
* ```ts
|
|
5076
|
-
* const trinketType = TrinketType.SWALLOWED_PENNY;
|
|
5077
|
-
* const trinketName = getTrinketName(trinketType); // trinketName is "Swallowed Penny"
|
|
5078
|
-
* ```
|
|
5063
|
+
* For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
|
|
5079
5064
|
*/
|
|
5080
5065
|
export declare function getTrinketName(trinketType: TrinketType): string;
|
|
5081
5066
|
|
|
@@ -5130,7 +5115,7 @@ export declare function getTSTLClassName(object: unknown): string | undefined;
|
|
|
5130
5115
|
export declare function getUnusedDoorSlots(): DoorSlot[];
|
|
5131
5116
|
|
|
5132
5117
|
/** Helper function to get an array with every valid vanilla card sub-type. */
|
|
5133
|
-
export declare function
|
|
5118
|
+
export declare function getVanillaCardTypes(): CardType[];
|
|
5134
5119
|
|
|
5135
5120
|
/**
|
|
5136
5121
|
* Returns an array containing every valid vanilla collectible type in the game.
|
|
@@ -5604,13 +5589,13 @@ export declare function isBoolean(variable: unknown): variable is boolean;
|
|
|
5604
5589
|
* - CardType.SPECIAL
|
|
5605
5590
|
* - CardType.TAROT_REVERSE
|
|
5606
5591
|
*/
|
|
5607
|
-
export declare function isCard(
|
|
5592
|
+
export declare function isCard(cardType: CardType): boolean;
|
|
5608
5593
|
|
|
5609
5594
|
/** For `PickupVariant.TAROT_CARD` (300) */
|
|
5610
5595
|
export declare function isCardPickup(pickup: EntityPickup): pickup is EntityPickupCard;
|
|
5611
5596
|
|
|
5612
|
-
/** Returns whether or not the given card matches the specified card type. */
|
|
5613
|
-
export declare function isCardType(
|
|
5597
|
+
/** Returns whether or not the given card type matches the specified item config card type. */
|
|
5598
|
+
export declare function isCardType(cardType: CardType, itemConfigCardType: ItemConfigCardType): boolean;
|
|
5614
5599
|
|
|
5615
5600
|
/**
|
|
5616
5601
|
* Helper function to check if a player is a specific character (i.e. `PlayerType`).
|
|
@@ -5941,7 +5926,7 @@ export declare function isLRoom(roomShape: RoomShape): boolean;
|
|
|
5941
5926
|
export declare function isLuaDebugEnabled(): boolean;
|
|
5942
5927
|
|
|
5943
5928
|
/** Returns true for any card or rune added by a mod. */
|
|
5944
|
-
export declare function
|
|
5929
|
+
export declare function isModdedCardType(cardType: CardType): boolean;
|
|
5945
5930
|
|
|
5946
5931
|
export declare function isModdedCharacter(character: PlayerType): boolean;
|
|
5947
5932
|
|
|
@@ -6008,8 +5993,8 @@ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
|
|
|
6008
5993
|
*/
|
|
6009
5994
|
export declare function isPlayerUsingPony(player: EntityPlayer): boolean;
|
|
6010
5995
|
|
|
6011
|
-
/** Returns true for cards that have `
|
|
6012
|
-
export declare function isPocketItemObject(
|
|
5996
|
+
/** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
|
|
5997
|
+
export declare function isPocketItemObject(cardType: CardType): boolean;
|
|
6013
5998
|
|
|
6014
5999
|
/** Helper function to detect if a variable is of type `GridEntityPoop`. */
|
|
6015
6000
|
export declare function isPoop(variable: unknown): variable is GridEntityPoop;
|
|
@@ -6066,8 +6051,8 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
|
|
|
6066
6051
|
|
|
6067
6052
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
6068
6053
|
|
|
6069
|
-
/** Returns true for cards that have `
|
|
6070
|
-
export declare function isReverseTarotCard(
|
|
6054
|
+
/** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
6055
|
+
export declare function isReverseTarotCard(cardType: CardType): boolean;
|
|
6071
6056
|
|
|
6072
6057
|
/** Helper function to check if something is an instantiated `RNG` object. */
|
|
6073
6058
|
export declare function isRNG(object: unknown): object is RNG;
|
|
@@ -6093,7 +6078,7 @@ export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
|
|
|
6093
6078
|
export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
|
|
6094
6079
|
|
|
6095
6080
|
/** Returns true for cards that have `CardType.RUNE`. */
|
|
6096
|
-
export declare function isRune(
|
|
6081
|
+
export declare function isRune(cardType: CardType): boolean;
|
|
6097
6082
|
|
|
6098
6083
|
/** For `PickupVariant.SACK` (69) */
|
|
6099
6084
|
export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
|
|
@@ -6170,7 +6155,7 @@ export declare function isSingleUseCollectible(collectibleType: CollectibleType)
|
|
|
6170
6155
|
export declare function isSlot(entity: Entity): entity is EntitySlot;
|
|
6171
6156
|
|
|
6172
6157
|
/** Returns true for cards that have `CardType.SPECIAL`. */
|
|
6173
|
-
export declare function isSpecialCard(
|
|
6158
|
+
export declare function isSpecialCard(cardType: CardType): boolean;
|
|
6174
6159
|
|
|
6175
6160
|
/** Helper function to detect if a variable is of type `GridEntitySpikes`. */
|
|
6176
6161
|
export declare function isSpikes(variable: unknown): variable is GridEntitySpikes;
|
|
@@ -6185,7 +6170,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
|
|
|
6185
6170
|
export declare function isString(variable: unknown): variable is string;
|
|
6186
6171
|
|
|
6187
6172
|
/** Returns true for cards that have `CardType.SUIT`. */
|
|
6188
|
-
export declare function isSuitCard(
|
|
6173
|
+
export declare function isSuitCard(cardType: CardType): boolean;
|
|
6189
6174
|
|
|
6190
6175
|
export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
|
|
6191
6176
|
|
|
@@ -6196,7 +6181,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
|
|
|
6196
6181
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
6197
6182
|
|
|
6198
6183
|
/** Returns true for cards that have `CardType.TAROT`. */
|
|
6199
|
-
export declare function isTarotCard(
|
|
6184
|
+
export declare function isTarotCard(cardType: CardType): boolean;
|
|
6200
6185
|
|
|
6201
6186
|
/** Helper function to detect if a variable is of type `EntityTear`. */
|
|
6202
6187
|
export declare function isTear(variable: unknown): variable is EntityTear;
|
|
@@ -6240,7 +6225,7 @@ export declare function isValidCollectibleType(collectibleType: CollectibleType)
|
|
|
6240
6225
|
export declare function isValidGridPosition(gridPosition: Vector, roomShape: RoomShape): boolean;
|
|
6241
6226
|
|
|
6242
6227
|
/** Returns true for any vanilla card or rune. */
|
|
6243
|
-
export declare function
|
|
6228
|
+
export declare function isVanillaCardType(cardType: CardType): boolean;
|
|
6244
6229
|
|
|
6245
6230
|
export declare function isVanillaCharacter(character: PlayerType): boolean;
|
|
6246
6231
|
|
|
@@ -6440,7 +6425,7 @@ export declare const LAST_ROOM_TYPE: RoomType;
|
|
|
6440
6425
|
export declare const LAST_STAGE: LevelStage;
|
|
6441
6426
|
|
|
6442
6427
|
/** Calculated from the `Card` enum. */
|
|
6443
|
-
export declare const
|
|
6428
|
+
export declare const LAST_VANILLA_CARD_TYPE: CardType;
|
|
6444
6429
|
|
|
6445
6430
|
/** Calculated from the `PlayerType` enum. */
|
|
6446
6431
|
export declare const LAST_VANILLA_CHARACTER: PlayerType;
|
|
@@ -8231,7 +8216,7 @@ export declare const NUM_NORMAL_PILL_COLORS: number;
|
|
|
8231
8216
|
export declare const NUM_PILLS_IN_POOL: number;
|
|
8232
8217
|
|
|
8233
8218
|
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
8234
|
-
export declare const
|
|
8219
|
+
export declare const NUM_VANILLA_CARD_TYPES: number;
|
|
8235
8220
|
|
|
8236
8221
|
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
8237
8222
|
export declare const NUM_VANILLA_COLLECTIBLE_TYPES: number;
|
|
@@ -9082,12 +9067,12 @@ export declare function removeAllBombs(bombVariant?: BombVariant, subType?: numb
|
|
|
9082
9067
|
/**
|
|
9083
9068
|
* Helper function to remove all of the cards in the room.
|
|
9084
9069
|
*
|
|
9085
|
-
* @param
|
|
9086
|
-
*
|
|
9070
|
+
* @param cardType Optional. If specified, will only remove cards that match this sub-type. Default
|
|
9071
|
+
* is -1, which matches every sub-type.
|
|
9087
9072
|
* @param cap Optional. If specified, will only remove the given amount of cards.
|
|
9088
9073
|
* @returns The cards that were removed.
|
|
9089
9074
|
*/
|
|
9090
|
-
export declare function removeAllCards(
|
|
9075
|
+
export declare function removeAllCards(cardType?: CardType, cap?: int): EntityPickupCard[];
|
|
9091
9076
|
|
|
9092
9077
|
export declare function removeAllCharacters(string: string, character: string): string;
|
|
9093
9078
|
|
|
@@ -10764,13 +10749,13 @@ export declare function spawnBossWithSeed(entityType: EntityType, variant: int,
|
|
|
10764
10749
|
/**
|
|
10765
10750
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
10766
10751
|
*/
|
|
10767
|
-
export declare function spawnCard(
|
|
10752
|
+
export declare function spawnCard(cardType: CardType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
10768
10753
|
|
|
10769
10754
|
/**
|
|
10770
10755
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
|
|
10771
10756
|
* and a specific seed.
|
|
10772
10757
|
*/
|
|
10773
|
-
export declare function spawnCardWithSeed(
|
|
10758
|
+
export declare function spawnCardWithSeed(cardType: CardType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
|
|
10774
10759
|
|
|
10775
10760
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
10776
10761
|
export declare function spawnCoin(coinSubType: CoinSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
|
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"}
|