Module:BTD6 paragon stats: Difference between revisions

mNo edit summary
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 20: Line 20:
-- upper header
-- upper header
table.insert(ret, '!rowspan="2"|Degree\n!rowspan="2"|Power')
table.insert(ret, '!rowspan="2"|Degree\n!rowspan="2"|Power\n!rowspan="2"|[[Paragon#Boss damage|Boss multiplier]]')
local labels = {}
local labels = {}
local sublabels = {}
local sublabels = {}
Line 48: Line 48:
table.insert(ret, '|-')
table.insert(ret, '|-')
table.insert(ret, string.format("!%s\n|%s", i, degreeRequirements[i]))
table.insert(ret, string.format("!%s\n|%s", i, degreeRequirements[i]))
if i < 20 then table.insert(ret, "|×1.0")
elseif i < 40 then table.insert(ret, "|×1.25")
elseif i < 60 then table.insert(ret, "|×1.5")
elseif i < 80 then table.insert(ret, "|×1.75")
elseif i ~= 100 then table.insert(ret, "|×2.0")
else table.insert(ret, "|×2.25") end
local values = {}
local values = {}
Line 78: Line 84:
else amount = values[j] * (1 + (i-1) * 0.01) + math.floor((i-1)/10)
else amount = values[j] * (1 + (i-1) * 0.01) + math.floor((i-1)/10)
end
end
bd = amount
else
elseif sublabels[j] == 'Ceramic damage' or sublabels[j] == 'MOAB-Class damage' then
if i == 100 then amount = values[j] * 2
if i == 100 then amount = values[j] * 2
else amount = values[j] * (1 + (i-1) * 0.01)
else amount = values[j] * (1 + (i-1) * 0.01)
end
end
prefix = ' +'
prefix = ' +'
if sublabels[j] == 'MOAB-Class damage' then bd = bd + amount end
elseif sublabels[j] == 'Boss damage' then
if i == 100 then amount = values[j] * 2
else amount = values[j] * (1 + (i-1) * 0.01)
end
prefix = ' +'
amount = ((amount + bd) * (1 + (math.floor(i/20)/4))) - amount
end
end
if amount > 999 then table.insert(ret, string.format('|%s%.8g%s', prefix, amount, suffix))
if amount > 999 then table.insert(ret, string.format('|%s%.8g%s', prefix, amount, suffix))