17,101
edits
(Add "For Each Unholy Mark stack on the enemy:" to unholy prayers) |
(Update for v1.3) |
||
Line 2: | Line 2: | ||
local Shared = require('Module:Shared') | local Shared = require('Module:Shared') | ||
local GameData = require('Module:GameData') | local GameData = require('Module:GameData') | ||
local Modifiers = require('Module:Modifiers') | |||
local Skills = require('Module:Skills') | |||
local Icons = require('Module:Icons') | local Icons = require('Module:Icons') | ||
local Items = require('Module:Items') | local Items = require('Module:Items') | ||
Line 50: | Line 51: | ||
function p._getPrayerEffect(prayer, asList) | function p._getPrayerEffect(prayer, asList) | ||
if asList == nil then asList = false end | if asList == nil then asList = false end | ||
local chr = asList and '* ' or '' | |||
local lineSep = (asList and '\n' or '<br>') | |||
local chr = (asList and '* ' or '') | |||
local bonusLines = {} | local bonusLines = {} | ||
Line 58: | Line 61: | ||
if type(prayer.modifiers) == 'table' then | if type(prayer.modifiers) == 'table' then | ||
local formatLine = function(text) return chr .. text end | |||
table.insert(bonusLines, Modifiers.getModifiersText(prayer.modifiers, false, false, 10, formatLine, lineSep)) | |||
end | end | ||
if type(prayer.enemyModifiers) == 'table' then | if type(prayer.enemyModifiers) == 'table' then | ||
local formatLine = function(text) return chr .. 'Gives the enemy: ' .. text end | |||
table.insert(bonusLines, Modifiers.getModifiersText(prayer.enemyModifiers, false, false, 10, formatLine, lineSep)) | |||
end | end | ||
Line 76: | Line 79: | ||
table.insert(bonusLines, chr .. "+" .. Shared.round(val, 3, 3) .. " Prayer XP per damage done") | table.insert(bonusLines, chr .. "+" .. Shared.round(val, 3, 3) .. " Prayer XP per damage done") | ||
end | end | ||
return table.concat(bonusLines, lineSep) | |||
end | end | ||
Line 103: | Line 102: | ||
return p.getPrayerEffect(prayer) | return p.getPrayerEffect(prayer) | ||
elseif statName == 'prayerLevel' then | elseif statName == 'prayerLevel' then | ||
return | return Skills.getRecipeRequirementText('Prayer', prayer) | ||
else | else | ||
return prayer[statName] | return prayer[statName] | ||
Line 143: | Line 142: | ||
function p.getPrayerTableFiltered(frame, prayerPredicate) | function p.getPrayerTableFiltered(frame, prayerPredicate) | ||
local skillID = 'Prayer' | |||
local result = '{| class="wikitable sortable stickyHeader"' | local result = '{| class="wikitable sortable stickyHeader"' | ||
result = result..'\r\n|-class=headerRow-0' | result = result..'\r\n|-class=headerRow-0' | ||
result = result..'\r\n!colspan="2"|Prayer!! | result = result..'\r\n!colspan="2"|Prayer!!Requirements' | ||
result = result..'!!Effects!!Point Cost' | result = result..'!!Effects!!Point Cost' | ||
local prayerList = p.getPrayers(prayerPredicate) | local prayerList = p.getPrayers(prayerPredicate) | ||
table.sort(prayerList, function(a, b) | table.sort(prayerList, function(a, b) return Skills.standardRecipeSort(skillID, a, b) end) | ||
for i, prayer in ipairs(prayerList) do | for i, prayer in ipairs(prayerList) do | ||
local level = Skills.getRecipeLevel(skillID, prayer) | |||
local reqText = Skills.getRecipeRequirementText(skillID, prayer) | |||
result = result..'\r\n|-' | result = result..'\r\n|-' | ||
result = result..'\r\n|'..Icons.Icon({prayer.name, type='prayer', notext=true, size='50'}) | result = result..'\r\n|'..Icons.Icon({prayer.name, type='prayer', notext=true, size='50'}) | ||
result = result..'||' .. Icons.getExpansionIcon(prayer.id) .. Icons.Icon({prayer.name, type='prayer', noicon=true}) | result = result..'||' .. Icons.getExpansionIcon(prayer.id) .. Icons.Icon({prayer.name, type='prayer', noicon=true}) | ||
result = result..'||style="text-align:right;"| '.. | result = result..'||style="text-align:right;" data-sort-value="' .. level .. '"| ' .. reqText | ||
result = result..'||'..p._getPrayerEffect(prayer) | result = result..'||'..p._getPrayerEffect(prayer) | ||
result = result..'||'..p.getPrayerCost(prayer) | result = result..'||'..p.getPrayerCost(prayer) |