Module:GamePassives: Difference between revisions
From SpiritVale Wiki
More actions
No edit summary |
No edit summary |
||
| Line 379: | Line 379: | ||
-- General | -- General | ||
------------------------------------------------------------------ | ------------------------------------------------------------------ | ||
addRow(root, "Max Level", rec["Max Level"] and tostring(rec["Max Level"])) | addRow(root, "Max Level", rec["Max Level"] and tostring(rec["Max Level"])) | ||
| Line 396: | Line 395: | ||
or (req["Required Stances"] and #req["Required Stances"] > 0) then | or (req["Required Stances"] and #req["Required Stances"] > 0) then | ||
if type(req["Required Skills"]) == "table" and #req["Required Skills"] > 0 then | if type(req["Required Skills"]) == "table" and #req["Required Skills"] > 0 then | ||
| Line 421: | Line 419: | ||
local peRows = passiveEffectRows(rec["Passive Effects"]) | local peRows = passiveEffectRows(rec["Passive Effects"]) | ||
if #peRows > 0 then | if #peRows > 0 then | ||
for _, r in ipairs(peRows) do | for _, r in ipairs(peRows) do | ||
addRow(root, r.label, r.value) | addRow(root, r.label, r.value) | ||
| Line 433: | Line 430: | ||
local statusRem = formatStatusRemoval(rec["Status Removal"]) | local statusRem = formatStatusRemoval(rec["Status Removal"]) | ||
if statusApps or statusRem then | if statusApps or statusRem then | ||
addRow(root, "Applies", statusApps) | addRow(root, "Applies", statusApps) | ||
addRow(root, "Removes", statusRem) | addRow(root, "Removes", statusRem) | ||
| Line 443: | Line 439: | ||
local modsText = formatModifiers(rec.Modifiers) | local modsText = formatModifiers(rec.Modifiers) | ||
if modsText then | if modsText then | ||
addRow(root, "Flags", modsText) | addRow(root, "Flags", modsText) | ||
end | end | ||
| Line 452: | Line 447: | ||
local eventsText = formatEvents(rec.Events) | local eventsText = formatEvents(rec.Events) | ||
if eventsText then | if eventsText then | ||
addRow(root, "Triggers", eventsText) | addRow(root, "Triggers", eventsText) | ||
end | end | ||
| Line 460: | Line 454: | ||
------------------------------------------------------------------ | ------------------------------------------------------------------ | ||
if type(rec.Notes) == "table" and #rec.Notes > 0 then | if type(rec.Notes) == "table" and #rec.Notes > 0 then | ||
addRow(root, "Notes", asUl(rec.Notes) or table.concat(rec.Notes, "<br />")) | addRow(root, "Notes", asUl(rec.Notes) or table.concat(rec.Notes, "<br />")) | ||
end | end | ||