ElEditors, Interface administrators, Administrators
70,980
edits
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 49: | Line 49: | ||
} | } | ||
local details = { | local details = { { STR.LIGHT, STR.CRITICAL, STR.REVERSED }, | ||
{ STR.HEAVY, STR.HASTE, STR.REGEN2, STR.RUTHLESS, STR.POWERFUL, STR.REVERSED }, { STR.KB1 }, | |||
{ STR.HEAVY, STR.HASTE, STR.REGEN2, STR.RUTHLESS, STR.POWERFUL, STR.REVERSED }, | { STR.REGEN1 }, { STR.USEFUL } } | ||
{ STR.REGEN1 }, | |||
-- Default values | -- Default values | ||
Line 98: | Line 94: | ||
return char:gsub('/', '') | return char:gsub('/', '') | ||
end | end | ||
local trait_table = mw.html.create('div'):attr('class', 'content-table'):tag('table'):attr({ | local trait_table = mw.html.create('div'):attr('class', 'content-table'):tag('table'):attr({ | ||
Line 156: | Line 150: | ||
local th_detail = tr2:tag('th'):wikitext(prop[detail_key]); | local th_detail = tr2:tag('th'):wikitext(prop[detail_key]); | ||
th:attr('colspan', tonumber(th:getAttr('colspan') or 1) + 1) | th:attr('colspan', tonumber(th:getAttr('colspan') or 1) + 1) | ||
end | end | ||
end | end | ||
-- Unnamed argument. | -- Unnamed argument. | ||
Line 196: | Line 174: | ||
unnamed[1], | unnamed[1], | ||
unnamed[2], | unnamed[2], | ||
MP = | MP = MP_ARG, | ||
ECP = ECP_ARG, | ECP = ECP_ARG, | ||
CD = args['cd' .. trait_count] or default_value['cd'], | CD = args['cd' .. trait_count] or default_value['cd'], | ||
DURATION = args['duration' .. trait_count], | DURATION = args['duration' .. trait_count], | ||
CHANCE = args['chance' .. trait_count] or default_value['chance'], | CHANCE = args['chance' .. trait_count] or default_value['chance'], | ||
DAMAGE = args['dmg' .. trait_count] or default_value['dmg' | DAMAGE = args['dmg' .. trait_count] or default_value['dmg'] | ||
} | } | ||
}); | }); | ||
Line 236: | Line 212: | ||
local function calcEndValue(base) | local function calcEndValue(base) | ||
local end_value; | local end_value; | ||
if | if short_detail == 'hits' then | ||
end_value = base or | end_value = base or 0 | ||
else | else | ||
end_value = (tonumber(multiplier) / 100) * tonumber(base or | end_value = (tonumber(multiplier) / 100) * tonumber(base or 0) | ||
end | end | ||
if tonumber(end_value) ~= nil and tonumber(end_value) < 0 then | if tonumber(end_value) ~= nil and tonumber(end_value) <= 0 then | ||
end_value = '-' | end_value = '-' | ||
end | end | ||
Line 265: | Line 241: | ||
end | end | ||
local detail_cell = (is_pvp and tr4 or tr3):tag('td'):wikitext(detail_text):attr('rowspan', | local detail_cell = (is_pvp and tr4 or tr3):tag('td'):wikitext(detail_text):attr('rowspan', has_pvp_values and (not args[short_detail_improved .. '_pvp']) and 2 or 1); | ||
end | end | ||
end | end |