393
edits
No edit summary |
(combatEffects) |
||
Line 26: | Line 26: | ||
end | end | ||
function p. | function p.getSkillTreeNodesFromSkillName(skillName) | ||
mw.log(GameData.skillData) | mw.log(GameData.skillData) | ||
Line 47: | Line 47: | ||
end | end | ||
local skillNodes = p. | local skillNodes = p.getSkillTreeNodesFromSkillName(skillName) | ||
if not skillNodes then | if not skillNodes then | ||
Line 56: | Line 56: | ||
for _, node in ipairs(skillNodes) do | for _, node in ipairs(skillNodes) do | ||
local nodeDiv = html:tag('div') | |||
:tag('h4'):wikitext(node.name):done() | |||
:tag('p'):wikitext('Points: ' .. node.costs.points):done() | |||
if node.modifiers then | |||
local modifierText = "" | |||
for modifier, data in pairs(node.modifiers) do | |||
if type(data) == "table" then | |||
modifierText = modifierText .. modifier .. ": Skill: " .. (data.skillID or "N/A") .. ", Value: " .. (data.value or "N/A") .. "<br>" | |||
else | |||
modifierText = modifierText .. modifier .. ": " .. tostring(data) .. "<br>" | |||
end | |||
end | |||
nodeDiv:tag('p'):wikitext(modifierText):done() | |||
end | |||
if node.combatEffects then | |||
local combatEffectText = "" | |||
for _, effect in pairs(node.combatEffects) do | |||
combatEffectText = combatEffectText .. "Effect ID: " .. (effect.effectID or "N/A") .. ", Chance: " .. (effect.chance or "N/A") .. "%<br>" | |||
if effect.condition then | |||
combatEffectText = combatEffectText .. "Condition Type: " .. (effect.condition.type or "N/A") .. "<br>" | |||
end | |||
end | |||
nodeDiv:tag('p'):wikitext(combatEffectText):done() | |||
end | |||
html:done() | |||
end | |||
return tostring(html) | return tostring(html) |
edits