16,985
edits
(Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling) |
(Partial fix following 1.0.3 data structure changes) |
||
Line 20: | Line 20: | ||
result = result..'!!Discovered in' | result = result..'!!Discovered in' | ||
local Familiars = | local Familiars = {} | ||
table.sort(Familiars, function(a, b) | for i, recipe in ipairs(SkillData.Summoning.Marks) do | ||
if a. | table.insert(Familiars, recipe) | ||
return a. | end | ||
table.sort(Familiars, function(a, b) | |||
if a.level == b.level then | |||
return a.masteryID < b.masteryID | |||
else | else | ||
return a. | return a.level < b.level | ||
end | end | ||
end) | end) | ||
local rowArray = {} | local rowArray = {} | ||
for i, Fam in ipairs(Familiars) do | |||
for i, Fam in | local item = Items.getItemByID(Fam.itemID) | ||
if item ~= nil then | |||
local rowText = '|-' | |||
rowText = rowText..'\r\n|data-sort-value="'..item.name..'"|'..Icons.Icon({item.name, type='mark', notext=true, size='50'}) | |||
rowText = rowText..'||'..Icons.Icon({item.name, 'Mark of the ' .. item.name, type='mark', noicon=true}) | |||
rowText = rowText..'||style="text-align:right"|'..Fam.level | |||
local discoveredArray = {} | |||
for j, SkillID in Shared.skpairs(Fam.skills) do | |||
table.insert(discoveredArray, Icons.Icon({Constants.getSkillName(SkillID), type='skill'})) | |||
end | |||
rowText = rowText..'||'..table.concat(discoveredArray, '<br/>') | |||
table.insert(rowArray, rowText) | |||
end | |||
end | end | ||
Line 57: | Line 62: | ||
result = result..'!!Tier!!Effect!!' .. Icons.Icon({'Melee', notext=true, nolink=true}) .. ' Max Hit!!Description!!Shard Cost!!Secondary!!Creation XP' | result = result..'!!Tier!!Effect!!' .. Icons.Icon({'Melee', notext=true, nolink=true}) .. ' Max Hit!!Description!!Shard Cost!!Secondary!!Creation XP' | ||
local Familiars = | local Familiars = {} | ||
table.sort(Familiars, function(a, b) | for i, recipe in ipairs(SkillData.Summoning.Marks) do | ||
if a. | table.insert(Familiars, recipe) | ||
return a. | end | ||
table.sort(Familiars, function(a, b) | |||
if a.level == b.level then | |||
return a.masteryID < b.masteryID | |||
else | else | ||
return a. | return a.level < b.level | ||
end | end | ||
end) | end) | ||
local rowArray = {} | local rowArray = {} | ||
for i, Fam in ipairs(Familiars) do | |||
local item = Items.getItemByID(Fam.itemID) | |||
if item ~= nil then | |||
local maxHit, maxHitText = Items._getItemStat(item, 'summoningMaxhit'), '' | |||
if maxHit ~= nil then | |||
maxHit = maxHit * 10 | |||
maxHitText = 'style="text-align:right"; data-sort-value="' .. maxHit .. '"|' .. Shared.formatnum(maxHit) | |||
end | |||
local rowText = '|-' | |||
rowText = rowText..'\r\n|data-sort-value="'..item.name..'"|'..Icons.Icon({item.name, type='item', notext=true, size='50'}) | |||
rowText = rowText..'||'..Icons.Icon({item.name, type='item', noicon=true}) | |||
rowText = rowText..'||style="text-align:right"|'..Fam.level | |||
rowText = rowText..'||style="text-align:right"|'..Fam.tier | |||
rowText = rowText..'||'..item.description..'||'..maxHitText..'||'..Fam.description | |||
-- Create item requirements text | |||
local ShardCostArray, OtherCostArray = {}, {} | |||
-- Shards | |||
for j, cost in ipairs(Fam.itemCosts) do | |||
local shard = Items.getItemByID(cost.id) | |||
if shard ~= nil then | |||
table.insert(ShardCostArray, Icons.Icon({shard.name, type='item', notext=true, qty=cost.qty})) | |||
end | |||
end | |||
rowText = rowText..'||style="text-align:right"|'..table.concat(ShardCostArray, ', ')..' ' | |||
-- Other costs | |||
local recipeGPCost = SkillData.Summoning.RecipeGPCost | |||
if Fam.gpCost > 0 then | |||
table.insert(OtherCostArray, Icons.GP(Fam.gpCost)) | |||
end | |||
if Fam.scCost > 0 then | |||
table.insert(OtherCostArray, Icons.SC(Fam.scCost)) | |||
end | |||
for j, nonShardID in ipairs(Fam.nonShardItemCosts) do | |||
local nonShard = Items.getItemByID(nonShardID) | |||
if nonShard ~= nil then | |||
local itemValue = math.max(item.sellsFor, 20) | |||
local nonShardQty = math.max(1, math.floor(recipeGPCost / itemValue)) | |||
table.insert(OtherCostArray, Icons.Icon({nonShard.name, type='item', notext=true, qty=nonShardQty})) | |||
end | |||
end | |||
rowText = rowText..'||style="text-align:right"|'..table.concat(OtherCostArray, "<br/>'''OR''' ") | |||
rowText = rowText..'||style="text-align:right"|'..Fam.baseXP | |||
table.insert(rowArray, rowText) | |||
end | |||
end | end | ||
Line 129: | Line 131: | ||
end | end | ||
function p.getSynergyTable(frame) | |||
return '' | |||
end | |||
function p.getFamiliarSynergyTable(frame) | |||
return '' | |||
end | |||
function p.getSkillSummoningBonusTable(frame) | |||
return '' | |||
end | |||
--[==[ | |||
function p.getSynergyTable(frame) | function p.getSynergyTable(frame) | ||
local result = '' | local result = '' | ||
Line 161: | Line 176: | ||
rowText = rowText..'||data-sort-value="'..reqLvl..'"|'..table.concat(reqArray, '<br/>') | rowText = rowText..'||data-sort-value="'..reqLvl..'"|'..table.concat(reqArray, '<br/>') | ||
table.insert(rowArray, rowText) | table.insert(rowArray, rowText) | ||
end | end | ||
Line 205: | Line 220: | ||
rowText = rowText..'||data-sort-value="'..reqLvl..'"|'..table.concat(reqArray, '<br/>') | rowText = rowText..'||data-sort-value="'..reqLvl..'"|'..table.concat(reqArray, '<br/>') | ||
table.insert(rowArray, rowText) | table.insert(rowArray, rowText) | ||
end | end | ||
Line 291: | Line 306: | ||
return p._getSkillSummoningBonusTable(skillName) | return p._getSkillSummoningBonusTable(skillName) | ||
end | end | ||
--]==] | |||
return p | return p |