Skip to content

Commit b578eaf

Browse files
Merge branch 'dev' into sustainablePractices
2 parents 4d91963 + 897f007 commit b578eaf

272 files changed

Lines changed: 109927 additions & 54287 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

spec/System/TestAttacks_spec.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ describe("TestAttacks", function()
7272
runCallback("OnFrame")
7373
-- Add 2 skills with 1 red, 1 blue, 1 green support each
7474
-- Test against Quarterstaff Strike (skill slot 1)
75-
build.skillsTab:PasteSocketGroup("Quarterstaff Strike 1/0 1\nSplinter 1/0 1\nConduction 1/0 1\nBiting Frost 1/0 1")
75+
build.skillsTab:PasteSocketGroup("Quarterstaff Strike 1/0 1\nArmour Break I 1/0 1\nShock 1/0 1\nBiting Frost 1/0 1")
7676
runCallback("OnFrame")
77-
build.skillsTab:PasteSocketGroup("Falling Thunder 1/0 1\nIgnition 1/0 1\nDiscombobulate 1/0 1\nCoursing Current 1/0 1")
77+
build.skillsTab:PasteSocketGroup("Falling Thunder 1/0 1\nIgnite I 1/0 1\nDaze 1/0 1\nShock Conduction 1/0 1")
7878
runCallback("OnFrame")
7979

8080
build.configTab:BuildModList()

spec/System/TestItemParse_spec.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ describe("TestItemParse", function()
146146
assert.truthy(item.mirrored)
147147
item = new("Item", raw("Corrupted"))
148148
assert.truthy(item.corrupted)
149-
item = new("Item", raw("Fractured Item"))
149+
item = new("Item", raw("Leech 6.61% of Physical Attack Damage as Mana (fractured)"))
150150
assert.truthy(item.fractured)
151+
item = new("Item", raw("Adds 36 to 48 Fire Damage (desecrated)"))
152+
assert.truthy(item.desecrated)
151153
item = new("Item", raw("Crafted: true"))
152154
assert.truthy(item.crafted)
153155
item = new("Item", raw("Unreleased: true"))

src/Assets/fractureditemsymbol.png

2.39 KB
Loading

src/Assets/veileditemsymbol.png

5.16 KB
Loading

src/Classes/GemSelectControl.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,9 @@ function GemSelectClass:AddGemTooltip(gemInstance)
542542
if gemInstance.gemData.tagString ~= "" then
543543
self.tooltip:AddLine(16, "^x7F7F7F" .. gemInstance.gemData.tagString)
544544
end
545+
if gemInstance.gemData.gemFamily then
546+
self.tooltip:AddLine(16, "^x7F7F7FCategory: ^7" .. gemInstance.gemData.gemFamily)
547+
end
545548
-- Will need rework if a gem can have 2+ additional supports
546549
self:AddGrantedEffectInfo(gemInstance, grantedEffect, true)
547550
for _, statSet in ipairs(grantedEffect.statSets) do
@@ -566,7 +569,7 @@ end
566569
function GemSelectClass:AddGrantedEffectInfo(gemInstance, grantedEffect, addReq)
567570
local displayInstance = gemInstance.displayEffect or gemInstance
568571
local grantedEffectLevel = grantedEffect.levels[displayInstance.level] or { }
569-
if gemInstance.gemData.Tier then
572+
if gemInstance.gemData.Tier and not grantedEffect.isLineage then
570573
self.tooltip:AddLine(16, string.format("^x7F7F7FTier: ^7%d", gemInstance.gemData.Tier))
571574
end
572575
if addReq and not grantedEffect.support then

src/Classes/Item.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,7 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
381381
self.mirrored = true
382382
elseif line == "Corrupted" then
383383
self.corrupted = true
384-
elseif line == "Fractured Item" then
385-
self.fractured = true
386-
elseif line == "Desecrated Item" then
384+
elseif line == "Desecrated Prefix" or line == "Desecrated Suffix" then
387385
self.desecrated = true
388386
elseif line == "Requirements:" then
389387
-- nothing to do
@@ -620,6 +618,12 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
620618
if modLine.enchant then
621619
modLine.implicit = true
622620
end
621+
if modLine.desecrated then
622+
self.desecrated = true
623+
end
624+
if modLine.fractured then
625+
self.fractured = true
626+
end
623627
local baseName
624628
if not self.base and (self.rarity == "NORMAL" or self.rarity == "MAGIC") then
625629
-- Exact match (affix-less magic and normal items)

src/Classes/ItemsTab.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,27 @@ function ItemsTabClass:AddItemSetTooltip(tooltip, itemSet)
25852585
end
25862586
end
25872587

2588+
function ItemsTabClass:SetTooltipHeaderInfluence(tooltip, item)
2589+
tooltip.influenceHeader1 = nil
2590+
tooltip.influenceHeader2 = nil
2591+
-- Fractured items don't have the icon now, they did on trade before 0.3. Maybe they will return.
2592+
--if item.fractured then
2593+
-- tooltip.influenceHeader1 = "Fractured"
2594+
--end
2595+
if item.desecrated then
2596+
if not tooltip.influenceHeader1 then
2597+
tooltip.influenceHeader1 = "Desecrated"
2598+
else
2599+
tooltip.influenceHeader2 = "Desecrated"
2600+
end
2601+
end
2602+
2603+
-- If only one influence, we copy to second header. Preparing for dual influence mods like in first game.
2604+
if tooltip.influenceHeader1 and not tooltip.influenceHeader2 then
2605+
tooltip.influenceHeader2 = tooltip.influenceHeader1
2606+
end
2607+
end
2608+
25882609
function ItemsTabClass:FormatItemSource(text)
25892610
return text:gsub("unique{([^}]+)}",colorCodes.UNIQUE.."%1"..colorCodes.SOURCE)
25902611
:gsub("normal{([^}]+)}",colorCodes.NORMAL.."%1"..colorCodes.SOURCE)
@@ -2599,6 +2620,7 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
25992620
tooltip.tooltipHeader = item.rarity
26002621
tooltip.center = true
26012622
tooltip.color = rarityCode
2623+
self:SetTooltipHeaderInfluence(tooltip, item)
26022624
if item.title then
26032625
tooltip:AddLine(20, rarityCode..item.title)
26042626
tooltip:AddLine(20, rarityCode..item.baseName:gsub(" %(.+%)",""))

src/Classes/ModStore.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ function ModStoreClass:EvalMod(mod, cfg, globalLimits)
407407
else
408408
base = target:GetStat(tag.stat, cfg)
409409
end
410+
if tag.divVar then
411+
tag.div = self:GetMultiplier(tag.divVar, cfg)
412+
end
410413
local mult = m_floor(base / (tag.div or 1) + 0.0001)
411414
local limitTotal
412415
if tag.limit or tag.limitVar then

src/Classes/PassiveSpec.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,12 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
972972
-- ignore cluster jewel nodes that don't have an id in the tree
973973
if self.tree.nodes[id] then
974974
local nodeToReplace = self.tree.nodes[id]
975-
if self.tree.nodes[id].isSwitchable and self.tree.nodes[id].options[self.curClassName] then
976-
nodeToReplace = self.tree.nodes[id].options[self.curClassName]
975+
if self.tree.nodes[id].isSwitchable then
976+
if self.tree.nodes[id].options[self.curClassName] then
977+
nodeToReplace = self.tree.nodes[id].options[self.curClassName]
978+
elseif self.tree.nodes[id].options[self.curAscendClassName] then
979+
nodeToReplace = self.tree.nodes[id].options[self.curAscendClassName]
980+
end
977981
self.switchableNodes[nodeToReplace.id] = node
978982
end
979983
self:ReplaceNode(node, nodeToReplace)
@@ -1415,6 +1419,8 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
14151419
end
14161420

14171421
function PassiveSpecClass:ReplaceNode(old, newNode)
1422+
old.overlay = newNode.overlay
1423+
old.icon = newNode.icon
14181424
-- Edited nodes can share a name
14191425
if old.sd == newNode.sd then
14201426
return 1
@@ -1426,8 +1432,6 @@ function PassiveSpecClass:ReplaceNode(old, newNode)
14261432
old.modList = new("ModList")
14271433
old.modList:AddList(newNode.modList)
14281434
old.keystoneMod = newNode.keystoneMod
1429-
old.icon = newNode.icon
1430-
old.spriteId = newNode.spriteId
14311435
old.activeEffectImage = newNode.activeEffectImage
14321436
old.reminderText = newNode.reminderText or { }
14331437
end

src/Classes/PassiveTree.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
230230
node.type = "AscendClassStart"
231231
local ascendClass = self.ascendNameMap[node.ascendancyName].ascendClass
232232
ascendClass.startNodeId = node.id
233+
if node.isSwitchable then
234+
for ascName, _ in pairs(node.options) do
235+
local option = self.ascendNameMap[ascName].ascendClass
236+
option.startNodeId = node.id
237+
end
238+
end
233239
elseif node.isOnlyImage then
234240
node.type = "OnlyImage"
235241
elseif node.isJewelSocket then
@@ -550,6 +556,16 @@ function PassiveTreeClass:ProcessNode(node)
550556
switchNode.dn = switchNode.name
551557
switchNode.sd = switchNode.stats
552558

559+
if switchNode.jewelOverlay then
560+
ConPrintf("SwitchNode with jewelOverlay found: "..switchNode.name)
561+
switchNode.overlay = switchNode.jewelOverlay
562+
if switchNode.overlay then
563+
local size = node.targetSize["overlay"] and node.targetSize["overlay"].width or node.targetSize.width
564+
switchNode.rsq = size * size
565+
switchNode.size = size
566+
end
567+
end
568+
553569
self:ProcessStats(switchNode)
554570
end
555571
end

0 commit comments

Comments
 (0)