(Repentogon) Improved EID:GlyphOfBalancePrediction() by using Repentogon features

This commit is contained in:
Wofsauge committed 2025-09-28 01:51:35 +02:00
1 parent 1f5e62b1de
commit c672871ee6
2 files changed
+17 -1

No files matched your search

+17
View File
@@ -229,3 +229,20 @@ local function RepentogonModifierConditions(descObj)
return false
end
EID:addDescriptionModifier("EID Repentogon", RepentogonModifierConditions, nil)
--------------------- Predictions ---------------------
-- Glyph of Balance --
-- Override existing function with one that uses Repentogon features
function EID:GlyphOfBalancePrediction(player)
local dropIDTable = player:GetGlyphOfBalanceDrop(Variant, SubType)
-- build item string based on return value. Only add SubType, if its not equal 0
local fullID = "5.0"
if dropIDTable[1] ~= -1 then
fullID = "5." .. dropIDTable[1] .. (dropIDTable[2] ~= 0 and ("." .. dropIDTable[2]) or "")
end
local pickupNames = EID:getDescriptionEntry("PickupNames") or {}
return pickupNames[fullID] or EID:GetEntityXMLNameByString(fullID) or fullID
end