...
|
...
|
@@ -1427,9 +1427,9 @@ end |
1427
|
1427
|
--- Scale damage values
|
1428
|
1428
|
-- This currently beefs up high-end damage values to make up for the combat stat rescale nerf.
|
1429
|
1429
|
function _M:rescaleDamage(dam)
|
1430
|
|
- if dam <= 0 then return math.decimals(dam, 2) end
|
|
1430
|
+ if dam <= 0 then return dam end
|
1431
|
1431
|
-- return dam * (1 - math.log10(dam * 2) / 7) --this is the old version, pre-combat-stat-rescale
|
1432
|
|
- return math.decimals(dam ^ 1.04, 2)
|
|
1432
|
+ return dam ^ 1.04
|
1433
|
1433
|
end
|
1434
|
1434
|
|
1435
|
1435
|
--Diminishing-returns method of scaling combat stats, observing this rule: the first twenty ranks cost 1 point each, the second twenty cost two each, and so on. This is much, much better for players than some logarithmic mess, since they always know exactly what's going on, and there are nice breakpoints to strive for.
|
...
|
...
|
@@ -1486,12 +1486,12 @@ function _M:combatLimit(x, limit, y_low, x_low, y_high, x_high) |
1486
|
1486
|
-- local add = (limit*(x_high*y_low-x_low*y_high) + y_high*y_low*(x_low-x_high))/(p-m)
|
1487
|
1487
|
-- return (limit-add)*x/(x + halfpoint) + add
|
1488
|
1488
|
local ah = (limit*(x_high*y_low-x_low*y_high)+ y_high*y_low*(x_low-x_high))/(y_high - y_low) -- add*halfpoint product calculated at once to avoid possible divide by zero
|
1489
|
|
- return math.decimals((limit*x + ah)/(x + (p-m)/(y_high - y_low)), 2) --factored version of above formula
|
|
1489
|
+ return (limit*x + ah)/(x + (p-m)/(y_high - y_low)) --factored version of above formula
|
1490
|
1490
|
-- return (limit-add)*x/(x + halfpoint) + add, halfpoint, add
|
1491
|
1491
|
else
|
1492
|
1492
|
local add = 0
|
1493
|
1493
|
local halfpoint = limit*x_high/(y_high-add)-x_high
|
1494
|
|
- return math.decimals((limit-add)*x/(x + halfpoint) + add, 2)
|
|
1494
|
+ return (limit-add)*x/(x + halfpoint) + add
|
1495
|
1495
|
-- return (limit-add)*x/(x + halfpoint) + add, halfpoint, add
|
1496
|
1496
|
end
|
1497
|
1497
|
end
|
...
|
...
|
@@ -1519,10 +1519,10 @@ function _M:combatTalentScale(t, low, high, power, add, shift, raw) |
1519
|
1519
|
local m = (high - low)/(x_high_adj - x_low_adj)
|
1520
|
1520
|
local b = low - m*x_low_adj
|
1521
|
1521
|
if power == "log" then -- always >= 0
|
1522
|
|
- return math.decimals(math.max(0, m * math.log10(tl + shift) + b + add), 2)
|
|
1522
|
+ return math.max(0, m * math.log10(tl + shift) + b + add)
|
1523
|
1523
|
-- return math.max(0, m * math.log10(tl + shift) + b + add), m, b
|
1524
|
1524
|
else
|
1525
|
|
- return math.decimals(math.max(0, m * (tl + shift)^power + b + add), 2)
|
|
1525
|
+ return math.max(0, m * (tl + shift)^power + b + add)
|
1526
|
1526
|
-- return math.max(0, m * (tl + shift)^power + b + add), m, b
|
1527
|
1527
|
end
|
1528
|
1528
|
end
|
...
|
...
|
@@ -1548,10 +1548,10 @@ function _M:combatStatScale(stat, low, high, power, add, shift) |
1548
|
1548
|
local m = (high - low)/(x_high_adj - x_low_adj)
|
1549
|
1549
|
local b = low -m*x_low_adj
|
1550
|
1550
|
if power == "log" then -- always >= 0
|
1551
|
|
- return math.decimals(math.max(0, m * math.log10(stat + shift) + b + add), 2)
|
|
1551
|
+ return math.max(0, m * math.log10(stat + shift) + b + add)
|
1552
|
1552
|
-- return math.max(0, m * math.log10(stat + shift) + b + add), m, b
|
1553
|
1553
|
else
|
1554
|
|
- return math.decimals(math.max(0, m * (stat + shift)^power + b + add), 2)
|
|
1554
|
+ return math.max(0, m * (stat + shift)^power + b + add)
|
1555
|
1555
|
-- return math.max(0, m * (stat + shift)^power + b + add), m, b
|
1556
|
1556
|
end
|
1557
|
1557
|
end
|
...
|
...
|
@@ -1575,11 +1575,11 @@ function _M:combatTalentLimit(t, limit, low, high, raw) |
1575
|
1575
|
-- local halfpoint = (p-m)/(high - low) -- point at which half progress towards the limit is reached
|
1576
|
1576
|
-- local add = (limit*(x_high*low-x_low*high) + high*low*(x_low-x_high))/(p-m)
|
1577
|
1577
|
local ah = (limit*(x_high*low-x_low*high)+ high*low*(x_low-x_high))/(high - low) -- add*halfpoint product calculated at once to avoid possible divide by zero
|
1578
|
|
- return math.decimals((limit*tl + ah)/(tl + (p-m)/(high - low)), 2) --factored version of above formula
|
|
1578
|
+ return (limit*tl + ah)/(tl + (p-m)/(high - low)) --factored version of above formula
|
1579
|
1579
|
-- return (limit-add)*tl/(tl + halfpoint) + add, halfpoint, add
|
1580
|
1580
|
else -- assume low and x_low are both 0
|
1581
|
1581
|
local halfpoint = limit*x_high/high-x_high
|
1582
|
|
- return math.decimals(limit*tl/(tl + halfpoint), 2)
|
|
1582
|
+ return limit*tl/(tl + halfpoint)
|
1583
|
1583
|
-- return (limit-add)*tl/(tl + halfpoint) + add, halfpoint, add
|
1584
|
1584
|
end
|
1585
|
1585
|
end
|
...
|
...
|
@@ -1601,11 +1601,11 @@ function _M:combatStatLimit(stat, limit, low, high) |
1601
|
1601
|
-- local halfpoint = (p-m)/(high - low) -- point at which half progress towards the limit is reached
|
1602
|
1602
|
-- local add = (limit*(x_high*low-x_low*high) + high*low*(x_low-x_high))/(p-m)
|
1603
|
1603
|
local ah = (limit*(x_high*low-x_low*high)+ high*low*(x_low-x_high))/(high - low) -- add*halfpoint product calculated at once to avoid possible divide by zero
|
1604
|
|
- return math.decimals((limit*stat + ah)/(stat + (p-m)/(high - low)), 2) --factored version of above formula
|
|
1604
|
+ return (limit*stat + ah)/(stat + (p-m)/(high - low)) --factored version of above formula
|
1605
|
1605
|
-- return (limit-add)*stat/(stat + halfpoint) + add, halfpoint, add
|
1606
|
1606
|
else -- assume low and x_low are both 0
|
1607
|
1607
|
local halfpoint = limit*x_high/high-x_high
|
1608
|
|
- return math.decimals(limit*stat/(stat + halfpoint), 2)
|
|
1608
|
+ return limit*stat/(stat + halfpoint)
|
1609
|
1609
|
-- return (limit-add)*stat/(stat + halfpoint) + add, halfpoint, add
|
1610
|
1610
|
end
|
1611
|
1611
|
end
|
...
|
...
|
|