2,873
edits
(Update for v1.3) |
No edit summary |
||
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) | ||
Line 200: | 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 210: | 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..')' |
edits