Skip to content

Commit 86c568e

Browse files
committed
Animated tree radius and relic item header
1 parent d790df4 commit 86c568e

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

src/Classes/PassiveTreeView.lua

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,15 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
955955
circle1 = tree:GetAssetByName("art/textures/interface/2d/2dart/uiimages/ingame/".. conqueror .."/".. conqueror .."passiveskillscreenjewelcircle1.dds")
956956
circle2 = circle1
957957
end
958-
DrawImage(circle1.handle, scrX - outerSize, scrY - outerSize, outerSize * 2, outerSize * 2, unpack(circle1))
959-
DrawImage(circle2.handle, scrX - outerSize, scrY - outerSize, outerSize * 2, outerSize * 2, unpack(circle2))
958+
local t = GetTime() * 0.00003
959+
self:DrawImageRotated(circle1.handle, scrX, scrY, outerSize * 2, outerSize * 2, -t * 0.8, unpack(circle1))
960+
self:DrawImageRotated(circle2.handle, scrX, scrY, outerSize * 2, outerSize * 2, t, unpack(circle2))
960961
else
961-
DrawImage(self.jewelShadedOuterRing, scrX - outerSize, scrY - outerSize, outerSize * 2, outerSize * 2)
962-
DrawImage(self.jewelShadedOuterRingFlipped, scrX - outerSize, scrY - outerSize, outerSize * 2, outerSize * 2)
962+
local t = GetTime() * 0.00003
963+
self:DrawImageRotated(self.jewelShadedOuterRing, scrX, scrY, outerSize * 2, outerSize * 2, -t * 0.8)
964+
self:DrawImageRotated(self.jewelShadedOuterRingFlipped, scrX, scrY, outerSize * 2, outerSize * 2, t)
965+
966+
-- keep the inner rings static
963967
DrawImage(self.jewelShadedInnerRing, scrX - innerSize, scrY - innerSize, innerSize * 2, innerSize * 2)
964968
DrawImage(self.jewelShadedInnerRingFlipped, scrX - innerSize, scrY - innerSize, innerSize * 2, innerSize * 2)
965969
end
@@ -990,6 +994,22 @@ function PassiveTreeViewClass:DrawAsset(data, x, y, scale, isHalf)
990994
end
991995
end
992996

997+
function PassiveTreeViewClass:DrawImageRotated(handle, x, y, width, height, angle, ...)
998+
local hw, hh = width / 2, height / 2
999+
local cosA, sinA = math.cos(angle), math.sin(angle)
1000+
1001+
local x1 = x - hw * cosA + hh * sinA
1002+
local y1 = y - hw * sinA - hh * cosA
1003+
local x2 = x + hw * cosA + hh * sinA
1004+
local y2 = y + hw * sinA - hh * cosA
1005+
local x3 = x + hw * cosA - hh * sinA
1006+
local y3 = y + hw * sinA + hh * cosA
1007+
local x4 = x - hw * cosA - hh * sinA
1008+
local y4 = y - hw * sinA + hh * cosA
1009+
1010+
DrawImageQuad(handle, x1, y1, x2, y2, x3, y3, x4, y4, ...)
1011+
end
1012+
9931013
function PassiveTreeViewClass:DrawQuadAndRotate(data, xTree, yTree, angleRad, treeToScreen)
9941014
local vertActive = {}
9951015
local xActive = xTree

src/Classes/Tooltip.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,23 @@ function TooltipClass:Draw(x, y, w, h, viewPort)
354354
if self.tooltipHeader and self.lines[1] and self.lines[1].text then
355355
local rarity = tostring(self.tooltipHeader):upper()
356356
local config = headerConfigs[rarity] or headerConfigs.NORMAL
357+
-- Animate RELIC header color (light green → bright yellow → white)
358+
if rarity == "RELIC" then
359+
local t = GetTime() * 0.003
360+
361+
-- Three phase-shifted sine waves
362+
local s1 = math.sin(t)
363+
local s2 = math.sin(t + 2.094) -- +120°
364+
local s3 = math.sin(t + 4.188) -- +240°
365+
366+
local r = 0.8 + 0.2 * ((s1 + 1) / 2) -- boosts yellows/whites
367+
local g = 0.75 + 0.25 * ((s2 + 1) / 2) -- slightly darker green range
368+
local b = 0.6 + 0.15 * ((s3 + 1) / 2) -- minimal blue, keeps warmth
369+
370+
SetDrawColor(r, g, b)
371+
else
372+
SetDrawColor(1, 1, 1)
373+
end
357374

358375
self.titleYOffset = config.textYOffset or 0
359376

src/Data/Uniques/staff.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Trigger Ember Fusillade Skill on casting a Spell
2424
]],[[
2525
Earthbound
2626
Voltaic Staff
27-
Implicits: 1
27+
Implicits: 2
2828
Grants Skill: Level (1-20) Lightning Bolt
2929
Grants Skill: Level (1-20) Spark
3030
(80-120)% increased Lightning Damage

src/Export/Uniques/staff.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ UniqueTriggerEmberFusilladeOnSpellCast1
2424
]],[[
2525
Earthbound
2626
Voltaic Staff
27-
Implicits: 1
27+
Implicits: 2
2828
Grants Skill: Level (1-20) Lightning Bolt
2929
Grants Skill: Level (1-20) Spark
3030
UniqueLightningDamageOnWeapon1

0 commit comments

Comments
 (0)