From c672871ee6f56e73f4b2d2e2133ea540fcca99c8 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 28 Sep 2025 01:51:35 +0200 Subject: [PATCH] (Repentogon) Improved EID:GlyphOfBalancePrediction() by using Repentogon features --- features/eid_itemprediction.lua | 1 - features/eid_repentogon.lua | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/features/eid_itemprediction.lua b/features/eid_itemprediction.lua index 14929e6e..181885cb 100644 --- a/features/eid_itemprediction.lua +++ b/features/eid_itemprediction.lua @@ -408,7 +408,6 @@ function EID:GlyphOfBalancePrediction(player) fullID = "5.10.3" end - --todo: in REPENTOGON, replace this whole function (in the eid_repentogon lua style) local pickupNames = EID:getDescriptionEntry("PickupNames") or {} return pickupNames[fullID] or EID:GetEntityXMLNameByString(fullID) or fullID end diff --git a/features/eid_repentogon.lua b/features/eid_repentogon.lua index 225ad694..25501139 100644 --- a/features/eid_repentogon.lua +++ b/features/eid_repentogon.lua @@ -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 +