Module:Ability

local p = {}

function p.abilitybox(frame) local abilityname = frame.args[1] local data = require('Module:Ability/AbilityList') ability = data.abilitylist[abilityname]

local result = ' ' .. ability.actiontype .. ' ' .. abilityname .. ' ▼ ▲  '

if ability.cost ~= nil then result = result .. 'Costs ' .. ability.cost .. ' '  end

result = result .. ' '

if ability.actiontype ~= 'Passive' then if ability.attunement ~= nil and ability.class ~= nil then result = result .. ' Class: ' .. ability.class .. ' Attunement: ' .. ability.attunement .. ' '     elseif ability.attunement == nil and ability.class ~= nil then result = result .. ' Class: ' .. ability.class .. ' '     end

if ability.uselimit ~= nil and ability.gravitas ~= nil then result = result .. ' Gravitas: ' .. ability.gravitas .. ' Use Limit: ' .. ability.uselimit .. ' '     elseif ability.uselimit == nil and ability.gravitas ~= nil then result = result .. ' Gravitas: ' .. ability.gravitas .. ' '     elseif ability.uselimit ~= nil and ability.gravitas == nil then result = result .. ' Use Limit: ' .. ability.uselimit .. ' '     end

result = result .. ' Keywords: ' .. ability.keywords .. ' '

if ability.blurb ~= nil then result = result .. ' ' .. ability.blurb .. ' Effect: ' .. ability.effect .. ' '     else result = result .. ' Effect: ' .. ability.effect .. ' '     end

else if ability.blurb ~= nil then result = result .. ' ' .. ability.blurb .. ' Effect: ' .. ability.effect .. ' '     else result = result .. ' Effect: ' .. ability.effect .. ' '     end end

if ability.specialname ~= nil then result = result .. ' ' .. ability.specialname .. ': ' .. ability.specialeffect .. ' '  end

result = result .. ' '   return result end

return p