m (center) Tag: sourceedit |
m (-) |
||
(27 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | -- <nowiki> |
||
+ | local yesno = require('Module:Yesno') |
||
local p = {} |
local p = {} |
||
local reduction = { |
local reduction = { |
||
− | [0] = 1, |
+ | [0] = {1, 1}, |
− | [1] = 0.99, |
+ | [1] = {34, 0.99}, |
− | [2] = 0.97, |
+ | [2] = {49, 0.97}, |
− | [3] = 0.95, |
+ | [3] = {64, 0.95}, |
− | [4] = 0.93, |
+ | [4] = {69, 0.93}, |
− | [5] = 0.91, |
+ | [5] = {78, 0.91}, |
− | [6] = 0.88, |
+ | [6] = {83, 0.88}, |
− | [7] = 0.86, |
+ | [7] = {91, 0.86}, |
− | [8] = 0.83, |
+ | [8] = {95, 0.83}, |
− | [9] = 0.8, |
+ | [9] = {105, 0.8}, |
} |
} |
||
Line 32: | Line 34: | ||
[1] = 0.94, |
[1] = 0.94, |
||
[2] = 0.88, |
[2] = 0.88, |
||
− | [3] = 0.82 |
+ | [3] = 0.82, |
⚫ | |||
+ | e2 = 0.82, |
||
+ | e3 = 0.73 |
||
} |
} |
||
local lv = { |
local lv = { |
||
+ | [0] = 1, |
||
+ | [1] = 0.9, |
||
+ | [2] = 0.875, |
||
+ | [3] = 0.85, |
||
+ | } |
||
+ | |||
+ | local cape = { |
||
+ | [false] = 1, |
||
+ | [true] = 0.98, |
||
+ | } |
||
+ | |||
+ | local coins = { |
||
+ | [true] = require('Module:ExchangeLite').price('Divine charge') / 3000, |
||
[false] = 1, |
[false] = 1, |
||
⚫ | |||
} |
} |
||
Line 49: | Line 66: | ||
− | + | function main_table(args) |
|
⚫ | |||
local atier = tonumber(args.tier) or 70 |
local atier = tonumber(args.tier) or 70 |
||
local tier = atier |
local tier = atier |
||
Line 57: | Line 73: | ||
end |
end |
||
local collapsed = args.collapsed or false |
local collapsed = args.collapsed or false |
||
+ | local coinsver = yesno(args.coins, args.coins) |
||
local base = (tier - 60) / 8 |
local base = (tier - 60) / 8 |
||
Line 62: | Line 79: | ||
local function make_4(tr, i, mult) |
local function make_4(tr, i, mult) |
||
+ | local adj = base * reduction[i][2] * mult * coins[coinsver] |
||
tr :tag('td') |
tr :tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * slot['2h'])) |
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * slot['1h'])) |
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * slot['oh'])) |
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * slot['t'])) |
:done() |
:done() |
||
end |
end |
||
− | local function make_row(i, lvl) |
+ | local function make_row(i, lvl, addcape) |
local tr = t:tag('tr') |
local tr = t:tag('tr') |
||
+ | addcape = addcape or false |
||
+ | local str = i |
||
+ | if addcape then |
||
+ | str = i .. '<br/>+Cape' |
||
+ | end |
||
+ | |||
tr :tag('th') |
tr :tag('th') |
||
− | :wikitext( |
+ | :wikitext(str) |
:done() |
:done() |
||
⚫ | |||
⚫ | |||
− | + | :wikitext(reduction[i][1]) |
|
⚫ | |||
⚫ | |||
− | make_4(tr, i, lv[lvl] * eff[ |
+ | make_4(tr, i, lv[lvl] * eff[0] * cape[addcape]) |
⚫ | |||
+ | make_4(tr, i, lv[lvl] * eff['e1'] * cape[addcape]) |
||
⚫ | |||
+ | make_4(tr, i, lv[lvl] * eff[3] * cape[addcape]) |
||
+ | make_4(tr, i, lv[lvl] * eff['e3'] * cape[addcape]) |
||
+ | if i >= 8 and not addcape then |
||
+ | make_row(i, lvl, true) |
||
+ | end |
||
end |
end |
||
local function make_header(lv) |
local function make_header(lv) |
||
local str = 'Item level 1-4' |
local str = 'Item level 1-4' |
||
− | if lv then |
+ | if (lv == 1) then |
− | str = 'Item level 5 |
+ | str = 'Item level 5-13' |
+ | end |
||
+ | if (lv == 2) then |
||
⚫ | |||
+ | end |
||
+ | if (lv == 3) then |
||
+ | str = 'Item level 18+' |
||
end |
end |
||
local class = 'wikitable mw-collapsible' |
local class = 'wikitable mw-collapsible' |
||
Line 105: | Line 143: | ||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
− | :attr(' |
+ | :attr('rowspan', 3) |
+ | :wikitext('[[File:Invention-icon.png|21x21px|link=Invention]]') |
||
⚫ | |||
⚫ | |||
⚫ | |||
:wikitext(str) |
:wikitext(str) |
||
:done() |
:done() |
||
Line 115: | Line 157: | ||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
− | :attr('rowspan', |
+ | :attr('rowspan', 14) |
:wikitext(' ') |
:wikitext(' ') |
||
:done() |
:done() |
||
Line 123: | Line 165: | ||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
− | :attr('rowspan', |
+ | :attr('rowspan', 14) |
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | :attr('rowspan', 14) |
||
:wikitext(' ') |
:wikitext(' ') |
||
:done() |
:done() |
||
Line 131: | Line 181: | ||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
− | :attr('rowspan', |
+ | :attr('rowspan', 14) |
⚫ | |||
⚫ | |||
⚫ | |||
+ | :attr('colspan', 4) |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | :attr('rowspan', 14) |
||
:wikitext(' ') |
:wikitext(' ') |
||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
:attr('colspan', 4) |
:attr('colspan', 4) |
||
− | :wikitext('Efficient 3') |
+ | :wikitext('Enhanced Efficient 3') |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('tr') |
:tag('tr') |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | :wikitext('2H') |
||
⚫ | |||
+ | :tag('th') |
||
+ | :wikitext('MH/A') |
||
⚫ | |||
+ | :tag('th') |
||
+ | :wikitext('OH') |
||
+ | :done() |
||
+ | :tag('th') |
||
+ | :wikitext('T') |
||
+ | :done() |
||
:tag('th') |
:tag('th') |
||
:wikitext('2H') |
:wikitext('2H') |
||
Line 194: | Line 276: | ||
t :tag('tr') |
t :tag('tr') |
||
:tag('th') |
:tag('th') |
||
− | :attr('colspan', |
+ | :attr('colspan', 31) |
:wikitext('Tier ' .. atier) |
:wikitext('Tier ' .. atier) |
||
:done() |
:done() |
||
:done() |
:done() |
||
− | make_header( |
+ | make_header(0) |
for i = 0, 9, 1 do |
for i = 0, 9, 1 do |
||
− | make_row(i, |
+ | make_row(i, 0) |
end |
end |
||
− | make_header( |
+ | make_header(1) |
for i = 0, 9, 1 do |
for i = 0, 9, 1 do |
||
− | make_row(i, |
+ | make_row(i, 1) |
end |
end |
||
+ | make_header(2) |
||
⚫ | |||
+ | for i = 0, 9, 1 do |
||
⚫ | |||
+ | make_row(i, 2) |
||
+ | end |
||
+ | make_header(3) |
||
+ | for i = 0, 9, 1 do |
||
+ | make_row(i, 3) |
||
+ | end |
||
+ | |||
+ | return tostring(t) |
||
end |
end |
||
+ | function p.table(frame) |
||
⚫ | |||
⚫ | |||
+ | |||
+ | local ret = '' |
||
+ | if args.coins == nil then |
||
+ | args.coins = false |
||
+ | ret = {'{{Switch infobox', '|text1=Charges per second', '|text2=Equivalent coins per second', '|item1=', main_table(args), '|item2=' } |
||
+ | |||
+ | args.coins = true |
||
+ | table.insert(ret, main_table(args)) |
||
+ | table.insert(ret, '}}') |
||
+ | ret = mw.getCurrentFrame():preprocess(table.concat(ret, '\n')) |
||
+ | |||
+ | else |
||
+ | -- coins specified, only do one |
||
+ | ret = tostring(main_table(args)) |
||
+ | end |
||
⚫ | |||
+ | end |
||
+ | |||
+ | |||
⚫ | |||
+ | function oneslot_table(tier, s, coinstable) |
||
tier = tonumber(tier) or 70 |
tier = tonumber(tier) or 70 |
||
if tier < 67 then |
if tier < 67 then |
||
tier = 67 |
tier = 67 |
||
end |
end |
||
⚫ | |||
local base = (tier - 60) / 8 * slot[s] |
local base = (tier - 60) / 8 * slot[s] |
||
local t = mw.html.create('table') |
local t = mw.html.create('table') |
||
+ | t:tag('caption'):wikitext(' ') |
||
− | local function make_row(i, l) |
+ | local function make_row(i, l, addcape, coinver) |
+ | local adj = base * lv[l] * reduction[i][2] * cape[addcape] * coins[coinver] |
||
+ | local str = i |
||
+ | if addcape then |
||
+ | str = i .. '<br />+Cape' |
||
+ | end |
||
t :tag('tr') |
t :tag('tr') |
||
:tag('th') |
:tag('th') |
||
− | :wikitext( |
+ | :wikitext(str) |
+ | :done() |
||
+ | :tag('th') |
||
+ | :wikitext(reduction[i][1]) |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * eff[0])) |
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * eff[1])) |
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * eff['e1'])) |
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
− | :wikitext(floor_s( |
+ | :wikitext(floor_s(adj * eff[2])) |
+ | :done() |
||
+ | :tag('td') |
||
+ | :wikitext(floor_s(adj * eff[3])) |
||
+ | :done() |
||
+ | :tag('td') |
||
+ | :wikitext(floor_s(adj * eff['e3'])) |
||
:done() |
:done() |
||
:done() |
:done() |
||
+ | if i >= 8 and not addcape then |
||
+ | make_row(i,l,true,coinver) |
||
+ | end |
||
end |
end |
||
+ | local function make_header(str) |
||
− | |||
− | + | t :addClass('wikitable') |
|
− | :css({ |
+ | :css({ |
− | ['text-align'] = 'right', |
+ | ['text-align'] = 'right', |
− | margin = ' |
+ | margin = '1em auto', |
− | }) |
+ | }) |
− | :tag('tr') |
+ | :tag('tr') |
− | :tag('th') |
+ | :tag('th') |
− | :attr('rowspan', 2) |
+ | :attr('rowspan', 2) |
− | :wikitext('Reduction') |
+ | :wikitext('Reduction') |
+ | :done() |
||
+ | :tag('th') |
||
+ | :attr('rowspan', 2) |
||
+ | :wikitext('[[File:Invention-icon.png|21x21px|link=Invention]]') |
||
+ | :done() |
||
+ | :tag('th') |
||
+ | :attr('colspan', 7) |
||
+ | :wikitext(str) |
||
+ | :done() |
||
:done() |
:done() |
||
− | :tag(' |
+ | :tag('tr') |
− | : |
+ | :tag('th') |
− | :wikitext(' |
+ | :wikitext('Base') |
− | :done() |
+ | :done() |
− | : |
+ | :tag('th') |
− | : |
+ | :attr('rowspan', 13) |
− | : |
+ | :wikitext(' ') |
− | : |
+ | :done() |
+ | :tag('th') |
||
+ | :wikitext('Eff 1') |
||
+ | :done() |
||
+ | :tag('th') |
||
+ | :wikitext('EnhEff 1') |
||
+ | :done() |
||
+ | :tag('th') |
||
+ | :wikitext('Eff 2') |
||
+ | :done() |
||
+ | :tag('th') |
||
+ | :wikitext('Eff 3<br />EnhEff 2') |
||
+ | :done() |
||
+ | :tag('th') |
||
+ | :wikitext('EnhEff 3') |
||
+ | :done() |
||
:done() |
:done() |
||
+ | end |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | make_header('Item level 1-4') |
||
for i = 0,9,1 do |
for i = 0,9,1 do |
||
− | make_row(i, false) |
+ | make_row(i, 0, false, coinstable) |
end |
end |
||
+ | make_header('Item level 5-13') |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
for i = 0,9,1 do |
for i = 0,9,1 do |
||
− | make_row(i, |
+ | make_row(i, 1, false, coinstable) |
+ | end |
||
+ | |||
+ | make_header('Item level 14-18') |
||
+ | for i = 0,9,1 do |
||
+ | make_row(i, 2, false, coinstable) |
||
+ | end |
||
+ | |||
+ | make_header('Item level 18+') |
||
+ | for i = 0,9,1 do |
||
+ | make_row(i, 3, false, coinstable) |
||
end |
end |
||
− | return t |
+ | return tostring(t) |
end |
end |
||
+ | |||
⚫ | |||
+ | ret = {'{{Switch infobox', '|text1=Charges per second', '|text2=Equivalent coins per second', '|item1=', oneslot_table(tier,s,false), '|item2=', oneslot_table(tier,s,true), '}}'} |
||
⚫ | |||
+ | return mw.getCurrentFrame():preprocess(table.concat(ret, '\n')) |
||
+ | end |
||
Latest revision as of 15:59, 19 January 2018
Documentation for this module may be created at Module:Charge drain/doc
-- <nowiki>
local yesno = require('Module:Yesno')
local p = {}
local reduction = {
[0] = {1, 1},
[1] = {34, 0.99},
[2] = {49, 0.97},
[3] = {64, 0.95},
[4] = {69, 0.93},
[5] = {78, 0.91},
[6] = {83, 0.88},
[7] = {91, 0.86},
[8] = {95, 0.83},
[9] = {105, 0.8},
}
local slot = {
['2h'] = 1.5,
mh = 1,
['1h'] = 1,
armour = 1,
a = 1,
body = 1,
legs = 1,
shield = 0.5,
oh = 0.5,
t = 0.25,
tool = 0.25,
}
local eff = {
[0] = 1,
[1] = 0.94,
[2] = 0.88,
[3] = 0.82,
e1 = 0.91,
e2 = 0.82,
e3 = 0.73
}
local lv = {
[0] = 1,
[1] = 0.9,
[2] = 0.875,
[3] = 0.85,
}
local cape = {
[false] = 1,
[true] = 0.98,
}
local coins = {
[true] = require('Module:ExchangeLite').price('Divine charge') / 3000,
[false] = 1,
}
local function floor(n)
return math.floor(n*100)/100
end
local function floor_s(n)
return string.format('%.2f', floor(n))
end
function main_table(args)
local atier = tonumber(args.tier) or 70
local tier = atier
if tier < 67 then
tier = 67
end
local collapsed = args.collapsed or false
local coinsver = yesno(args.coins, args.coins)
local base = (tier - 60) / 8
local t = mw.html.create('table')
local function make_4(tr, i, mult)
local adj = base * reduction[i][2] * mult * coins[coinsver]
tr :tag('td')
:wikitext(floor_s(adj * slot['2h']))
:done()
:tag('td')
:wikitext(floor_s(adj * slot['1h']))
:done()
:tag('td')
:wikitext(floor_s(adj * slot['oh']))
:done()
:tag('td')
:wikitext(floor_s(adj * slot['t']))
:done()
end
local function make_row(i, lvl, addcape)
local tr = t:tag('tr')
addcape = addcape or false
local str = i
if addcape then
str = i .. '<br/>+Cape'
end
tr :tag('th')
:wikitext(str)
:done()
:tag('th')
:wikitext(reduction[i][1])
:done()
make_4(tr, i, lv[lvl] * eff[0] * cape[addcape])
make_4(tr, i, lv[lvl] * eff[1] * cape[addcape])
make_4(tr, i, lv[lvl] * eff['e1'] * cape[addcape])
make_4(tr, i, lv[lvl] * eff[2] * cape[addcape])
make_4(tr, i, lv[lvl] * eff[3] * cape[addcape])
make_4(tr, i, lv[lvl] * eff['e3'] * cape[addcape])
if i >= 8 and not addcape then
make_row(i, lvl, true)
end
end
local function make_header(lv)
local str = 'Item level 1-4'
if (lv == 1) then
str = 'Item level 5-13'
end
if (lv == 2) then
str = 'Item level 14-17'
end
if (lv == 3) then
str = 'Item level 18+'
end
local class = 'wikitable mw-collapsible'
if collapsed then
class = 'wikitable mw-collapsible mw-collapsed'
end
t :addClass(class)
:css('text-align', 'right')
:tag('tr')
:tag('th')
:attr('rowspan', 3)
:wikitext('Reduction')
:done()
:tag('th')
:attr('rowspan', 3)
:wikitext('[[File:Invention-icon.png|21x21px|link=Invention]]')
:done()
:tag('th')
:attr('colspan', 29)
:wikitext(str)
:done()
:done()
:tag('tr')
:tag('th')
:attr('colspan', 4)
:wikitext('Base')
:done()
:tag('th')
:attr('rowspan', 14)
:wikitext(' ')
:done()
:tag('th')
:attr('colspan', 4)
:wikitext('Efficient 1')
:done()
:tag('th')
:attr('rowspan', 14)
:wikitext(' ')
:done()
:tag('th')
:attr('colspan', 4)
:wikitext('Enhanced Efficient 1')
:done()
:tag('th')
:attr('rowspan', 14)
:wikitext(' ')
:done()
:tag('th')
:attr('colspan', 4)
:wikitext('Efficient 2')
:done()
:tag('th')
:attr('rowspan', 14)
:wikitext(' ')
:done()
:tag('th')
:attr('colspan', 4)
:wikitext('Eff 3/Enh Eff 2')
:done()
:tag('th')
:attr('rowspan', 14)
:wikitext(' ')
:done()
:tag('th')
:attr('colspan', 4)
:wikitext('Enhanced Efficient 3')
:done()
:done()
:tag('tr')
:tag('th')
:wikitext('2H')
:done()
:tag('th')
:wikitext('MH/A')
:done()
:tag('th')
:wikitext('OH')
:done()
:tag('th')
:wikitext('T')
:done()
:tag('th')
:wikitext('2H')
:done()
:tag('th')
:wikitext('MH/A')
:done()
:tag('th')
:wikitext('OH')
:done()
:tag('th')
:wikitext('T')
:done()
:tag('th')
:wikitext('2H')
:done()
:tag('th')
:wikitext('MH/A')
:done()
:tag('th')
:wikitext('OH')
:done()
:tag('th')
:wikitext('T')
:done()
:tag('th')
:wikitext('2H')
:done()
:tag('th')
:wikitext('MH/A')
:done()
:tag('th')
:wikitext('OH')
:done()
:tag('th')
:wikitext('T')
:done()
:tag('th')
:wikitext('2H')
:done()
:tag('th')
:wikitext('MH/A')
:done()
:tag('th')
:wikitext('OH')
:done()
:tag('th')
:wikitext('T')
:done()
:tag('th')
:wikitext('2H')
:done()
:tag('th')
:wikitext('MH/A')
:done()
:tag('th')
:wikitext('OH')
:done()
:tag('th')
:wikitext('T')
:done()
:done()
:done()
end
t :tag('tr')
:tag('th')
:attr('colspan', 31)
:wikitext('Tier ' .. atier)
:done()
:done()
make_header(0)
for i = 0, 9, 1 do
make_row(i, 0)
end
make_header(1)
for i = 0, 9, 1 do
make_row(i, 1)
end
make_header(2)
for i = 0, 9, 1 do
make_row(i, 2)
end
make_header(3)
for i = 0, 9, 1 do
make_row(i, 3)
end
return tostring(t)
end
function p.table(frame)
local args = frame:getParent().args
local ret = ''
if args.coins == nil then
args.coins = false
ret = {'{{Switch infobox', '|text1=Charges per second', '|text2=Equivalent coins per second', '|item1=', main_table(args), '|item2=' }
args.coins = true
table.insert(ret, main_table(args))
table.insert(ret, '}}')
ret = mw.getCurrentFrame():preprocess(table.concat(ret, '\n'))
else
-- coins specified, only do one
ret = tostring(main_table(args))
end
return ret
end
function oneslot_table(tier, s, coinstable)
tier = tonumber(tier) or 70
if tier < 67 then
tier = 67
end
local base = (tier - 60) / 8 * slot[s]
local t = mw.html.create('table')
t:tag('caption'):wikitext(' ')
local function make_row(i, l, addcape, coinver)
local adj = base * lv[l] * reduction[i][2] * cape[addcape] * coins[coinver]
local str = i
if addcape then
str = i .. '<br />+Cape'
end
t :tag('tr')
:tag('th')
:wikitext(str)
:done()
:tag('th')
:wikitext(reduction[i][1])
:done()
:tag('td')
:wikitext(floor_s(adj * eff[0]))
:done()
:tag('td')
:wikitext(floor_s(adj * eff[1]))
:done()
:tag('td')
:wikitext(floor_s(adj * eff['e1']))
:done()
:tag('td')
:wikitext(floor_s(adj * eff[2]))
:done()
:tag('td')
:wikitext(floor_s(adj * eff[3]))
:done()
:tag('td')
:wikitext(floor_s(adj * eff['e3']))
:done()
:done()
if i >= 8 and not addcape then
make_row(i,l,true,coinver)
end
end
local function make_header(str)
t :addClass('wikitable')
:css({
['text-align'] = 'right',
margin = '1em auto',
})
:tag('tr')
:tag('th')
:attr('rowspan', 2)
:wikitext('Reduction')
:done()
:tag('th')
:attr('rowspan', 2)
:wikitext('[[File:Invention-icon.png|21x21px|link=Invention]]')
:done()
:tag('th')
:attr('colspan', 7)
:wikitext(str)
:done()
:done()
:tag('tr')
:tag('th')
:wikitext('Base')
:done()
:tag('th')
:attr('rowspan', 13)
:wikitext(' ')
:done()
:tag('th')
:wikitext('Eff 1')
:done()
:tag('th')
:wikitext('EnhEff 1')
:done()
:tag('th')
:wikitext('Eff 2')
:done()
:tag('th')
:wikitext('Eff 3<br />EnhEff 2')
:done()
:tag('th')
:wikitext('EnhEff 3')
:done()
:done()
end
make_header('Item level 1-4')
for i = 0,9,1 do
make_row(i, 0, false, coinstable)
end
make_header('Item level 5-13')
for i = 0,9,1 do
make_row(i, 1, false, coinstable)
end
make_header('Item level 14-18')
for i = 0,9,1 do
make_row(i, 2, false, coinstable)
end
make_header('Item level 18+')
for i = 0,9,1 do
make_row(i, 3, false, coinstable)
end
return tostring(t)
end
p.oneslot = function(tier, s)
ret = {'{{Switch infobox', '|text1=Charges per second', '|text2=Equivalent coins per second', '|item1=', oneslot_table(tier,s,false), '|item2=', oneslot_table(tier,s,true), '}}'}
return mw.getCurrentFrame():preprocess(table.concat(ret, '\n'))
end
return p