Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalIdentity committed Aug 16, 2022
2 parents 087945c + 7518f8a commit a720a46
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 76 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [v2.20.2](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v2.20.2) (2022/08/16)

[Full Changelog](https://github.com/PathOfBuildingCommunity/PathOfBuilding/compare/v2.20.1...v2.20.2)

<!-- Release notes generated using configuration in .github/release.yml at dev -->

## What's Changed
### New to Path of Building### New to Path of Building
- Reintroduce Show/Hide skill cost based upon whether it has a base cost [\#4838](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/4838) ([QuickStick123](https://github.com/QuickStick123))
### Accuracy Improvements
- Use correct max shock in breakdown [\#4829](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/4829) ([Lilylicious](https://github.com/Lilylicious))
### Fixed Bugs
- Fix timeless jewel socket index bug [\#4832](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/4832) ([Lothrik](https://github.com/Lothrik))
- Fix missing unique sliders [\#4835](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/4835) ([Lothrik](https://github.com/Lothrik))
- Filter out unused modifier line ranges [\#4836](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/4836) ([Lothrik](https://github.com/Lothrik))

## [v2.20.1](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v2.20.1) (2022/08/16)

[Full Changelog](https://github.com/PathOfBuildingCommunity/PathOfBuilding/compare/v2.20.0...v2.20.1)
Expand Down
12 changes: 12 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
VERSION[2.20.2][2022/08/16]

--- Implemented Enhancements ---
* Reintroduce Show/Hide skill cost based upon whether it has a base cost (QuickStick123)
--- Accuracy Improvements ---
* Use correct max shock in breakdown (Lilylicious)
--- Fixed Bugs ---
* Fix timeless jewel socket index bug (Lothrik)
* Fix missing unique sliders (Lothrik)
* Filter out unused modifier line ranges (Lothrik)


VERSION[2.20.1][2022/08/16]

--- Fixed Bugs ---
Expand Down
64 changes: 32 additions & 32 deletions src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,12 @@ end

function ItemClass:BuildRaw()
local rawLines = { }
t_insert(rawLines, "Rarity: "..self.rarity)
t_insert(rawLines, "Rarity: " .. self.rarity)
if self.title then
t_insert(rawLines, self.title)
t_insert(rawLines, self.baseName)
else
t_insert(rawLines, (self.namePrefix or "")..self.baseName..(self.nameSuffix or ""))
t_insert(rawLines, (self.namePrefix or "") .. self.baseName .. (self.nameSuffix or ""))
end
if self.armourData then
for _, type in ipairs({ "Armour", "Evasion", "EnergyShield", "Ward" }) do
Expand All @@ -693,52 +693,52 @@ function ItemClass:BuildRaw()
end
end
if self.uniqueID then
t_insert(rawLines, "Unique ID: "..self.uniqueID)
t_insert(rawLines, "Unique ID: " .. self.uniqueID)
end
if self.league then
t_insert(rawLines, "League: "..self.league)
t_insert(rawLines, "League: " .. self.league)
end
if self.unreleased then
t_insert(rawLines, "Unreleased: true")
end
for i, curInfluenceInfo in ipairs(influenceInfo) do
if self[curInfluenceInfo.key] then
t_insert(rawLines, curInfluenceInfo.display.." Item")
t_insert(rawLines, curInfluenceInfo.display .. " Item")
end
end
if self.crafted then
t_insert(rawLines, "Crafted: true")
for i, affix in ipairs(self.prefixes or { }) do
t_insert(rawLines, "Prefix: "..(affix.range and ("{range:"..round(affix.range,3).."}") or "")..affix.modId)
t_insert(rawLines, "Prefix: " .. (affix.range and ("{range:" .. round(affix.range,3) .. "}") or "") .. affix.modId)
end
for i, affix in ipairs(self.suffixes or { }) do
t_insert(rawLines, "Suffix: "..(affix.range and ("{range:"..round(affix.range,3).."}") or "")..affix.modId)
t_insert(rawLines, "Suffix: " .. (affix.range and ("{range:" .. round(affix.range,3) .. "}") or "") .. affix.modId)
end
end
if self.catalyst and self.catalyst > 0 then
t_insert(rawLines, "Catalyst: "..catalystList[self.catalyst])
t_insert(rawLines, "Catalyst: " .. catalystList[self.catalyst])
end
if self.catalystQuality then
t_insert(rawLines, "CatalystQuality: "..self.catalystQuality)
t_insert(rawLines, "CatalystQuality: " .. self.catalystQuality)
end
if self.clusterJewel then
if self.clusterJewelSkill then
t_insert(rawLines, "Cluster Jewel Skill: "..self.clusterJewelSkill)
t_insert(rawLines, "Cluster Jewel Skill: " .. self.clusterJewelSkill)
end
if self.clusterJewelNodeCount then
t_insert(rawLines, "Cluster Jewel Node Count: "..self.clusterJewelNodeCount)
t_insert(rawLines, "Cluster Jewel Node Count: " .. self.clusterJewelNodeCount)
end
end
if self.talismanTier then
t_insert(rawLines, "Talisman Tier: "..self.talismanTier)
t_insert(rawLines, "Talisman Tier: " .. self.talismanTier)
end
if self.itemLevel then
t_insert(rawLines, "Item Level: "..self.itemLevel)
t_insert(rawLines, "Item Level: " .. self.itemLevel)
end
local function writeModLine(modLine)
local line = modLine.line
if modLine.range then
line = "{range:"..round(modLine.range,3).."}" .. line
if modLine.range and line:match("%(%-?[%d%.]+%-[%d%.]+%)") then
line = "{range:" .. round(modLine.range, 3) .. "}" .. line
end
if modLine.crafted then
line = "{crafted}" .. line
Expand All @@ -755,47 +755,47 @@ function ItemClass:BuildRaw()
if modLine.variantList then
local varSpec
for varId in pairs(modLine.variantList) do
varSpec = (varSpec and varSpec.."," or "") .. varId
varSpec = (varSpec and varSpec .. "," or "") .. varId
end
line = "{variant:"..varSpec.."}"..line
line = "{variant:" .. varSpec .. "}" .. line
end
if modLine.modTags and #modLine.modTags > 0 then
line = "{tags:"..table.concat(modLine.modTags, ",").."}"..line
line = "{tags:" .. table.concat(modLine.modTags, ",") .. "}" .. line
end
t_insert(rawLines, line)
end
if self.variantList then
for _, variantName in ipairs(self.variantList) do
t_insert(rawLines, "Variant: "..variantName)
t_insert(rawLines, "Variant: " .. variantName)
end
t_insert(rawLines, "Selected Variant: "..self.variant)
t_insert(rawLines, "Selected Variant: " .. self.variant)

for _, baseLine in pairs(self.baseLines) do
writeModLine(baseLine)
end
if self.hasAltVariant then
t_insert(rawLines, "Has Alt Variant: true")
t_insert(rawLines, "Selected Alt Variant: "..self.variantAlt)
t_insert(rawLines, "Selected Alt Variant: " .. self.variantAlt)
end
if self.hasAltVariant2 then
t_insert(rawLines, "Has Alt Variant Two: true")
t_insert(rawLines, "Selected Alt Variant Two: "..self.variantAlt2)
t_insert(rawLines, "Selected Alt Variant Two: " .. self.variantAlt2)
end
if self.hasAltVariant3 then
t_insert(rawLines, "Has Alt Variant Three: true")
t_insert(rawLines, "Selected Alt Variant Three: "..self.variantAlt3)
t_insert(rawLines, "Selected Alt Variant Three: " .. self.variantAlt3)
end
if self.hasAltVariant4 then
t_insert(rawLines, "Has Alt Variant Four: true")
t_insert(rawLines, "Selected Alt Variant Four: "..self.variantAlt4)
t_insert(rawLines, "Selected Alt Variant Four: " .. self.variantAlt4)
end
if self.hasAltVariant5 then
t_insert(rawLines, "Has Alt Variant Five: true")
t_insert(rawLines, "Selected Alt Variant Five: "..self.variantAlt5)
t_insert(rawLines, "Selected Alt Variant Five: " .. self.variantAlt5)
end
end
if self.quality then
t_insert(rawLines, "Quality: "..self.quality)
t_insert(rawLines, "Quality: " .. self.quality)
end
if self.sockets and #self.sockets > 0 then
local line = "Sockets: "
Expand All @@ -808,18 +808,18 @@ function ItemClass:BuildRaw()
t_insert(rawLines, line)
end
if self.requirements and self.requirements.level then
t_insert(rawLines, "LevelReq: "..self.requirements.level)
t_insert(rawLines, "LevelReq: " .. self.requirements.level)
end
if self.jewelRadiusLabel then
t_insert(rawLines, "Radius: "..self.jewelRadiusLabel)
t_insert(rawLines, "Radius: " .. self.jewelRadiusLabel)
end
if self.limit then
t_insert(rawLines, "Limited to: "..self.limit)
t_insert(rawLines, "Limited to: " .. self.limit)
end
if self.classRestriction then
t_insert(rawLines, "Requires Class "..self.classRestriction)
t_insert(rawLines, "Requires Class " .. self.classRestriction)
end
t_insert(rawLines, "Implicits: "..(#self.enchantModLines + #self.implicitModLines + #self.scourgeModLines))
t_insert(rawLines, "Implicits: " .. (#self.enchantModLines + #self.implicitModLines + #self.scourgeModLines))
for _, modLine in ipairs(self.enchantModLines) do
writeModLine(modLine)
end
Expand Down Expand Up @@ -862,7 +862,7 @@ function ItemClass:Craft()
self.requirements.level = self.base.req.level
local statOrder = { }
for _, list in ipairs({self.prefixes,self.suffixes}) do
for i = 1, self.affixLimit/2 do
for i = 1, self.affixLimit / 2 do
local affix = list[i]
if not affix then
list[i] = { modId = "None" }
Expand Down
11 changes: 7 additions & 4 deletions src/Classes/TreeTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,6 @@ function TreeTabClass:FindTimelessJewel()
end
end
t_sort(jewelSockets, function(a, b) return a.label < b.label end)
for jewelSocketIdx, jewelSocket in pairs(jewelSockets) do
jewelSocket.idx = jewelSocketIdx
end
timelessData.jewelSocket = next(timelessData.jewelSocket) and timelessData.jewelSocket or jewelSockets[1]

local function buildMods()
Expand Down Expand Up @@ -1013,7 +1010,13 @@ function TreeTabClass:FindTimelessJewel()
timelessData.jewelSocket = value
self.build.modFlag = true
end, self.build, socketViewer)
controls.socketSelect.selIndex = timelessData.jewelSocket.idx
-- we need to search through `jewelSockets` for the correct `id` as the `idx` can become stale due to dynamic sorting
for idx, jewelSocket in ipairs(jewelSockets) do
if jewelSocket.id == timelessData.jewelSocket.id then
controls.socketSelect.selIndex = idx
break
end
end

controls.socketFilterLabel = new("LabelControl", { "TOPRIGHT", nil, "TOPLEFT" }, 405, 100, 0, 16, "^7Filter Nodes:")
controls.socketFilter = new("CheckBoxControl", { "LEFT", controls.socketFilterLabel, "RIGHT" }, 10, 0, 18, nil, function(value)
Expand Down
36 changes: 13 additions & 23 deletions src/Modules/Build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,18 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild)
{ stat = "AreaOfEffectRadius", label = "AoE Radius", fmt = "d" },
{ stat = "BrandAttachmentRange", label = "Attachment Range", fmt = "d", flag = "brand" },
{ stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand" },
{ stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "LifeCost", label = "Life Cost", fmt = "d", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ESCost", label = "Energy Shield Cost", fmt = "d", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "RageCost", label = "Rage Cost", fmt = "d", color = colorCodes.RAGE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "LifePercentCost", label = "Life Cost", fmt = "d%%", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ManaPerSecondCost", label = "Mana Cost", fmt = ".2f/s", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "LifePerSecondCost", label = "Life Cost", fmt = ".2f/s", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ManaPercentPerSecondCost", label = "Mana Cost", fmt = ".2f%%/s", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "LifePercentPerSecondCost", label = "Life Cost", fmt = ".2f%%/s", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ESPerSecondCost", label = "Energy Shield Cost", fmt = ".2f/s", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ESPercentPerSecondCost", label = "Energy Shield Cost", fmt = ".2f%%/s", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return v > 0 end },
{ stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end },
{ stat = "LifeCost", label = "Life Cost", fmt = "d", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifeHasCost end },
{ stat = "ESCost", label = "Energy Shield Cost", fmt = "d", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESHasCost end },
{ stat = "RageCost", label = "Rage Cost", fmt = "d", color = colorCodes.RAGE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RageHasCost end },
{ stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end },
{ stat = "LifePercentCost", label = "Life Cost", fmt = "d%%", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentHasCost end },
{ stat = "ManaPerSecondCost", label = "Mana Cost", fmt = ".2f/s", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end },
{ stat = "LifePerSecondCost", label = "Life Cost", fmt = ".2f/s", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePerSecondHasCost end },
{ stat = "ManaPercentPerSecondCost", label = "Mana Cost", fmt = ".2f%%/s", color = colorCodes.MANA, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end },
{ stat = "LifePercentPerSecondCost", label = "Life Cost", fmt = ".2f%%/s", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentPerSecondHasCost end },
{ stat = "ESPerSecondCost", label = "Energy Shield Cost", fmt = ".2f/s", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPerSecondHasCost end },
{ stat = "ESPercentPerSecondCost", label = "Energy Shield Cost", fmt = ".2f%%/s", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPercentPerSecondHasCost end },
{ },
{ stat = "Str", label = "Strength", color = colorCodes.STRENGTH, fmt = "d" },
{ stat = "ReqStr", label = "Strength Required", color = colorCodes.STRENGTH, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Str end, warnFunc = function(v) return "You do not meet the Strength requirement" end },
Expand Down Expand Up @@ -793,19 +793,14 @@ function buildMode:Load(xml, fileName)
end
elseif child.elem == "TimelessData" then
self.timelessData.jewelType = {
label = child.attrib.jewelTypeLabel,
name = child.attrib.jewelTypeName,
id = tonumber(child.attrib.jewelTypeId)
}
self.timelessData.conquerorType = {
label = child.attrib.conquerorTypeLabel,
id = tonumber(child.attrib.conquerorTypeId)
}
self.timelessData.jewelSocket = {
label = child.attrib.jewelSocketLabel,
keystone = child.attrib.jewelSocketKeystone,
id = tonumber(child.attrib.jewelSocketId),
idx = tonumber(child.attrib.jewelSocketIdx)
id = tonumber(child.attrib.jewelSocketId)
}
self.timelessData.fallbackWeightMode = {
idx = tonumber(child.attrib.fallbackWeightModeIdx)
Expand Down Expand Up @@ -879,15 +874,10 @@ function buildMode:Save(xml)
local timelessData = {
elem = "TimelessData",
attrib = {
jewelTypeLabel = next(self.timelessData.jewelType) and tostring(self.timelessData.jewelType.label),
jewelTypeName = next(self.timelessData.jewelType) and tostring(self.timelessData.jewelType.name),
jewelTypeId = next(self.timelessData.jewelType) and tostring(self.timelessData.jewelType.id),
conquerorTypeLabel = next(self.timelessData.conquerorType) and tostring(self.timelessData.conquerorType.label),
conquerorTypeId = next(self.timelessData.conquerorType) and tostring(self.timelessData.conquerorType.id),
jewelSocketLabel = next(self.timelessData.conquerorType) and tostring(self.timelessData.jewelSocket.label),
jewelSocketKeystone = next(self.timelessData.jewelSocket) and tostring(self.timelessData.jewelSocket.keystone),
jewelSocketId = next(self.timelessData.jewelSocket) and tostring(self.timelessData.jewelSocket.id),
jewelSocketIdx = next(self.timelessData.jewelSocket) and tostring(self.timelessData.jewelSocket.idx),
fallbackWeightModeIdx = next(self.timelessData.fallbackWeightMode) and tostring(self.timelessData.fallbackWeightMode.idx),
socketFilter = self.timelessData.socketFilter and "true",
searchList = self.timelessData.searchList and tostring(self.timelessData.searchList),
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,7 @@ function calcs.offence(env, actor, activeSkill)
val.baseCost = val.baseCost + baseCost
val.totalCost = val.totalCost + totalCost
val.baseCostNoMult = val.baseCostNoMult + baseCostNoMult
output[(val.upfront and resource or resource:gsub("Minute", "Second")).."HasCost"] = val.baseCost > 0 or val.totalCost > 0 or val.baseCostNoMult > 0
end
for resource, val in pairs(costs) do
local dec = val.upfront and 0 or 2
Expand Down Expand Up @@ -3724,7 +3725,7 @@ function calcs.offence(env, actor, activeSkill)
output[ailment.."Duration"] = ailmentData[ailment].duration * (1 + incDur / 100) * moreDur * debuffDurationMult
output[ailment.."EffectMod"] = calcLib.mod(skillModList, cfg, "Enemy"..ailment.."Effect")
if breakdown then
local maximum = output["Maximum"..ailment] or ailmentData[ailment].max
local maximum = globalOutput["Maximum"..ailment] or ailmentData[ailment].max
local current = m_max(m_min(globalOutput["Current"..ailment] or 0, maximum), 0)
local desired = m_max(m_min(enemyDB:Sum("BASE", nil, "Desired"..ailment.."Val"), maximum), 0)
if ailmentData[ailment].min ~= 0 then
Expand Down
Loading

0 comments on commit a720a46

Please sign in to comment.