Module:Skills: Difference between revisions

no edit summary
(_getConstellationModifiers: Adjust output to include keys modifiers/enemyModifiers, enabling differentation between player & enemy modifiers)
No edit summary
Line 24: Line 24:
local Items = require('Module:Items')
local Items = require('Module:Items')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
local Num = require('Module:Number')


-- Given a skill ID, returns the key for that skill's recipe data.
-- Given a skill ID, returns the key for that skill's recipe data.
Line 98: Line 99:
end
end
if recipe.totalMasteryRequired ~= nil then
if recipe.totalMasteryRequired ~= nil then
table.insert(reqText, Shared.formatnum(recipe.totalMasteryRequired) .. ' ' .. Icons.Icon({skillName, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'}))
table.insert(reqText, Num.formatnum(recipe.totalMasteryRequired) .. ' ' .. Icons.Icon({skillName, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'}))
end
end
local reqsData = {}
local reqsData = {}
Line 392: Line 393:
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..chkPercent..'%||'
result = result..'\r\n|'..chkPercent..'%||'
result = result..Shared.formatnum(math.floor(totalPoolXP * chkPercent / 100))..' xp||'..chkDesc
result = result..Num.formatnum(math.floor(totalPoolXP * chkPercent / 100))..' xp||'..chkDesc
end
end
end
end
result = result..'\r\n|-\r\n!colspan="2"|Total Mastery Pool XP'
result = result..'\r\n|-\r\n!colspan="2"|Total Mastery Pool XP'
result = result..'\r\n|'..Shared.formatnum(totalPoolXP)
result = result..'\r\n|'..Num.formatnum(totalPoolXP)
result = result..'\r\n|}'
result = result..'\r\n|}'
return result
return result
Line 481: Line 482:
denomCCI = Shared.round(baseTokenChance / (actCount * (1 + CCI.modifiers.offItemChance / 100)), 0, 0)
denomCCI = Shared.round(baseTokenChance / (actCount * (1 + CCI.modifiers.offItemChance / 100)), 0, 0)
end
end
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. denom .. '"|1/' .. Shared.formatnum(denom))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. denom .. '"|1/' .. Num.formatnum(denom))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. denomCCI .. '"|1/' .. Shared.formatnum(denomCCI))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. denomCCI .. '"|1/' .. Num.formatnum(denomCCI))
end
end
end
end
Line 554: Line 555:
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="' .. level .. '"|'..reqText)
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="' .. level .. '"|'..reqText)
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..burnTime..'"|'..Shared.timeString(burnTime, true))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..burnTime..'"|'..Shared.timeString(burnTime, true))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="' .. baseXP .. '"| ' .. Shared.formatnum(baseXP))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="' .. baseXP .. '"| ' .. Num.formatnum(baseXP))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS..'"|'..Shared.formatnum(Shared.round(XPS, 2, 2)))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS..'"|'..Num.formatnum(Num.round(XPS, 2, 2)))
if bonfireBonus == 0 then
if bonfireBonus == 0 then
table.insert(resultPart, '||colspan="4" class="table-na"| N/A ')
table.insert(resultPart, '||colspan="4" class="table-na"| N/A ')
else
else
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="' .. XP_BF .. '"| ' .. Shared.formatnum(XP_BF))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="' .. XP_BF .. '"| ' .. Num.formatnum(XP_BF))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS_BF..'"|'..Shared.formatnum(XPS_BF, 2, 2))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS_BF..'"|'..Num.formatnum(XPS_BF, 2, 2))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..bonfireBonus..'"|'..bonfireBonus..'%')
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..bonfireBonus..'"|'..bonfireBonus..'%')
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..bonfireTime..'"|'..Shared.timeString(bonfireTime, true))
table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..bonfireTime..'"|'..Shared.timeString(bonfireTime, true))
2,875

edits