diff --git a/src/Assets/vaalitemicon.png b/src/Assets/vaalitemicon.png new file mode 100644 index 000000000..730c1cf11 Binary files /dev/null and b/src/Assets/vaalitemicon.png differ diff --git a/src/Classes/ImportTab.lua b/src/Classes/ImportTab.lua index ce99de9cc..37a9553b4 100644 --- a/src/Classes/ImportTab.lua +++ b/src/Classes/ImportTab.lua @@ -1038,6 +1038,7 @@ function ImportTabClass:ImportItem(itemData, slotName) item.corrupted = itemData.corrupted item.fractured = itemData.fractured item.desecrated = itemData.desecrated + item.mutated = itemData.mutated if itemData.sockets and itemData.sockets[1] then item.sockets = { } item.itemSocketCount = 0 @@ -1117,6 +1118,14 @@ function ImportTabClass:ImportItem(itemData, slotName) end end end + if itemData.mutatedMods then + for _, line in ipairs(itemData.mutatedMods) do + for line in line:gmatch("[^\n]+") do + local modList, extra = modLib.parseMod(line) + t_insert(item.explicitModLines, { line = line, extra = extra, mods = modList or { }, mutated = true }) + end + end + end if itemData.grantedSkills then for _, grantedSkillInfo in ipairs(itemData.grantedSkills) do diff --git a/src/Classes/Item.lua b/src/Classes/Item.lua index 0ef3687e9..b30967c2c 100644 --- a/src/Classes/Item.lua +++ b/src/Classes/Item.lua @@ -59,7 +59,7 @@ local ItemClass = newClass("Item", function(self, raw, rarity, highQuality) end) local lineFlags = { - ["custom"] = true, ["fractured"] = true, ["desecrated"] = true, ["enchant"] = true, ["implicit"] = true, ["rune"] = true, + ["custom"] = true, ["fractured"] = true, ["desecrated"] = true, ["mutated"] = true, ["enchant"] = true, ["implicit"] = true, ["rune"] = true, } -- Special function to store unique instances of modifier on specific item slots @@ -643,6 +643,9 @@ function ItemClass:ParseRaw(raw, rarity, highQuality) if modLine.desecrated then self.desecrated = true end + if modLine.mutated then + self.mutated = true + end if modLine.fractured then self.fractured = true end @@ -1198,6 +1201,9 @@ function ItemClass:BuildRaw() if modLine.desecrated then line = "{desecrated}" .. line end + if modLine.mutated then + line = "{mutated}" .. line + end if modLine.variantList then local varSpec for varId in pairs(modLine.variantList) do diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index be50804c2..7005f3ae4 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -2678,7 +2678,13 @@ function ItemsTabClass:SetTooltipHeaderInfluence(tooltip, item) tooltip.influenceHeader2 = "Desecrated" end end - + if item.mutated then + if not tooltip.influenceHeader1 then + tooltip.influenceHeader1 = "Mutated" + else + tooltip.influenceHeader2 = "Mutated" + end + end -- If only one influence, we copy to second header. Preparing for dual influence mods like in first game. if tooltip.influenceHeader1 and not tooltip.influenceHeader2 then tooltip.influenceHeader2 = tooltip.influenceHeader1 diff --git a/src/Classes/Tooltip.lua b/src/Classes/Tooltip.lua index e8206f899..171f9a60b 100644 --- a/src/Classes/Tooltip.lua +++ b/src/Classes/Tooltip.lua @@ -291,11 +291,12 @@ function TooltipClass:Draw(x, y, w, h, viewPort) local headerInfluence = { Fractured = "Assets/fractureditemsymbol.png", Desecrated = "Assets/veileditemsymbol.png", + Mutated = "Assets/vaalitemicon.png", } local headerConfigs = { - RELIC = {left="Assets/itemsheaderfoilleft.png", middle="Assets/itemsheaderfoilmiddle.png", right="Assets/itemsheaderfoilright.png", height=58, sideWidth=43, middleWidth=43, textYOffset=2, allowInfluenceIcon=true}, - UNIQUE = {left="Assets/itemsheaderuniqueleft.png", middle="Assets/itemsheaderuniquemiddle.png", right="Assets/itemsheaderuniqueright.png", height=58, sideWidth=43, middleWidth=43, textYOffset=2, allowInfluenceIcon=true}, - RARE = {left="Assets/itemsheaderrareleft.png", middle="Assets/itemsheaderraremiddle.png", right="Assets/itemsheaderrareright.png", height=58, sideWidth=43, middleWidth=43, textYOffset=2, allowInfluenceIcon=true}, + RELIC = {left="Assets/itemsheaderfoilleft.png", middle="Assets/itemsheaderfoilmiddle.png", right="Assets/itemsheaderfoilright.png", height=58, sideWidth=47, middleWidth=47, textYOffset=2, allowInfluenceIcon=true}, + UNIQUE = {left="Assets/itemsheaderuniqueleft.png", middle="Assets/itemsheaderuniquemiddle.png", right="Assets/itemsheaderuniqueright.png", height=58, sideWidth=47, middleWidth=47, textYOffset=2, allowInfluenceIcon=true}, + RARE = {left="Assets/itemsheaderrareleft.png", middle="Assets/itemsheaderraremiddle.png", right="Assets/itemsheaderrareright.png", height=58, sideWidth=47, middleWidth=47, textYOffset=2, allowInfluenceIcon=true}, MAGIC = {left="Assets/itemsheadermagicleft.png", middle="Assets/itemsheadermagicmiddle.png", right="Assets/itemsheadermagicright.png", height=38, sideWidth=32, middleWidth=32, textYOffset=4, allowInfluenceIcon=true}, NORMAL = {left="Assets/itemsheaderwhiteleft.png", middle="Assets/itemsheaderwhitemiddle.png", right="Assets/itemsheaderwhiteright.png", height=38, sideWidth=32, middleWidth=32, textYOffset=4, allowInfluenceIcon=true}, GEM = {left="Assets/itemsheadergemleft.png", middle="Assets/itemsheadergemmiddle.png", right="Assets/itemsheadergemright.png", height=38, sideWidth=32, middleWidth=32, textYOffset=4}, @@ -395,7 +396,7 @@ function TooltipClass:Draw(x, y, w, h, viewPort) -- Draw left cap first, then influence icon on top DrawImage(self.headerLeft, headerX, headerY, headerSideWidth, headerHeight) if self.influenceHeader1 and config.allowInfluenceIcon then - DrawImage(self.influenceIcon1, headerX+5, headerY+(headerHeight/4), headerSideWidth/2+6, headerHeight/2) + DrawImage(self.influenceIcon1, headerX + 2, headerY + (headerHeight - (headerHeight/2))/2, headerHeight/2, headerHeight/2) end -- Draw middle fill @@ -415,7 +416,7 @@ function TooltipClass:Draw(x, y, w, h, viewPort) -- Draw right cap DrawImage(self.headerRight, headerX + headerTotalWidth - headerSideWidth, headerY, headerSideWidth, headerHeight) if self.influenceHeader2 and config.allowInfluenceIcon then - DrawImage(self.influenceIcon2, headerX + headerTotalWidth - headerSideWidth+10, headerY+(headerHeight/4), headerSideWidth/2+6, headerHeight/2) + DrawImage(self.influenceIcon2, headerX + headerTotalWidth - (headerHeight/2) - 2, headerY + (headerHeight - (headerHeight/2))/2, headerHeight/2, headerHeight/2) end end end diff --git a/src/Data/Global.lua b/src/Data/Global.lua index 02d857725..49a44689c 100644 --- a/src/Data/Global.lua +++ b/src/Data/Global.lua @@ -48,6 +48,7 @@ colorCodes = { SHAPER = "^x55BBFF", ELDER = "^xAA77CC", FRACTURED = "^xA29160", + MUTATED = "^xAE2E3B", ADJUDICATOR = "^xE9F831", BASILISK = "^x00CB3A", CRUSADER = "^x2946FC", diff --git a/src/Modules/ItemTools.lua b/src/Modules/ItemTools.lua index 755064365..cc5fd4874 100644 --- a/src/Modules/ItemTools.lua +++ b/src/Modules/ItemTools.lua @@ -331,7 +331,7 @@ function itemLib.formatModLine(modLine, dbMode) line = line .. " ^1'" .. modLine.extra .. "'" end else - colorCode = (modLine.enchant and colorCodes.ENCHANTED) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.custom and colorCodes.CUSTOM) or colorCodes.MAGIC + colorCode = (modLine.enchant and colorCodes.ENCHANTED) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.custom and colorCodes.CUSTOM) or colorCodes.MAGIC end return colorCode..line end