FANDOM


local p = {}
 
function p.title1( frame )
    local divText = mw.loadData( 'Module:Leader skill/title' )
    local title = string.upper(frame.args[1])
    return 'Increases the ' .. divText[title] or 'Increases the ' .. divText["#DEFAULT"] or ""
end
 
function p.title2( frame )
    local divText2 = mw.loadData( 'Module:Leader skill/title2' )
    local title = string.upper(frame.args[1])
 
    return ' of ' .. divText2[title] or ' of ' .. divText2["#DEFAULT"] or ""
end
 
function p.title3( frame )
    local divText3 = mw.loadData( 'Module:Leader skill/title3' )
    local title = string.upper(frame.args[1])
    local percent = frame.args[2]
 
    return divText3[title] .. ' by ' .. percent .. '%.' or divText3["#DEFAULT"] .. ' by ' .. percent .. '%.'  or ""
end
 
function p.mainIcon(frame)
    local mainIcon = mw.loadData( 'Module:Leader skill/main icon' )
    local icon = string.upper(frame.args[1])
    local percent = tonumber(frame.args[2])
    local check 
 
    if percent > 55 then
        check = 'High'
    elseif percent > 39 then
        check = 'Mid'
    else
        check = 'Low'
    end
 
    return mainIcon[icon] .. ' (' .. check .. ') '
 
end
 
function p.modIcon(frame)
    local modIcon = mw.loadData( 'Module:Leader skill/mod' )
    local attribute = string.upper(frame.args[1])
 
    return modIcon[attribute] or ''
end
 
 
 
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.