Skip to content

Commit beae00c

Browse files
author
LocalIdentity
committed
Update stat requirement formula
1 parent c38dd2b commit beae00c

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

src/Modules/CalcTools.lua

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -119,39 +119,16 @@ function calcLib.gemIsType(gem, type, includeTransfigured)
119119
((type ~= "active skill" and type ~= "grants_active_skill" and type ~= "skill") and gem.tags[type]))
120120
end
121121

122-
-- From PyPoE's formula.py
122+
-- In-game formula
123123
function calcLib.getGemStatRequirement(level, isSupport, multi)
124124
if multi == 0 then
125125
return 0
126126
end
127-
local a, b
127+
local statType = 0.7
128128
if isSupport then
129-
b = 6 * multi / 100
130-
if multi == 100 then
131-
a = 1.495
132-
elseif multi == 60 then
133-
a = 0.945
134-
elseif multi == 40 then
135-
a = 0.6575
136-
else
137-
return 0
138-
end
139-
else
140-
b = 8 * multi / 100
141-
if multi == 100 then
142-
a = 2.1
143-
b = 7.75
144-
elseif multi == 75 then
145-
a = 1.619
146-
elseif multi == 60 then
147-
a = 1.325
148-
elseif multi == 40 then
149-
a = 0.924
150-
else
151-
return 0
152-
end
129+
statType = 0.5
153130
end
154-
local req = round(level * a + b)
131+
local req = round( ( 20 + ( level - 3 ) * 3 ) * ( multi / 100 ) ^ 0.9 * statType )
155132
return req < 14 and 0 or req
156133
end
157134

0 commit comments

Comments
 (0)