Module:Magic: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 695: Line 695:


--1/4/22: haha just kidding. Now we're also getting delay between attacks for spells with special attacks
--1/4/22: haha just kidding. Now we're also getting delay between attacks for spells with special attacks
local spAttID = spell.specialAttackID or spell.specialAttack
--25/06/2024: I accidentally fixed this with a refactor and it messes up the table because it has been broken for a long time.
if spAttID ~= nil then
--       So I commented it out.
local spAtt = Attacks.getAttackByID(spAttID)
--local spAttID = spell.specialAttackID or spell.specialAttack
local interval = spAtt.attackInterval
--if spAttID ~= nil then
local hits = spAtt.attackCount ~= nil and spAtt.attackCount or 1
-- local spAtt = Attacks.getAttackByID(spAttID)
if interval ~= nil and hits > 1 then
-- local interval = spAtt.attackInterval
local intervalTable = {}
-- local hits = spAtt.attackCount ~= nil and spAtt.attackCount or 1
table.insert(intervalTable, '<br/>(' .. Shared.round(interval / 1000, 2, 2) .. 's delay between attacks.')
-- if interval ~= nil and hits > 1 then
if hits > 2 then
-- local intervalTable = {}
table.insert(intervalTable, ' ' .. Shared.round(interval * (hits - 1) / 1000, 2, 2) .. 's total duration.')
-- table.insert(intervalTable, '<br/>(' .. Shared.round(interval / 1000, 2, 2) .. 's delay between attacks.')
end
-- if hits > 2 then
table.insert(intervalTable, ')')
-- table.insert(intervalTable, ' ' .. Shared.round(interval * (hits - 1) / 1000, 2, 2) .. 's total duration.')
row:tag('td'):wikitext(table.concat(intervalTable))
-- end
end
-- table.insert(intervalTable, ')')
end
-- row:tag('td'):wikitext(table.concat(intervalTable))
-- end
--end
if includeExperience then
if includeExperience then
local xp = spell.baseExperience
local xp = spell.baseExperience
2,875

edits