Improve Sanguine Bond spike detection (#860)
This commit is contained in:
1 parent
919f3a2315
commit
63dfd160d7
3 files changed
+9
-13
No files matched your search
@@ -41,9 +41,8 @@ EID.GridEntityWhitelist = {
|
||||
EID.Config["DisplaySacrificeInfo"]
|
||||
end,
|
||||
function(gridEntity)
|
||||
return EID.isRepentance and EID.Config["DisplaySanguineInfo"] and
|
||||
Game():GetRoom():GetType() == RoomType.ROOM_DEVIL and
|
||||
EID:PlayersHaveCollectible(CollectibleType.COLLECTIBLE_SANGUINE_BOND)
|
||||
return EID.isRepentance and gridEntity:GetVariant() >= 100 and
|
||||
EID.Config["DisplaySanguineInfo"]
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -113,13 +113,11 @@ end
|
||||
--order of checking: 15% Pennies, 48% Damage, 58% Hearts, 63% Item, 65% Leviathan, 100% Nothing
|
||||
local sanguineResults = { { 0.15, 3 }, { 0.48, 2 }, { 0.58, 4 }, { 0.63, 5 }, { 0.65, 6 }, { 1, 1 } }
|
||||
-- This function both trims the desc to just a list of chances, and highlights the next result if allowed, since those two actions are very intertwined
|
||||
function EID:trimSanguineDesc(descObj)
|
||||
local currentRoom = game:GetLevel():GetCurrentRoom()
|
||||
local spikes = currentRoom:GetGridEntity(67)
|
||||
function EID:trimSanguineDesc(spikes, descObj)
|
||||
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()
|
||||
local spikeSeed = spikes:GetRNG():GetSeed()
|
||||
spikeSeed = EID:RNGNext(spikeSeed, 5, 9, 7)
|
||||
spikeSeed = EID:RNGNext(spikeSeed, 0x01, 0x05, 0x13) -- magic disassembled numbers!
|
||||
local nextFloat = EID:SeedToFloat(spikeSeed)
|
||||
|
||||
Reference in new issue
Block a user