isaacscript-common 1.2.263 → 1.2.266
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.
|
@@ -217,6 +217,13 @@ export declare function isTainted(player: EntityPlayer): boolean;
|
|
|
217
217
|
/** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
|
|
218
218
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
219
219
|
export declare function isVanillaCharacter(player: EntityPlayer): boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Helper function to add one or more collectibles to a player.
|
|
222
|
+
*
|
|
223
|
+
* This function is variadic, meaning that you can supply as many collectible types as you want to
|
|
224
|
+
* add.
|
|
225
|
+
*/
|
|
226
|
+
export declare function playerAddCollectible(player: EntityPlayer, ...collectibleTypes: Array<CollectibleType | int>): void;
|
|
220
227
|
/**
|
|
221
228
|
* Helper function to check to see if a player has one or more collectibles.
|
|
222
229
|
*
|
|
@@ -444,6 +444,12 @@ function ____exports.isTaintedLazarus(self, player)
|
|
|
444
444
|
local character = player:GetPlayerType()
|
|
445
445
|
return character == PlayerType.PLAYER_LAZARUS_B or character == PlayerType.PLAYER_LAZARUS2_B
|
|
446
446
|
end
|
|
447
|
+
function ____exports.playerAddCollectible(self, player, ...)
|
|
448
|
+
local collectibleTypes = {...}
|
|
449
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
450
|
+
player:AddCollectible(collectibleType)
|
|
451
|
+
end
|
|
452
|
+
end
|
|
447
453
|
function ____exports.playerHasCollectible(self, player, ...)
|
|
448
454
|
local collectibleTypes = {...}
|
|
449
455
|
return __TS__ArraySome(
|
|
@@ -489,9 +495,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
489
495
|
itemPool:RemoveCollectible(collectibleType)
|
|
490
496
|
end
|
|
491
497
|
repeat
|
|
492
|
-
local
|
|
493
|
-
local
|
|
494
|
-
if
|
|
498
|
+
local ____switch106 = activeSlot
|
|
499
|
+
local ____cond106 = ____switch106 == ActiveSlot.SLOT_PRIMARY
|
|
500
|
+
if ____cond106 then
|
|
495
501
|
do
|
|
496
502
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
497
503
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -500,8 +506,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
500
506
|
break
|
|
501
507
|
end
|
|
502
508
|
end
|
|
503
|
-
|
|
504
|
-
if
|
|
509
|
+
____cond106 = ____cond106 or ____switch106 == ActiveSlot.SLOT_SECONDARY
|
|
510
|
+
if ____cond106 then
|
|
505
511
|
do
|
|
506
512
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
507
513
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -516,16 +522,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
516
522
|
break
|
|
517
523
|
end
|
|
518
524
|
end
|
|
519
|
-
|
|
520
|
-
if
|
|
525
|
+
____cond106 = ____cond106 or ____switch106 == ActiveSlot.SLOT_POCKET
|
|
526
|
+
if ____cond106 then
|
|
521
527
|
do
|
|
522
528
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
523
529
|
player:SetActiveCharge(charge, activeSlot)
|
|
524
530
|
break
|
|
525
531
|
end
|
|
526
532
|
end
|
|
527
|
-
|
|
528
|
-
if
|
|
533
|
+
____cond106 = ____cond106 or ____switch106 == ActiveSlot.SLOT_POCKET2
|
|
534
|
+
if ____cond106 then
|
|
529
535
|
do
|
|
530
536
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
531
537
|
break
|
package/dist/maps/cardMap.lua
CHANGED
|
@@ -5,21 +5,27 @@ local ____exports = {}
|
|
|
5
5
|
____exports.CARD_MAP = __TS__New(Map, {
|
|
6
6
|
{"fool", 1},
|
|
7
7
|
{"magician", 2},
|
|
8
|
+
{"mag", 2},
|
|
8
9
|
{"highpriestess", 3},
|
|
9
10
|
{"priestess", 3},
|
|
11
|
+
{"priest", 3},
|
|
10
12
|
{"hp", 3},
|
|
11
13
|
{"empress", 4},
|
|
12
14
|
{"emperor", 5},
|
|
15
|
+
{"emp", 5},
|
|
13
16
|
{"hierophant", 6},
|
|
17
|
+
{"hi", 6},
|
|
14
18
|
{"lovers", 7},
|
|
15
19
|
{"chariot", 8},
|
|
16
20
|
{"justice", 9},
|
|
17
21
|
{"hermit", 10},
|
|
18
22
|
{"wheeloffortune", 11},
|
|
23
|
+
{"wheel", 11},
|
|
19
24
|
{"fortune", 11},
|
|
20
25
|
{"strength", 12},
|
|
21
|
-
{"
|
|
26
|
+
{"str", 12},
|
|
22
27
|
{"hangedman", 13},
|
|
28
|
+
{"hanged", 13},
|
|
23
29
|
{"death", 14},
|
|
24
30
|
{"temperance", 15},
|
|
25
31
|
{"devil", 16},
|
|
@@ -28,6 +34,7 @@ ____exports.CARD_MAP = __TS__New(Map, {
|
|
|
28
34
|
{"moon", 19},
|
|
29
35
|
{"sun", 20},
|
|
30
36
|
{"judgement", 21},
|
|
37
|
+
{"judge", 21},
|
|
31
38
|
{"world", 22},
|
|
32
39
|
{"2ofclubs", 23},
|
|
33
40
|
{"2clubs", 23},
|
|
@@ -94,6 +101,7 @@ ____exports.CARD_MAP = __TS__New(Map, {
|
|
|
94
101
|
{"mag?", 57},
|
|
95
102
|
{"highpriestess?", 58},
|
|
96
103
|
{"high?", 58},
|
|
104
|
+
{"hi?", 58},
|
|
97
105
|
{"priestess?", 58},
|
|
98
106
|
{"priest?", 58},
|
|
99
107
|
{"hp?", 58},
|