Skip to content

Commit

Permalink
Release 1.4.163
Browse files Browse the repository at this point in the history
- Updated skills
- Fixed Cluster Jewel layout
- Fixed Small Cluster Jewels allowing 2 notables
- Fixed passive spec copying
- Fixed Minion Instability
  • Loading branch information
Openarl committed Mar 16, 2020
1 parent b284d40 commit a56ed7b
Show file tree
Hide file tree
Showing 45 changed files with 8,305 additions and 7,895 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
### 1.4.163 - 2020/03/16
* Applied the skill reworks and balance changes for 3.10.0
* New skills are still to come
* Fixed ordering of notables in Cluster Jewel wheels
* Various fixes to the layout of passives in Cluster Jewel wheels
* Fixed issue allowing 2 Notable passives to be crafted onto Small Cluster Jewels
* Duplicating passive trees now correctly copies allocated nodes in Cluster Jewel wheels
* Fixed Minion Instability

### 1.4.162 - 2020/03/15
* Fixed Cluster Jewels not updating their cluster layouts when edited
* Fixed Rigwald's Curse not correctly converting Claw modifiers
Expand Down
14 changes: 11 additions & 3 deletions Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function ItemClass:ParseRaw(raw)
self.corruptable = self.base.type ~= "Flask" and self.base.subType ~= "Cluster"
self.shaperElderTags = data.specialBaseTags[self.type]
self.canBeShaperElder = self.shaperElderTags
self.clusterJewel = verData.clusterJewels and verData.clusterJewels[self.baseName]
self.clusterJewel = verData.clusterJewels and verData.clusterJewels.jewels[self.baseName]
end
self.variantList = nil
self.prefixes = { }
Expand Down Expand Up @@ -425,14 +425,22 @@ function ItemClass:NormaliseQuality()
end

function ItemClass:GetModSpawnWeight(mod, extraTags)
local weight = 0
if self.base then
for i, key in ipairs(mod.weightKey) do
if self.base.tags[key] or (extraTags and extraTags[key]) or (self.shaperElderTags and (self.shaper and self.shaperElderTags.shaper == key) or (self.elder and self.shaperElderTags.elder == key)) then
return mod.weightVal[i]
weight = mod.weightVal[i]
break
end
end
for i, key in ipairs(mod.weightMultiplierKey) do
if self.base.tags[key] or (extraTags and extraTags[key]) or (self.shaperElderTags and (self.shaper and self.shaperElderTags.shaper == key) or (self.elder and self.shaperElderTags.elder == key)) then
weight = weight * mod.weightMultiplierVal[i] / 100
break
end
end
end
return 0
return weight
end

function ItemClass:BuildRaw()
Expand Down
3 changes: 1 addition & 2 deletions Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,7 @@ function ItemsTabClass:AddItem(item, noAutoEquip, index)

if replacing and (replacing.clusterJewel or item.clusterJewel) then
-- We're replacing an existing item, and either the new or old one is a cluster jewel
local slot, itemSet = self:GetEquippedSlotForItem(item)
if slot and not itemSet then
if isValueInTable(self.build.spec.jewels, item.id) then
-- Item is currently equipped, so we need to rebuild the graphs
self.build.spec:BuildClusterJewelGraphs()
end
Expand Down
44 changes: 33 additions & 11 deletions Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,22 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize)
})
end

-- Process list of notables
local notableList = { }
local sortOrder = self.build.data.clusterJewels.notableSortOrder
for _, name in ipairs(jewelData.clusterJewelNotables) do
local baseNode = self.tree.clusterNodeMap[name]
assert(baseNode, "Cluster notable not found: "..name)
assert(sortOrder[baseNode.dn], "Cluster notable has no sort order: "..name)
t_insert(notableList, baseNode)
end
table.sort(notableList, function(a, b) return sortOrder[a.dn] < sortOrder[b.dn] end)

local indicies = { }
local smallCount = m_min(m_max(jewelData.clusterJewelNodeCount or clusterJewel.maxNodes, clusterJewel.minNodes), clusterJewel.maxNodes)
local nodeCount = m_min(m_max(jewelData.clusterJewelNodeCount or clusterJewel.maxNodes, clusterJewel.minNodes), clusterJewel.maxNodes)
local socketCount = jewelData.clusterJewelSocketCount or 0
local notableCount = #notableList
local smallCount = nodeCount - socketCount - notableCount

local function makeJewel(nodeIndex, jewelIndex)
-- Look for the socket
Expand All @@ -725,24 +739,22 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize)
}
t_insert(subGraph.nodes, node)
indicies[nodeIndex] = node
smallCount = smallCount - 1
end

-- First pass: sockets
if jewelData.clusterJewelSocketCount == 1 and clusterJewel.size == "Large" then
if clusterJewel.size == "Large" and socketCount == 1 then
-- Large clusters always have the single jewel at index 6
makeJewel(6, 1)
else
local count = jewelData.clusterJewelSocketCount or 0
assert(count <= #clusterJewel.socketIndicies)
assert(socketCount <= #clusterJewel.socketIndicies, "Too many sockets!")
local getJewels = { 0, 2, 1 }
for i = 1, count do
for i = 1, socketCount do
makeJewel(clusterJewel.socketIndicies[i], getJewels[i])
end
end

-- Second pass: notables
for _, name in ipairs(jewelData.clusterJewelNotables) do
for _, baseNode in ipairs(notableList) do
-- Find a free index
local nodeIndex
for _, index in ipairs(clusterJewel.notableIndicies) do
Expand All @@ -754,6 +766,7 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize)
if not nodeIndex then
for index = clusterJewel.totalIndicies - 2, 0, -2 do
-- Silly fallback to handle maybe possible cases?
-- Update: cases shouldn't be allowed anymore, but we need to handle existing instances
if not indicies[index] then
nodeIndex = index
break
Expand All @@ -762,9 +775,10 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize)
assert(nodeIndex, "No free index to place notable")
end

-- Locate the base node
local baseNode = self.tree.clusterNodeMap[name]
assert(baseNode, "Cluster notable not found: "..name)
if clusterJewel.size == "Medium" and socketCount == 0 and notableCount == 2 then
-- Special rule for two notables in a Medium cluster
nodeIndex = indicies[4] and 8 or 4
end

-- Construct the new node
local node = {
Expand All @@ -780,7 +794,6 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize)
}
t_insert(subGraph.nodes, node)
indicies[nodeIndex] = node
smallCount = smallCount - 1
end

-- Third pass: small fill
Expand All @@ -795,6 +808,15 @@ function PassiveSpecClass:BuildSubgraph(jewel, parentSocket, id, upSize)
end
assert(nodeIndex, "No free index to place small node")

if clusterJewel.size == "Medium" then
-- Special rules for small nodes in Medium clusters
if nodeCount == 5 and nodeIndex == 4 then
nodeIndex = indicies[3] and 10 or 3
elseif nodeCount == 4 and nodeIndex == 8 then
nodeIndex = indicies[9] and 3 or 9
end
end

-- Construct the new node
local node = {
type = "Normal",
Expand Down
3 changes: 2 additions & 1 deletion Classes/PassiveSpecListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ local PassiveSpecListClass = newClass("PassiveSpecListControl", "ListControl", f
local newSpec = new("PassiveSpec", treeTab.build, self.selValue.treeVersion)
newSpec.title = self.selValue.title
newSpec.jewels = copyTable(self.selValue.jewels)
newSpec:DecodeURL(self.selValue:EncodeURL())
newSpec:RestoreUndoState(self.selValue:CreateUndoState())
newSpec:BuildClusterJewelGraphs()
self:RenameSpec(newSpec, true)
end)
self.controls.copy.enabled = function()
Expand Down
Loading

0 comments on commit a56ed7b

Please sign in to comment.