isaacscript-common 8.9.1 → 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/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/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 +53 -77
- 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/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/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
|
|
@@ -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
|
|
|
@@ -4287,15 +4267,16 @@ export declare function getRandomArrayIndex<T>(array: T[] | readonly T[], seedOr
|
|
|
4287
4267
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4288
4268
|
* @param exceptions Optional. An array of cards to not select.
|
|
4289
4269
|
*/
|
|
4290
|
-
export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?:
|
|
4270
|
+
export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4291
4271
|
|
|
4292
4272
|
/**
|
|
4293
|
-
* @param
|
|
4273
|
+
* @param itemConfigCardType The item config card type that represents the pool of cards to select
|
|
4274
|
+
* from.
|
|
4294
4275
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
4295
4276
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4296
4277
|
* @param exceptions Optional. An array of cards to not select.
|
|
4297
4278
|
*/
|
|
4298
|
-
export declare function
|
|
4279
|
+
export declare function getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4299
4280
|
|
|
4300
4281
|
/**
|
|
4301
4282
|
* Helper function to get a random color.
|
|
@@ -4389,7 +4370,7 @@ export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number):
|
|
|
4389
4370
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
4390
4371
|
* @param exceptions Optional. An array of runes to not select.
|
|
4391
4372
|
*/
|
|
4392
|
-
export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?:
|
|
4373
|
+
export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
4393
4374
|
|
|
4394
4375
|
/**
|
|
4395
4376
|
* Helper function to get a random `Seed` value to be used in spawning entities and so on. Use this
|
|
@@ -5070,12 +5051,7 @@ export declare function getTrinketGfxFilename(trinketType: TrinketType): string;
|
|
|
5070
5051
|
* Helper function to get the name of a trinket. Returns "Unknown" if the provided trinket type is
|
|
5071
5052
|
* not valid.
|
|
5072
5053
|
*
|
|
5073
|
-
* For example
|
|
5074
|
-
*
|
|
5075
|
-
* ```ts
|
|
5076
|
-
* const trinketType = TrinketType.SWALLOWED_PENNY;
|
|
5077
|
-
* const trinketName = getTrinketName(trinketType); // trinketName is "Swallowed Penny"
|
|
5078
|
-
* ```
|
|
5054
|
+
* For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
|
|
5079
5055
|
*/
|
|
5080
5056
|
export declare function getTrinketName(trinketType: TrinketType): string;
|
|
5081
5057
|
|
|
@@ -5130,7 +5106,7 @@ export declare function getTSTLClassName(object: unknown): string | undefined;
|
|
|
5130
5106
|
export declare function getUnusedDoorSlots(): DoorSlot[];
|
|
5131
5107
|
|
|
5132
5108
|
/** Helper function to get an array with every valid vanilla card sub-type. */
|
|
5133
|
-
export declare function
|
|
5109
|
+
export declare function getVanillaCardTypes(): CardType[];
|
|
5134
5110
|
|
|
5135
5111
|
/**
|
|
5136
5112
|
* Returns an array containing every valid vanilla collectible type in the game.
|
|
@@ -5604,13 +5580,13 @@ export declare function isBoolean(variable: unknown): variable is boolean;
|
|
|
5604
5580
|
* - CardType.SPECIAL
|
|
5605
5581
|
* - CardType.TAROT_REVERSE
|
|
5606
5582
|
*/
|
|
5607
|
-
export declare function isCard(
|
|
5583
|
+
export declare function isCard(cardType: CardType): boolean;
|
|
5608
5584
|
|
|
5609
5585
|
/** For `PickupVariant.TAROT_CARD` (300) */
|
|
5610
5586
|
export declare function isCardPickup(pickup: EntityPickup): pickup is EntityPickupCard;
|
|
5611
5587
|
|
|
5612
|
-
/** Returns whether or not the given card matches the specified card type. */
|
|
5613
|
-
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;
|
|
5614
5590
|
|
|
5615
5591
|
/**
|
|
5616
5592
|
* Helper function to check if a player is a specific character (i.e. `PlayerType`).
|
|
@@ -5941,7 +5917,7 @@ export declare function isLRoom(roomShape: RoomShape): boolean;
|
|
|
5941
5917
|
export declare function isLuaDebugEnabled(): boolean;
|
|
5942
5918
|
|
|
5943
5919
|
/** Returns true for any card or rune added by a mod. */
|
|
5944
|
-
export declare function
|
|
5920
|
+
export declare function isModdedCardType(cardType: CardType): boolean;
|
|
5945
5921
|
|
|
5946
5922
|
export declare function isModdedCharacter(character: PlayerType): boolean;
|
|
5947
5923
|
|
|
@@ -6008,8 +5984,8 @@ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
|
|
|
6008
5984
|
*/
|
|
6009
5985
|
export declare function isPlayerUsingPony(player: EntityPlayer): boolean;
|
|
6010
5986
|
|
|
6011
|
-
/** Returns true for cards that have `
|
|
6012
|
-
export declare function isPocketItemObject(
|
|
5987
|
+
/** Returns true for cards that have `ItemConfigCardType.SPECIAL_OBJECT`. */
|
|
5988
|
+
export declare function isPocketItemObject(cardType: CardType): boolean;
|
|
6013
5989
|
|
|
6014
5990
|
/** Helper function to detect if a variable is of type `GridEntityPoop`. */
|
|
6015
5991
|
export declare function isPoop(variable: unknown): variable is GridEntityPoop;
|
|
@@ -6066,8 +6042,8 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
|
|
|
6066
6042
|
|
|
6067
6043
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
6068
6044
|
|
|
6069
|
-
/** Returns true for cards that have `
|
|
6070
|
-
export declare function isReverseTarotCard(
|
|
6045
|
+
/** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
6046
|
+
export declare function isReverseTarotCard(cardType: CardType): boolean;
|
|
6071
6047
|
|
|
6072
6048
|
/** Helper function to check if something is an instantiated `RNG` object. */
|
|
6073
6049
|
export declare function isRNG(object: unknown): object is RNG;
|
|
@@ -6093,7 +6069,7 @@ export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
|
|
|
6093
6069
|
export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
|
|
6094
6070
|
|
|
6095
6071
|
/** Returns true for cards that have `CardType.RUNE`. */
|
|
6096
|
-
export declare function isRune(
|
|
6072
|
+
export declare function isRune(cardType: CardType): boolean;
|
|
6097
6073
|
|
|
6098
6074
|
/** For `PickupVariant.SACK` (69) */
|
|
6099
6075
|
export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
|
|
@@ -6170,7 +6146,7 @@ export declare function isSingleUseCollectible(collectibleType: CollectibleType)
|
|
|
6170
6146
|
export declare function isSlot(entity: Entity): entity is EntitySlot;
|
|
6171
6147
|
|
|
6172
6148
|
/** Returns true for cards that have `CardType.SPECIAL`. */
|
|
6173
|
-
export declare function isSpecialCard(
|
|
6149
|
+
export declare function isSpecialCard(cardType: CardType): boolean;
|
|
6174
6150
|
|
|
6175
6151
|
/** Helper function to detect if a variable is of type `GridEntitySpikes`. */
|
|
6176
6152
|
export declare function isSpikes(variable: unknown): variable is GridEntitySpikes;
|
|
@@ -6185,7 +6161,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
|
|
|
6185
6161
|
export declare function isString(variable: unknown): variable is string;
|
|
6186
6162
|
|
|
6187
6163
|
/** Returns true for cards that have `CardType.SUIT`. */
|
|
6188
|
-
export declare function isSuitCard(
|
|
6164
|
+
export declare function isSuitCard(cardType: CardType): boolean;
|
|
6189
6165
|
|
|
6190
6166
|
export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
|
|
6191
6167
|
|
|
@@ -6196,7 +6172,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
|
|
|
6196
6172
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
6197
6173
|
|
|
6198
6174
|
/** Returns true for cards that have `CardType.TAROT`. */
|
|
6199
|
-
export declare function isTarotCard(
|
|
6175
|
+
export declare function isTarotCard(cardType: CardType): boolean;
|
|
6200
6176
|
|
|
6201
6177
|
/** Helper function to detect if a variable is of type `EntityTear`. */
|
|
6202
6178
|
export declare function isTear(variable: unknown): variable is EntityTear;
|
|
@@ -6240,7 +6216,7 @@ export declare function isValidCollectibleType(collectibleType: CollectibleType)
|
|
|
6240
6216
|
export declare function isValidGridPosition(gridPosition: Vector, roomShape: RoomShape): boolean;
|
|
6241
6217
|
|
|
6242
6218
|
/** Returns true for any vanilla card or rune. */
|
|
6243
|
-
export declare function
|
|
6219
|
+
export declare function isVanillaCardType(cardType: CardType): boolean;
|
|
6244
6220
|
|
|
6245
6221
|
export declare function isVanillaCharacter(character: PlayerType): boolean;
|
|
6246
6222
|
|
|
@@ -6440,7 +6416,7 @@ export declare const LAST_ROOM_TYPE: RoomType;
|
|
|
6440
6416
|
export declare const LAST_STAGE: LevelStage;
|
|
6441
6417
|
|
|
6442
6418
|
/** Calculated from the `Card` enum. */
|
|
6443
|
-
export declare const
|
|
6419
|
+
export declare const LAST_VANILLA_CARD_TYPE: CardType;
|
|
6444
6420
|
|
|
6445
6421
|
/** Calculated from the `PlayerType` enum. */
|
|
6446
6422
|
export declare const LAST_VANILLA_CHARACTER: PlayerType;
|
|
@@ -8231,7 +8207,7 @@ export declare const NUM_NORMAL_PILL_COLORS: number;
|
|
|
8231
8207
|
export declare const NUM_PILLS_IN_POOL: number;
|
|
8232
8208
|
|
|
8233
8209
|
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
8234
|
-
export declare const
|
|
8210
|
+
export declare const NUM_VANILLA_CARD_TYPES: number;
|
|
8235
8211
|
|
|
8236
8212
|
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
8237
8213
|
export declare const NUM_VANILLA_COLLECTIBLE_TYPES: number;
|
|
@@ -9082,12 +9058,12 @@ export declare function removeAllBombs(bombVariant?: BombVariant, subType?: numb
|
|
|
9082
9058
|
/**
|
|
9083
9059
|
* Helper function to remove all of the cards in the room.
|
|
9084
9060
|
*
|
|
9085
|
-
* @param
|
|
9086
|
-
*
|
|
9061
|
+
* @param cardType Optional. If specified, will only remove cards that match this sub-type. Default
|
|
9062
|
+
* is -1, which matches every sub-type.
|
|
9087
9063
|
* @param cap Optional. If specified, will only remove the given amount of cards.
|
|
9088
9064
|
* @returns The cards that were removed.
|
|
9089
9065
|
*/
|
|
9090
|
-
export declare function removeAllCards(
|
|
9066
|
+
export declare function removeAllCards(cardType?: CardType, cap?: int): EntityPickupCard[];
|
|
9091
9067
|
|
|
9092
9068
|
export declare function removeAllCharacters(string: string, character: string): string;
|
|
9093
9069
|
|
|
@@ -10764,13 +10740,13 @@ export declare function spawnBossWithSeed(entityType: EntityType, variant: int,
|
|
|
10764
10740
|
/**
|
|
10765
10741
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
10766
10742
|
*/
|
|
10767
|
-
export declare function spawnCard(
|
|
10743
|
+
export declare function spawnCard(cardType: CardType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
10768
10744
|
|
|
10769
10745
|
/**
|
|
10770
10746
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
|
|
10771
10747
|
* and a specific seed.
|
|
10772
10748
|
*/
|
|
10773
|
-
export declare function spawnCardWithSeed(
|
|
10749
|
+
export declare function spawnCardWithSeed(cardType: CardType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
|
|
10774
10750
|
|
|
10775
10751
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
10776
10752
|
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"}
|