temporary sanguine copy

This commit is contained in:
Buurazu authored and GitHub committed 2022-06-14 05:27:20 -04:00
1 parent 7786467539
commit 23d7033974
1 file changed
+31
+31
View File
@@ -158,6 +158,37 @@ local function sanguinePrediction()
append("{{Collectible692}}", descObj.Name, resultsDesc)
end
function EID:trimSanguineDesc(descObj)
local currentRoom = game:GetLevel():GetCurrentRoom()
local spikes = currentRoom:GetGridEntity(67)
if not spikes then return "" end -- don't display anything if we can't find the spikes!
local cheatResult = nil
if spikes and EID.Config["PredictionSanguineBond"] then
local spikeSeed = currentRoom:GetGridEntity(67):GetRNG():GetSeed()
spikeSeed = RNGNext(spikeSeed, 5, 9, 7)
spikeSeed = RNGNext(spikeSeed, 0x01, 0x05, 0x13) -- magic disassembled numbers!
local nextFloat = SeedToFloat(spikeSeed)
for _,v in ipairs(sanguineResults) do
if nextFloat < v[1] then cheatResult = v[2] break end
end
end
local resultsDesc = ""
local lineCount = 0
-- separate sanguine's description by # or semicolons
for w in string.gmatch(descObj.Description, "([^#;]+)") do
-- we only care about groups that contain a percent sign
if string.find(w,"%%") then
lineCount = lineCount + 1
if cheatResult == lineCount then resultsDesc = resultsDesc .. "{{ColorBagComplete}}" end
resultsDesc = resultsDesc .. w .. "#"
end
end
return resultsDesc
end
function EID:getHoldMapDescription(player, checkingTwin)
-- Starting Blacklist: Recall, Hold
blacklist = { ["5.100.714"] = true, ["5.100.715"] = true, }