Skip to content

Commit 921746f

Browse files
author
LocalIdentity
committed
Merge branch 'dev'
2 parents 834ea4b + 8bfab61 commit 921746f

36 files changed

+608
-204
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

changelog.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
VERSION[0.3.0][20/01/2025]
2+
3+
--- New to Path of Building ---
4+
* Add Emotion filtering to Anoint popup (Quxxy)
5+
You can select Emootion's you have and PoB will tell you the anoints available to you
6+
* Add support for Sceptre 'Allies in your presence' mods (LocalIdentity)
7+
* Add the ability to custom change max node depth for heat map (DoubtinGiyov)
8+
* Add support for Buff Expiry Rate (igorwessel)
9+
* Add support for Critical Weakness debuff (Edvinas-Smita)
10+
* Add support for merging mods on nodes in radius of Time-Lost jewels (Peechey)
11+
* Add support for increased Effect of Small Passive Skills in Radius for Time-Lost Jewels (Peechey)
12+
* Add support for Armour Buff on Scavenged Plating (LocalIdentity)
13+
* Add support for Controlled Destruction (TPlant)
14+
* Add support for Charge consumed recently tree nodes (trompetin17)
15+
* Add support for Monk's Reality Rending node (Nostrademous)
16+
* Add support for Monk's Into the Breach and Lucid Dreaming Ascendancies (Nostrademous)
17+
* Add support for Unnatural Resilience notable (Peechey)
18+
* Add support for Harness the Elements notable and Electrocute to config tab (lrzp)
19+
* Add support for a bunch of tree mods (ltogniolli)
20+
* Add support for Grinning Immolation and Pain Attunement (etojuice)
21+
* Add support for 'You have no Elemental Resistances' modifier (etojuice)
22+
* Add support for Mask of The Stitched Demon (etojuice)
23+
* Add support for Kaom's Heart by (etojuice, ltogniolli)
24+
25+
--- Fixed Crashes ---
26+
* Fix crash when hovering over breakdown for Minion skills (TPlant)
27+
28+
--- Fixed Calculations ---
29+
* Fix +Levels to Gems on Quivers not working sometimes (hugocornago)
30+
* Fix Minion Spell skills doing 0 damage (LocalIdentity)
31+
* Fix Archmage Mana cost (TPlant)
32+
* Fix Scattershot Attack/Cast speed value (deathbeam)
33+
* Fix Penetration calculations (TPlant)
34+
* Fix Chain Support applying to all damage instead of just hits (TPlant)
35+
* Fix Herald interaction with Coming Calamity (xspirus)
36+
* Fix Maligaro's Virtuosity Critical Damage Bonus calculation (etojuice)
37+
38+
--- Fixed Behaviours ---
39+
* Fix Concoction skills not being treated as Unarmed (Peechey)
40+
* Fix Passive Nodes not showing updated value when Hulking Form is allocated (trompetin17)
41+
* Fix Ingenuity Belt not working with reflected rings from Kalandra's Touch (etojuice)
42+
* Fix passive nodes being permanently attached to a Weapon Set (Peechey)
43+
* Fix projectile scaling for Bonestorm and Gas Arrow (Peechey)
44+
45+
--- Accuracy Improvements ---
46+
* Fix value of Onslaught Movement Speed buff (OrderedSet86)
47+
148
VERSION[0.2.0][19/01/2025]
249

350
--- New to Path of Building ---

manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<PoBVersion>
3-
<Version number="0.2.0" />
3+
<Version number="0.3.0" />
44
<Source part="default" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/" />
55
<Source part="runtime" platform="win32" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/runtime/" />
66
<Source part="program" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/src/" />

src/Classes/CheckBoxControl.lua

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ local CheckBoxClass = newClass("CheckBoxControl", "Control", "TooltipHost", func
1111
self.labelWidth = DrawStringWidth(self.width - 4, "VAR", label or "") + 5
1212
self.changeFunc = changeFunc
1313
self.state = initialState
14+
self.checkImage = nil
1415
end)
1516

1617
function CheckBoxClass:IsMouseOver()
@@ -42,6 +43,8 @@ function CheckBoxClass:Draw(viewPort, noTooltip)
4243
elseif self.borderFunc then
4344
local r, g, b = self.borderFunc()
4445
SetDrawColor(r, g, b)
46+
elseif self.checkImage and self.state then
47+
SetDrawColor(0.75, 0.75, 0.75)
4548
else
4649
SetDrawColor(0.5, 0.5, 0.5)
4750
end
@@ -56,15 +59,30 @@ function CheckBoxClass:Draw(viewPort, noTooltip)
5659
SetDrawColor(0, 0, 0)
5760
end
5861
DrawImage(nil, x + 1, y + 1, size - 2, size - 2)
59-
if self.state then
60-
if not enabled then
61-
SetDrawColor(0.33, 0.33, 0.33)
62-
elseif mOver then
63-
SetDrawColor(1, 1, 1)
62+
if self.checkImage then
63+
if self.state then
64+
if not enabled then
65+
SetDrawColor(0.33, 0.33, 0.33)
66+
elseif mOver then
67+
SetDrawColor(2, 2, 2)
68+
else
69+
SetDrawColor(1, 1, 1)
70+
end
6471
else
65-
SetDrawColor(0.75, 0.75, 0.75)
72+
SetDrawColor(0.5, 0.5, 0.5)
73+
end
74+
DrawImage(self.checkImage.handle, x + 1, y + 1, size - 2, size - 2, self.checkImage[1])
75+
else
76+
if self.state then
77+
if not enabled then
78+
SetDrawColor(0.33, 0.33, 0.33)
79+
elseif mOver then
80+
SetDrawColor(1, 1, 1)
81+
else
82+
SetDrawColor(0.75, 0.75, 0.75)
83+
end
84+
main:DrawCheckMark(x + size/2, y + size/2, size * 0.8)
6685
end
67-
main:DrawCheckMark(x + size/2, y + size/2, size * 0.8)
6886
end
6987
if enabled then
7088
SetDrawColor(1, 1, 1)
@@ -106,3 +124,8 @@ function CheckBoxClass:OnKeyUp(key)
106124
end
107125
self.clicked = false
108126
end
127+
128+
---@param image table @The image to display instead of a check. Expects a `handle` field with an image handle, and the sprite position at index `1`. All other fields are ignored. Set to `nil` to draw a normal check.
129+
function CheckBoxClass:SetCheckImage(image)
130+
self.checkImage = image
131+
end

src/Classes/ItemsTab.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ function ItemsTabClass:AnointDisplayItem(enchantSlot)
21102110
self.anointEnchantSlot = enchantSlot or 1
21112111

21122112
local controls = { }
2113-
controls.notableDB = new("NotableDBControl", {"TOPLEFT",nil,"TOPLEFT"}, {10, 60, 360, 360}, self, self.build.spec.tree.nodes, "ANOINT")
2113+
controls.notableDB = new("NotableDBControl", {"TOPLEFT",nil,"TOPLEFT"}, {10, 20, 360, 400}, self, self.build.spec.tree.nodes, "ANOINT")
21142114

21152115
local function saveLabel()
21162116
local node = controls.notableDB.selValue

src/Classes/ModStore.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ function ModStoreClass:ScaleAddMod(mod, scale)
5252
if scaledMod.value.mod then
5353
subMod = scaledMod.value.mod
5454
elseif scaledMod.value.keyOfScaledMod then
55-
scaledMod.value[scaledMod.value.keyOfScaledMod] = round(scaledMod.value[scaledMod.value.keyOfScaledMod] * scale, 2)
55+
if scaledMod.value.key == "level" then -- +Levels can't get scaled with decimals
56+
scaledMod.value[scaledMod.value.keyOfScaledMod] = m_floor(scaledMod.value[scaledMod.value.keyOfScaledMod] * scale)
57+
else
58+
scaledMod.value[scaledMod.value.keyOfScaledMod] = round(scaledMod.value[scaledMod.value.keyOfScaledMod] * scale, 2)
59+
end
5660
end
5761
end
5862
if type(subMod.value) == "number" then

src/Classes/NotableDBControl.lua

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ local m_floor = math.floor
1212
local m_huge = math.huge
1313
local s_format = string.format
1414

15+
local emotionList = {"Ire", "Guilt", "Greed", "Paranoia", "Envy", "Disgust", "Despair", "Fear", "Suffering", "Isolation" }
16+
1517
---@param node table
1618
---@return boolean
1719
local function IsAnointableNode(node)
@@ -20,7 +22,9 @@ end
2022

2123
---@class NotableDBControl : ListControl
2224
local NotableDBClass = newClass("NotableDBControl", "ListControl", function(self, anchor, rect, itemsTab, db, dbType)
23-
self.ListControl(anchor, rect, 16, "VERTICAL", false)
25+
local headerHeight = 68
26+
local innerRect = {rect[1], rect[2]+headerHeight, rect[3], rect[4]-headerHeight}
27+
self.ListControl(anchor, innerRect, 16, "VERTICAL", false)
2428
self.itemsTab = itemsTab
2529
self.db = db
2630
self.dbType = dbType
@@ -32,15 +36,52 @@ local NotableDBClass = newClass("NotableDBControl", "ListControl", function(self
3236
self.sortDropList = { }
3337
self.sortOrder = { }
3438
self.sortMode = "NAME"
35-
self.controls.sort = new("DropDownControl", {"BOTTOMLEFT",self,"TOPLEFT"}, {0, -22, 360, 18}, self.sortDropList, function(index, value)
39+
self.controls.sort = new("DropDownControl", {"TOPLEFT",self,"TOPLEFT"}, {0, -headerHeight, 360, 18}, self.sortDropList, function(index, value)
3640
self:SetSortMode(value.sortMode)
3741
end)
38-
self.controls.search = new("EditControl", {"BOTTOMLEFT",self,"TOPLEFT"}, {0, -2, 258, 18}, "", "Search", "%c", 100, function()
42+
self.controls.search = new("EditControl", {"TOPLEFT",self.controls.sort,"BOTTOMLEFT"}, {0, 2, 258, 18}, "", "Search", "%c", 100, function()
3943
self.listBuildFlag = true
4044
end, nil, nil, true)
4145
self.controls.searchMode = new("DropDownControl", {"LEFT",self.controls.search,"RIGHT"}, {2, 0, 100, 18}, { "Anywhere", "Names", "Modifiers" }, function(index, value)
4246
self.listBuildFlag = true
4347
end)
48+
49+
-- Create and set up emotion filters.
50+
local function getEmotionImages()
51+
local tree = main:LoadTree(latestTreeVersion)
52+
local images = {}
53+
for _, emotionName in ipairs(emotionList) do
54+
images[emotionName] = tree:GetAssetByName(emotionName)
55+
end
56+
57+
return images
58+
end
59+
self.emotionImages = getEmotionImages()
60+
61+
self.controls.emotionLabel = new("LabelControl", {"TOPLEFT", self.controls.search, "BOTTOMLEFT"}, {0, 6, 100, 16}, "Emotions: ")
62+
self.emotionsAvailable = { }
63+
local function emoCheckOnChange(name)
64+
self.emotionsAvailable[name] = true
65+
return function(state)
66+
self.emotionsAvailable[name] = state
67+
self.listBuildFlag = true
68+
end
69+
end
70+
local function emoCheck(name, relTo)
71+
local anchor = {"LEFT", relTo, "RIGHT"}
72+
local rect = {2, 0, 26, 26}
73+
local ctl = new("CheckBoxControl", anchor, rect, "", emoCheckOnChange(name), "Distilled "..name, true)
74+
if self.emotionImages then ctl:SetCheckImage(self.emotionImages[name]) end
75+
return ctl
76+
end
77+
78+
local emotionCheckBoxes = {}
79+
for i,emo in ipairs(emotionList) do
80+
local emoCtl = emoCheck(emo, emotionCheckBoxes[i-1] or self.controls.emotionLabel)
81+
emotionCheckBoxes[i] = emoCtl
82+
self.controls["emotionCheckbox"..emo] = emoCtl
83+
end
84+
4485
self:BuildSortOrder()
4586
self.listBuildFlag = true
4687
end)
@@ -52,6 +93,13 @@ function NotableDBClass:DoesNotableMatchFilters(node)
5293
return false
5394
end
5495

96+
-- Exclude notables the player doesn't have the emotions for.
97+
for _,emo in ipairs(node.recipe) do
98+
if not self.emotionsAvailable[emo] then
99+
return false
100+
end
101+
end
102+
55103
local searchStr = self.controls.search.buf:lower():gsub("[%-%.%+%[%]%$%^%%%?%*]", "%%%0")
56104
if searchStr:match("%S") then
57105
local found = false

src/Classes/PassiveSpec.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ function PassiveSpecClass:Init(treeVersion, convert)
5353
end
5454
end
5555
for id, node in pairs(self.nodes) do
56+
-- init all nodes as normal allocationMode
57+
node.allocMode = 0
5658
-- if the node is allocated and between the old and new tree has the same ID but does not share the same name, add to list of nodes to be ignored
5759
if convert and previousTreeNodes[id] and self.build.spec.allocNodes[id] and node.name ~= previousTreeNodes[id].name then
5860
self.ignoredNodes[id] = previousTreeNodes[id]
@@ -304,6 +306,7 @@ function PassiveSpecClass:ImportFromNodeList(classId, ascendClassId, secondaryAs
304306
local node = self.nodes[id]
305307
if node then
306308
node.alloc = true
309+
node.allocMode = weaponSets[id] or 0
307310
self.allocNodes[id] = node
308311
end
309312
end
@@ -728,7 +731,7 @@ end
728731

729732
function PassiveSpecClass:DeallocSingleNode(node)
730733
node.alloc = false
731-
node.allocMode = nil
734+
node.allocMode = 0
732735
self.allocNodes[node.id] = nil
733736
if node.type == "Mastery" then
734737
self:AddMasteryEffectOptionsToNode(node)
@@ -771,9 +774,9 @@ function PassiveSpecClass:CountAllocNodes()
771774
end
772775
end
773776

774-
if node.allocMode and node.allocMode == 1 then
777+
if node.allocMode == 1 then
775778
weaponSet1Used = weaponSet1Used + 1
776-
elseif node.allocMode and node.allocMode == 2 then
779+
elseif node.allocMode == 2 then
777780
weaponSet2Used = weaponSet2Used + 1
778781
end
779782
end

src/Classes/PassiveTree.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -742,10 +742,7 @@ function PassiveTreeClass:CalcOrbitAngles(nodesInOrbit)
742742
end
743743

744744
function PassiveTreeClass:GetAssetByName(name, type)
745-
if self.ddsMap[name] then
746-
return self.ddsMap[name]
747-
end
748-
return self.assets[name]
745+
return self.ddsMap[name] or self.assets[name]
749746
end
750747

751748
function PassiveTreeClass:GetNodeTargetSize(node)

src/Classes/PassiveTreeView.lua

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,12 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
558558
end
559559
end
560560

561+
-- calculate inc from SmallPassiveSkillEffect
562+
local incSmallPassiveSkillEffect = 0
563+
for _, node in pairs(spec.allocNodes) do
564+
incSmallPassiveSkillEffect = incSmallPassiveSkillEffect + node.modList:Sum("INC", nil ,"SmallPassiveSkillEffect")
565+
end
566+
561567
-- Draw the nodes
562568
for nodeId, node in pairs(spec.nodes) do
563569
-- Determine the base and overlay images for this node based on type and state
@@ -820,7 +826,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
820826
SetDrawLayer(nil, 100)
821827
local size = m_floor(node.size * scale)
822828
if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision) then
823-
self:AddNodeTooltip(self.tooltip, node, build)
829+
self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect)
824830
end
825831
self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort)
826832
end
@@ -1083,7 +1089,7 @@ function PassiveTreeViewClass:AddNodeName(tooltip, node, build)
10831089
end
10841090
end
10851091

1086-
function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
1092+
function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassiveSkillEffect)
10871093
-- Special case for sockets
10881094
if node.type == "Socket" and node.alloc then
10891095
local socket, jewel = build.itemsTab:GetSocketAndJewelForNodeID(node.id)
@@ -1120,7 +1126,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
11201126
tooltip:AddLine(16, string.format("Angle: %f", node.angle))
11211127
tooltip:AddLine(16, string.format("Orbit: %d, Orbit Index: %d", node.orbit, node.orbitIndex))
11221128
tooltip:AddLine(16, string.format("Group: %d", node.g))
1123-
tooltip:AddLine(16, string.format("AllocMode: %d", node.allocMode or 0))
1129+
tooltip:AddLine(16, string.format("AllocMode: %d", node.allocMode))
11241130
tooltip:AddSeparator(14)
11251131

11261132
-- add connection info for debugging
@@ -1146,6 +1152,25 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
11461152
line = line .. " " .. modStr
11471153
end
11481154
end
1155+
1156+
-- Apply Inc Node scaling from Hulking Form only visually
1157+
if incSmallPassiveSkillEffect > 0 and node.type == "Normal" and not node.isAttribute and not node.ascendancyName and node.mods[i].list then
1158+
local scale = 1 + incSmallPassiveSkillEffect / 100
1159+
local scaledList = new("ModList")
1160+
scaledList:ScaleAddList(node.mods[i].list, scale)
1161+
local number = line:match("%d*%.?%d+")
1162+
for j, mod in ipairs(scaledList) do
1163+
local newValue = 0
1164+
if type(mod.value) == "number" then
1165+
newValue = mod.value
1166+
elseif type(mod.value) == "table" then
1167+
newValue = mod.value.mod.value
1168+
end
1169+
line = line:gsub("%d*%.?%d+",math.abs(newValue))
1170+
end
1171+
-- line = line .. " ^8(Effect increased by "..incSmallPassiveSkillEffect.."%)"
1172+
end
1173+
11491174
tooltip:AddLine(16, ((node.mods[i].extra or not node.mods[i].list) and colorCodes.UNSUPPORTED or colorCodes.MAGIC)..line)
11501175
end
11511176
end

0 commit comments

Comments
 (0)