isaacscript-common 1.0.556 → 1.0.557
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.
|
@@ -32,12 +32,20 @@ function entityTakeDmgPlayer(self, tookDamage, _damageAmount, _damageFlags, _dam
|
|
|
32
32
|
end
|
|
33
33
|
local trinketMap = getTrinketMap(nil, player)
|
|
34
34
|
for ____, trinketType in ipairs(TRINKETS_THAT_CAN_BREAK) do
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
do
|
|
36
|
+
local numTrinketsHeld = player:GetTrinketMultiplier(trinketType)
|
|
37
|
+
local oldNumTrinketsHeld = trinketMap:get(trinketType)
|
|
38
|
+
if (oldNumTrinketsHeld == nil) or (numTrinketsHeld >= oldNumTrinketsHeld) then
|
|
39
|
+
goto __continue10
|
|
40
|
+
end
|
|
41
|
+
trinketMap:set(trinketType, numTrinketsHeld)
|
|
42
|
+
local numTrinketsOnGround = Isaac.CountEntities(nil, EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_TRINKET, trinketType)
|
|
43
|
+
if numTrinketsOnGround > 0 then
|
|
44
|
+
goto __continue10
|
|
45
|
+
end
|
|
39
46
|
postTrinketBreakFire(nil, player, trinketType)
|
|
40
47
|
end
|
|
48
|
+
::__continue10::
|
|
41
49
|
end
|
|
42
50
|
end
|
|
43
51
|
function getTrinketMap(self, player)
|