fixed Itempredictions: Liberty Cap, Broken Syringe and Moms Lock
This commit is contained in:
1 parent
5e7b3d92c1
commit
dc3d7c944a
2 files changed
+5
-5
No files matched your search
@@ -345,7 +345,7 @@ EID.ItemReminderDescriptionModifier = {
|
|||||||
},
|
},
|
||||||
["5.350.32"] = { -- Liberty Cap
|
["5.350.32"] = { -- Liberty Cap
|
||||||
isHiddenInfo = true,
|
isHiddenInfo = true,
|
||||||
modifierFunction = function(descObj, _)
|
modifierFunction = function(descObj, player)
|
||||||
local result = EID:LibertyCapPrediction(player)
|
local result = EID:LibertyCapPrediction(player)
|
||||||
if result then
|
if result then
|
||||||
descObj = EID:ItemReminderReplaceWithResult(descObj, result)
|
descObj = EID:ItemReminderReplaceWithResult(descObj, result)
|
||||||
@@ -365,7 +365,7 @@ EID.ItemReminderDescriptionModifier = {
|
|||||||
},
|
},
|
||||||
["5.350.75"] = { -- 404 Error
|
["5.350.75"] = { -- 404 Error
|
||||||
isHiddenInfo = true,
|
isHiddenInfo = true,
|
||||||
modifierFunction = function(descObj, player)
|
modifierFunction = function(descObj, _)
|
||||||
local seed = game:GetLevel():GetCurrentRoom():GetSpawnSeed()
|
local seed = game:GetLevel():GetCurrentRoom():GetSpawnSeed()
|
||||||
local result = EID:RNGNext(seed, 2, 7, 25) % (EID.isRepentance and 189 or 128) + 1
|
local result = EID:RNGNext(seed, 2, 7, 25) % (EID.isRepentance and 189 or 128) + 1
|
||||||
descObj = EID:ItemReminderReplaceWithResult(descObj, result, 350)
|
descObj = EID:ItemReminderReplaceWithResult(descObj, result, 350)
|
||||||
@@ -374,7 +374,7 @@ EID.ItemReminderDescriptionModifier = {
|
|||||||
},
|
},
|
||||||
["5.350.132"] = { -- Broken Syringe
|
["5.350.132"] = { -- Broken Syringe
|
||||||
isHiddenInfo = true,
|
isHiddenInfo = true,
|
||||||
modifierFunction = function(descObj, _)
|
modifierFunction = function(descObj, player)
|
||||||
local result = EID:BrokenSyringePrediction(player)
|
local result = EID:BrokenSyringePrediction(player)
|
||||||
if result then
|
if result then
|
||||||
descObj = EID:ItemReminderReplaceWithResult(descObj, result)
|
descObj = EID:ItemReminderReplaceWithResult(descObj, result)
|
||||||
@@ -384,7 +384,7 @@ EID.ItemReminderDescriptionModifier = {
|
|||||||
},
|
},
|
||||||
["5.350.153"] = { -- Mom's Lock
|
["5.350.153"] = { -- Mom's Lock
|
||||||
isHiddenInfo = true,
|
isHiddenInfo = true,
|
||||||
modifierFunction = function(descObj, _)
|
modifierFunction = function(descObj, player)
|
||||||
local result = EID:MomsLockPrediction(player)
|
local result = EID:MomsLockPrediction(player)
|
||||||
if result then
|
if result then
|
||||||
descObj = EID:ItemReminderReplaceWithResult(descObj, result)
|
descObj = EID:ItemReminderReplaceWithResult(descObj, result)
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ local syringeItems = {[0] = 13, 14, 240, 70, 143, 345, 493, 496}
|
|||||||
local momItems = {[0] = 29, 30, 31, 55, 110, 114, 199, 200, 217, 228, 355, 508, 732}
|
local momItems = {[0] = 29, 30, 31, 55, 110, 114, 199, 200, 217, 228, 355, 508, 732}
|
||||||
|
|
||||||
function EID:TemporaryEffectPrediction(player, rng, itemTable)
|
function EID:TemporaryEffectPrediction(player, rng, itemTable)
|
||||||
local tempItem = itemTable[rng % #itemTable]
|
local tempItem = itemTable[rng % (1 + #itemTable)] -- # operator doesnt account for values assigned to keys (e.g. "[0]=" entries)
|
||||||
if player:GetEffects():HasCollectibleEffect(tempItem) then return tempItem else return false end
|
if player:GetEffects():HasCollectibleEffect(tempItem) then return tempItem else return false end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user