2,647
edits
(_getSpecialAttackTable: Fix ancient magicks being unintentionally excluded from output) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 7: | Line 7: | ||
local Items = require('Module:Items') | local Items = require('Module:Items') | ||
local Attacks = require('Module:Attacks') | local Attacks = require('Module:Attacks') | ||
local Num = require('Module:Number') | |||
function p._getSpecialAttackTable(effectDefn, categories, sourceHeaderLabel, includeSource) | function p._getSpecialAttackTable(effectDefn, categories, sourceHeaderLabel, includeSource) | ||
-- TODO needs fixing for V1.3 | |||
-- Is going to be incredibly broken following combat effects & modifiers overhaul | |||
return '' | |||
--[==[ | |||
local spAttTable = {} | local spAttTable = {} | ||
local attacks = Attacks.getAttacks(function(attack) | local attacks = Attacks.getAttacks(function(attack) | ||
Line 195: | Line 201: | ||
if firstRow.chance then | if firstRow.chance then | ||
rowSuffix = (rowCounts[spIdx][spAttRow.descType][spAttRow.chance] > 1 and 'rowspan="' .. rowCounts[spIdx][spAttRow.descType][spAttRow.chance] .. '" ') or '' | rowSuffix = (rowCounts[spIdx][spAttRow.descType][spAttRow.chance] > 1 and 'rowspan="' .. rowCounts[spIdx][spAttRow.descType][spAttRow.chance] .. '" ') or '' | ||
table.insert(resultPart, '\r\n|' .. rowSuffix .. 'data-sort-value="' .. spAttRow.chance .. '" style="text-align:right;"| ' .. | table.insert(resultPart, '\r\n|' .. rowSuffix .. 'data-sort-value="' .. spAttRow.chance .. '" style="text-align:right;"| ' .. Num.round(spAttRow.chance, 2, 0) .. '%') | ||
end | end | ||
if firstRow.descType then | if firstRow.descType then | ||
Line 205: | Line 211: | ||
spAttDesc = spAttDesc..'<br/>(' | spAttDesc = spAttDesc..'<br/>(' | ||
local spAttDuration = spAttInterval * (spAtt.attackCount - 1) | local spAttDuration = spAttInterval * (spAtt.attackCount - 1) | ||
spAttDesc = spAttDesc.. | spAttDesc = spAttDesc..Num.round(spAttInterval / 1000, 2, 2)..'s delay between attacks.' | ||
if spAtt.attackCount ~= nil and spAtt.attackCount > 2 then | if spAtt.attackCount ~= nil and spAtt.attackCount > 2 then | ||
spAttDesc = spAttDesc..' '.. | spAttDesc = spAttDesc..' '..Num.round(spAttDuration / 1000, 2, 2)..'s total duration' | ||
end | end | ||
spAttDesc = spAttDesc..')' | spAttDesc = spAttDesc..')' | ||
Line 217: | Line 223: | ||
return table.concat(resultPart) | return table.concat(resultPart) | ||
--]==] | |||
end | end | ||
Line 251: | Line 258: | ||
-- Generates a table showing the damage/DR multipliers for each combat triangle | -- Generates a table showing the damage/DR multipliers for each combat triangle | ||
function p.getCombatTriangleTable() | function p.getCombatTriangleTable() | ||
local triangleAttributes = { | -- TODO needs fixing for V1.3 | ||
return '' | |||
--[==[local triangleAttributes = { | |||
{ | { | ||
["name"] = 'damageModifier', | ["name"] = 'damageModifier', | ||
Line 321: | Line 330: | ||
table.insert(resultPart, '\r\n|}') | table.insert(resultPart, '\r\n|}') | ||
return table.concat(resultPart) | return table.concat(resultPart) | ||
--]==] | |||
end | end | ||
return p | return p |
edits