The wiki is currently a work in progress. If you'd like to help out, please check the Community Portal and our getting started guide. Also, check out our sister project on poewiki.net.

User:Skkias/Module:Skill: Difference between revisions

From Path of Exile 2 Wiki
Jump to navigation Jump to search
(Created page with "-- New Module")
 
No edit summary
Line 1: Line 1:
-- New Module
local data = require('Module:SkillData')
local p = {}
 
function p.showSkill(frame)
    local skillName = frame.args[1] or "Spark"
    local skill = data[skillName]
    if not skill then
        return "Skill not found."
    end
 
    local result = "Skill: " .. skill.name .. "\nDescription: " .. skill.description .. "\nLevels:\n"
    for _, level in ipairs(skill.levels) do
        result = result .. "Level " .. level.level .. ": " .. level.damage_min .. " to " .. level.damage_max .. " damage, Mana cost: " .. level.mana_cost .. "\n"
    end
    return result
end
 
return p

Revision as of 20:59, 10 December 2024

local data = require('Module:SkillData') local p = {}

function p.showSkill(frame)

   local skillName = frame.args[1] or "Spark"
   local skill = data[skillName]
   if not skill then
       return "Skill not found."
   end
   local result = "Skill: " .. skill.name .. "\nDescription: " .. skill.description .. "\nLevels:\n"
   for _, level in ipairs(skill.levels) do
       result = result .. "Level " .. level.level .. ": " .. level.damage_min .. " to " .. level.damage_max .. " damage, Mana cost: " .. level.mana_cost .. "\n"
   end
   return result

end

return p