Merge branch 'req' into dev

This commit is contained in:
ppoelzl
2020-11-29 22:13:28 +01:00
2 changed files with 20 additions and 18 deletions

View File

@@ -1196,13 +1196,13 @@ do
if level and level > 0 then
t_insert(req, s_format("^x7F7F7FLevel %s%d", main:StatColor(level, nil, self.characterLevel), level))
end
if str and (str > 14 or str > self.calcsTab.mainOutput.Str) then
if str and (str >= 14 or str > self.calcsTab.mainOutput.Str) then
t_insert(req, s_format("%s%d ^x7F7F7FStr", main:StatColor(str, strBase, self.calcsTab.mainOutput.Str), str))
end
if dex and (dex > 14 or dex > self.calcsTab.mainOutput.Dex) then
if dex and (dex >= 14 or dex > self.calcsTab.mainOutput.Dex) then
t_insert(req, s_format("%s%d ^x7F7F7FDex", main:StatColor(dex, dexBase, self.calcsTab.mainOutput.Dex), dex))
end
if int and (int > 14 or int > self.calcsTab.mainOutput.Int) then
if int and (int >= 14 or int > self.calcsTab.mainOutput.Int) then
t_insert(req, s_format("%s%d ^x7F7F7FInt", main:StatColor(int, intBase, self.calcsTab.mainOutput.Int), int))
end
if req[1] then

View File

@@ -116,31 +116,33 @@ function calcLib.getGemStatRequirement(level, isSupport, multi)
end
local a, b
if isSupport then
b = 6 * multi / 100
b = 6 * multi / 100
if multi == 100 then
a = 1.495
elseif multi == 60 then
a = 0.945
elseif multi == 40 then
a = 0.6575
elseif multi == 60 then
a = 0.945
elseif multi == 40 then
a = 0.6575
else
return 0
end
else
b = 8 * multi / 100
if multi == 100 then
a = 2.1
b = 7.75
elseif multi == 60 then
a = 1.325
elseif multi == 40 then
a = 0.924
else
b = 8 * multi / 100
if multi == 100 then
a = 2.1
b = 7.75
elseif multi == 75 then
a = 1.619
elseif multi == 60 then
a = 1.325
elseif multi == 40 then
a = 0.924
else
return 0
end
end
local req = round(level * a + b)
return req < 14 and 0 or req
return req < 14 and 0 or req
end
-- Build table of stats for the given skill instance