isaacscript-common 1.2.111 → 1.2.112
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.
|
@@ -208,6 +208,17 @@ export declare function getSoulHearts(player: EntityPlayer): int;
|
|
|
208
208
|
* return undefined.
|
|
209
209
|
*/
|
|
210
210
|
export declare function getSubPlayerParent(subPlayer: EntitySubPlayer): EntityPlayer | undefined;
|
|
211
|
+
/**
|
|
212
|
+
* Helper function to determine how many heart containers that Tainted Magdalene has that will not
|
|
213
|
+
* be automatically depleted over time. By default, this is 2, but this function will return 4 so
|
|
214
|
+
* that it is consistent with the `player.GetHearts` and `player.GetMaxHearts` methods.
|
|
215
|
+
*
|
|
216
|
+
* If Tainted Magdalene has Birthright, she will gained an additional non-temporary heart container.
|
|
217
|
+
*
|
|
218
|
+
* This function does not validate whether or not the provided player is Tainted Magdalene; that
|
|
219
|
+
* should be accomplished before invoking this function.
|
|
220
|
+
*/
|
|
221
|
+
export declare function getTaintedMagdaleneNonTemporaryMaxHearts(player: EntityPlayer): 4 | 6;
|
|
211
222
|
/**
|
|
212
223
|
* Helper function to return the active charge and the battery charge combined. This is useful
|
|
213
224
|
* because you are not able to set the battery charge directly.
|
|
@@ -503,6 +503,10 @@ function ____exports.getSoulHearts(self, player)
|
|
|
503
503
|
local blackHearts = ____exports.getBlackHearts(nil, player)
|
|
504
504
|
return soulHearts - blackHearts
|
|
505
505
|
end
|
|
506
|
+
function ____exports.getTaintedMagdaleneNonTemporaryMaxHearts(self, player)
|
|
507
|
+
local hasBirthright = player:HasCollectible(CollectibleType.COLLECTIBLE_BIRTHRIGHT)
|
|
508
|
+
return hasBirthright and 6 or 4
|
|
509
|
+
end
|
|
506
510
|
function ____exports.getTotalCharge(self, player, activeSlot)
|
|
507
511
|
local activeCharge = player:GetActiveCharge(activeSlot)
|
|
508
512
|
local batteryCharge = player:GetBatteryCharge(activeSlot)
|
|
@@ -597,9 +601,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
597
601
|
itemPool:RemoveCollectible(collectibleType)
|
|
598
602
|
end
|
|
599
603
|
repeat
|
|
600
|
-
local
|
|
601
|
-
local
|
|
602
|
-
if
|
|
604
|
+
local ____switch128 = activeSlot
|
|
605
|
+
local ____cond128 = ____switch128 == ActiveSlot.SLOT_PRIMARY
|
|
606
|
+
if ____cond128 then
|
|
603
607
|
do
|
|
604
608
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
605
609
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -608,8 +612,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
608
612
|
break
|
|
609
613
|
end
|
|
610
614
|
end
|
|
611
|
-
|
|
612
|
-
if
|
|
615
|
+
____cond128 = ____cond128 or ____switch128 == ActiveSlot.SLOT_SECONDARY
|
|
616
|
+
if ____cond128 then
|
|
613
617
|
do
|
|
614
618
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
615
619
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -624,16 +628,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
624
628
|
break
|
|
625
629
|
end
|
|
626
630
|
end
|
|
627
|
-
|
|
628
|
-
if
|
|
631
|
+
____cond128 = ____cond128 or ____switch128 == ActiveSlot.SLOT_POCKET
|
|
632
|
+
if ____cond128 then
|
|
629
633
|
do
|
|
630
634
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
631
635
|
player:SetActiveCharge(charge, activeSlot)
|
|
632
636
|
break
|
|
633
637
|
end
|
|
634
638
|
end
|
|
635
|
-
|
|
636
|
-
if
|
|
639
|
+
____cond128 = ____cond128 or ____switch128 == ActiveSlot.SLOT_POCKET2
|
|
640
|
+
if ____cond128 then
|
|
637
641
|
do
|
|
638
642
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
639
643
|
break
|
|
@@ -21,4 +21,4 @@ export declare function spawnCollectible(collectibleType: CollectibleType | int,
|
|
|
21
21
|
* Instead, this function arbitrarily spawns a collectible with
|
|
22
22
|
* `CollectibleType.COLLECTIBLE_SAD_ONION`, and then converts it to an empty pedestal afterward.
|
|
23
23
|
*/
|
|
24
|
-
export declare function spawnEmptyCollectible(position: Vector, seed?: number):
|
|
24
|
+
export declare function spawnEmptyCollectible(position: Vector, seed?: number): EntityPickup;
|