ElEditors, Interface administrators, Administrators
70,975
edits
No edit summary |
No edit summary |
||
Line 150: | Line 150: | ||
local short_detail = prop_short[detail_key] | local short_detail = prop_short[detail_key] | ||
local detail_content = args[short_detail .. trait_count] | local detail_content = args[short_detail .. trait_count] | ||
local multiplier = detail_content or default_value[short_detail] | local multiplier = detail_content or default_value[short_detail] or 100 | ||
local suffix = '' | |||
if short_detail == 'mp' or short_detail == 'mp_recovery' then | |||
suffix = STR.MP | |||
elseif short_detail == 'cd' or short_detail == 'duration' then | |||
suffix = STR.SEC | |||
end | end | ||
local base_detail = args[short_detail] | |||
-- Fix Regen 1. | |||
if short_detail == 'mp_recovery' then | |||
base_detail = args.mp | |||
end | |||
local end_value = (tonumber(multiplier) / 100) * tonumber(base_detail or 0); | |||
if end_value <= 0 then | |||
end_value = '-' | |||
end | |||
local detail_cell = tr3:tag('td'):wikitext(end_value .. suffix); | |||
end | end | ||
end | end |