Dead Tainted Lazarus exceptions
This commit is contained in:
1 parent
44a6864b89
commit
98a7a0b8f0
1 file changed
+20
-8
+20
-8
@@ -1531,12 +1531,19 @@ function EID:evaluateTransformationProgress(transformation)
|
||||
if transformData and transformData.VanillaForm and player:HasPlayerForm(transformData.VanillaForm) then
|
||||
EID.TransformationProgress[i][transformation] = transformData.NumNeeded or 3
|
||||
else
|
||||
-- Dead Tainted Lazarus exceptions
|
||||
local activesTable = EID.PlayerItemInteractions[i].actives
|
||||
local pillsTable = EID.PlayerItemInteractions[i].pills
|
||||
if player:GetPlayerType() == 38 then
|
||||
activesTable = EID.PlayerItemInteractions[i].altActives or activesTable
|
||||
pillsTable = EID.PlayerItemInteractions[i].altPills or pillsTable
|
||||
end
|
||||
for entityString, _ in pairs(EID.TransformationLookup[transformation]) do
|
||||
local eType, eVariant, eSubType = entityString:match("([^.]+).([^.]+).([^.]+)")
|
||||
if tonumber(eType) == EntityType.ENTITY_PICKUP then
|
||||
if tonumber(eVariant) == PickupVariant.PICKUP_COLLECTIBLE then
|
||||
if EID.PlayerItemInteractions[i].actives[tostring(eSubType)] then
|
||||
EID.TransformationProgress[i][transformation] = EID.TransformationProgress[i][transformation] + EID.PlayerItemInteractions[i].actives[tostring(eSubType)]
|
||||
if activesTable[tostring(eSubType)] then
|
||||
EID.TransformationProgress[i][transformation] = EID.TransformationProgress[i][transformation] + activesTable[tostring(eSubType)]
|
||||
else
|
||||
EID.TransformationProgress[i][transformation] = EID.TransformationProgress[i][transformation] + player:GetCollectibleNum(eSubType, true)
|
||||
-- Undo the Book of Virtues active item getting counted here
|
||||
@@ -1547,8 +1554,8 @@ function EID:evaluateTransformationProgress(transformation)
|
||||
elseif tonumber(eVariant) == PickupVariant.PICKUP_TRINKET and player:HasTrinket(eSubType) then
|
||||
EID.TransformationProgress[i][transformation] = EID.TransformationProgress[i][transformation] + player:GetTrinketMultiplier(eSubType)
|
||||
elseif tonumber(eVariant) == PickupVariant.PICKUP_PILL then
|
||||
if EID.PlayerItemInteractions[i].pills[tostring(eSubType)] then
|
||||
EID.TransformationProgress[i][transformation] = EID.TransformationProgress[i][transformation] + EID.PlayerItemInteractions[i].pills[tostring(eSubType)]
|
||||
if pillsTable[tostring(eSubType)] then
|
||||
EID.TransformationProgress[i][transformation] = EID.TransformationProgress[i][transformation] + pillsTable[tostring(eSubType)]
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1564,7 +1571,7 @@ function EID:evaluateQueuedItems()
|
||||
local player = Isaac.GetPlayer(i)
|
||||
if player.QueuedItem then
|
||||
if not EID.PlayerItemInteractions[i] then
|
||||
EID.PlayerItemInteractions[i] = {LastTouch = 0, actives = {}, pills = {}}
|
||||
EID.PlayerItemInteractions[i] = {LastTouch = 0, actives = {}, pills = {}, altActives = {}, altPills = {}}
|
||||
end
|
||||
if EID.PlayerItemInteractions[i].LastTouch + 45 >= game:GetFrameCount() and player.QueuedItem.Item then
|
||||
return
|
||||
@@ -1573,12 +1580,17 @@ function EID:evaluateQueuedItems()
|
||||
end
|
||||
|
||||
if not player.QueuedItem.Touched and player.QueuedItem.Item and player.QueuedItem.Item.Type == ItemType.ITEM_ACTIVE then
|
||||
-- Dead Tainted Lazarus exceptions
|
||||
local activesTable = EID.PlayerItemInteractions[i].actives
|
||||
if player:GetPlayerType() == 38 then
|
||||
activesTable = EID.PlayerItemInteractions[i].altActives or activesTable
|
||||
end
|
||||
EID.ForceRefreshCache = true
|
||||
local itemID = tostring(player.QueuedItem.Item.ID)
|
||||
if not EID.PlayerItemInteractions[i].actives[itemID] then
|
||||
EID.PlayerItemInteractions[i].actives[itemID] = 0
|
||||
if not activesTable[itemID] then
|
||||
activesTable[itemID] = 0
|
||||
end
|
||||
EID.PlayerItemInteractions[i].actives[itemID] = EID.PlayerItemInteractions[i].actives[itemID] + 1
|
||||
activesTable[itemID] = activesTable[itemID] + 1
|
||||
EID.PlayerItemInteractions[i].LastTouch = game:GetFrameCount()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user