-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnord-standard.lua
131 lines (114 loc) · 4.32 KB
/
nord-standard.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
function()
-- function hotsForName(name)
-- if SAMMERS_NORD_TEST == nil then
-- SAMMERS_NORD_TEST = {}
-- end
-- if SAMMERS_NORD_TEST[name] == nil then
-- SAMMERS_NORD_TEST[name]= {}
-- end
-- return SAMMERS_NORD_TEST[name]
-- end
-- local cname = aura_env.state.unitName
-- local triggernum = aura_env.state.triggernum
-- hotsForName(cname)[]
-- DevTool:AddData(cname, "cname")
-- DevTool:AddData(triggernum, "triggernum")
-- DevTool:AddData(aura_env, "aura_env")
-- print(SAMMERS_NORD_TEST)
-- 1. Rejuve
-- 2. Renewing bloom
-- 3. Procced Canward
-- 4. Focused Growth
-- 5. Lifebloom
-- 6. Adaptive Swarm
-- 7. Wild Growth
-- 8. Barkskin
-- 9. Germination
-- 10. Regrowth
-- 11. Tranquility
-- 12. Frenzy Regen
-- 13. Cultivation
-- 14. Treant Wild Growth
-- 15. Grove trending
function numToStr(num)
local letter = {
[0] = "",
[1] = "K",
[2] = "M",
--etc
}
local n = num
local numGroups = 0
local n2 = n
while n2 >= 1000 do
n2 = n2 / 1000
numGroups = numGroups + 1
end
return string.format("%.1f%s", n/1000^numGroups, letter[numGroups])
end
function simplehotValue(trigger)
local finalVal = 0.0
local multiplier = 1
if aura_env.states[trigger].show and aura_env.states[trigger].tooltip1 ~= nil and aura_env.states[trigger].tooltip2 ~= nil then
finalVal = aura_env.states[trigger].tooltip1 / aura_env.states[trigger].tooltip2
multiplier = aura_env.states[trigger].matchCount
end
return finalVal * multiplier
end
function swarmMultiplierF(trigger)
local swarmMultiplier = 1.0
if aura_env.states[trigger].show and aura_env.states[trigger].tooltip3 ~= nil then
swarmMultiplier = 1 + aura_env.states[trigger].tooltip3 / 100
end
return swarmMultiplier
end
function focusedGrowthMultiplierF(trigger)
local focusedGrowthMultiplier = 1.0
if aura_env.states[trigger].show and aura_env.states[trigger].tooltip1 ~= nil then
focusedGrowthMultiplier = 1 + aura_env.states[trigger].tooltip1 / 100
end
return focusedGrowthMultiplier
end
function barkMultiplierF(trigger)
local barkMultiplier = 1.0
if aura_env.states[trigger].show then
barkMultiplier = 1.2
end
return barkMultiplier
end
function frenzyF(trigger)
local finalVal = 0.0
if aura_env.states[trigger].show and aura_env.states[trigger].tooltip1 ~= nil and aura_env.states[trigger].tooltip2 ~= nil then
finalVal = UnitHealthMax(aura_env.states[trigger].unitCaster) * (aura_env.states[trigger].tooltip1 / aura_env.states[trigger].tooltip2) / 100
end
return finalVal
end
function frenzyMultiplierF(trigger)
local finalVal = 1.0
if aura_env.states[trigger].show and aura_env.states[trigger].tooltip1 ~= nil and aura_env.states[trigger].tooltip2 ~= nil then
finalVal = 1.2
end
return finalVal
end
local rejuve = simplehotValue(1)
local renewingBloom = simplehotValue(2)
local proccedCanward = simplehotValue(3)
local focusedGrowthMultiplier = focusedGrowthMultiplierF(4)
local lifebloom = simplehotValue(5) * focusedGrowthMultiplier
local adaptiveSwarm = simplehotValue(6)
local swarmMultiplier = swarmMultiplierF(6)
local wildGrowth = simplehotValue(7)
local bark = barkMultiplierF(8)
local germination = simplehotValue(9)
local regrowth = simplehotValue(10)
local tranq = simplehotValue(11)
local frenzyRegen = frenzyF(12)
local frenzyMultiplier = frenzyMultiplierF(12)
local cultivation = simplehotValue(13)
local treantWildGrowth = simplehotValue(14)
local groveTrending = simplehotValue(15)
local res = (rejuve + renewingBloom + proccedCanward + lifebloom + adaptiveSwarm + wildGrowth + regrowth + germination + frenzyRegen + tranq + cultivation + groveTrending + treantWildGrowth) * swarmMultiplier * bark * frenzyMultiplier
local rint = math.floor(res)
local str = numToStr(rint)
return str
end