ElEditors, Interface administrators, Administrators
70,867
edits
No edit summary |
No edit summary |
||
Line 129: | Line 129: | ||
local passive_index = string.match(k, "%d") | local passive_index = string.match(k, "%d") | ||
local passive_values = split(is_custom and v or | local passive_values = split(is_custom and v or | ||
frame:preprocess('{{:' .. passive_name .. '}}{{#arrayprint:' .. passive_name .. '}}')); | |||
if is_custom then | if is_custom then | ||
Line 596: | Line 596: | ||
text = { 'Normal', | text = { 'Normal', | ||
OPTIONS.is_append and | OPTIONS.is_append and | ||
link(PASSIVES[OPTIONS.append_index].name, PASSIVES[OPTIONS.append_index].alias or OPTIONS.append_name or nil, PASSIVES[OPTIONS.append_index].suffix, PASSIVES[OPTIONS.append_index].exist) }, | link(PASSIVES[OPTIONS.append_index].name, | ||
PASSIVES[OPTIONS.append_index].alias or OPTIONS.append_name or nil, | |||
PASSIVES[OPTIONS.append_index].suffix, PASSIVES[OPTIONS.append_index].exist) }, | |||
keywords = { OPTIONS.is_append and ('passive' .. OPTIONS.append_index) or nil }, | keywords = { OPTIONS.is_append and ('passive' .. OPTIONS.append_index) or nil }, | ||
is_visible = OPTIONS.is_append or false | is_visible = OPTIONS.is_append or false | ||
Line 644: | Line 646: | ||
text = { | text = { | ||
(inArgs('count') and not OPTIONS.use_avg) and | (inArgs('count') and not OPTIONS.use_avg) and | ||
(table.concat({ 'Per', args.count_name or ' | (table.concat({ 'Per', args.count_name or 'Group' }, ' ')) or 'Average', | ||
'Max' | 'Max' | ||
}, | }, | ||
Line 788: | Line 790: | ||
mode_row:tag('td'):wikitext(frame:expandTemplate { title = mode }) | mode_row:tag('td'):wikitext(frame:expandTemplate { title = mode }) | ||
local damage_entries = returnDamageInOrder() | local damage_entries = returnDamageInOrder() | ||
local last_number | |||
local last_unique_cell | |||
for _, damage_key in ipairs(damage_entries) do | for _, damage_key in ipairs(damage_entries) do | ||
if args.dump_names ~= 'true' then | if args.dump_names ~= 'true' then | ||
local damage_number = FINAL_DAMAGE[mode][damage_key] | local damage_number = FINAL_DAMAGE[mode][damage_key] | ||
damage_number = doRangeText(damage_number) | damage_number = doRangeText(damage_number) | ||
mode_row:tag('td'):wikitext(damage_number | if last_number ~= damage_number then | ||
-- Display ranges. | |||
local new_cell = mode_row:tag('td'):wikitext(damage_number | |||
-- Error out if it doesn't exist | |||
or frame:expandTemplate { | |||
title = 'color', | |||
args = { 'red', '#ERROR' } | |||
}) | |||
last_unique_cell = new_cell | |||
else | |||
last_unique_cell:attr('colspan', (last_unique_cell:getAttr('colspan') or 1) + 1) | |||
end | |||
last_number = damage_number | |||
else | else | ||
mode_row:tag('td'):wikitext(damage_key) | mode_row:tag('td'):wikitext(damage_key) |