trusted
167
edits
(Add Proliferator data and comments, correct rtable -> output) |
(Add Dark Fog drop to list of recipes making items) |
||
Line 49: | Line 49: | ||
if isItemOcean(item.ID) then | if isItemOcean(item.ID) then | ||
table.insert(rtable, oceanRow(item, frame)) | table.insert(rtable, oceanRow(item, frame)) | ||
end | |||
if isItemFogDrop(item) then | |||
table.insert(rtable, fogDropRow(item, frame)) | |||
end | end | ||
table.insert(rtable, '|}') | table.insert(rtable, '|}') | ||
Line 287: | Line 290: | ||
end | end | ||
return frame:expandTemplate{title='ItemRecipe', args=gdata} | return frame:expandTemplate{title='ItemRecipe', args=gdata} | ||
end | |||
function fogDropRow(item, frame) | |||
local fogdata = { | |||
Building = 'Raider', | |||
Replicator = 'No', | |||
Recipe = fogDropRecipe(item, frame), | |||
Proliferator = 'No', | |||
} | |||
return '|-\n| ' .. frame:expandTemplate{title='ProductionChain', args=fogdata} | |||
end | |||
function fogDropRecipe(item, frame) | |||
local prob = item.EnemyDropRange.y * 300 | |||
local level = item.EnemyDropLevel * 3 | |||
local dropMin = item.EnemyDropCount * 2 * (item.EnemyDropLevel / 10 + 1) | |||
local dropMax = item.EnemyDropCount * 4 | |||
local fogdata = { | |||
CraftTime = string.format('%.2f%%', prob), | |||
Out1 = item.Name, | |||
Out1Qty = string.format('%.1f-%.1f', dropMin, dropMax), | |||
In1 = 'Raider', | |||
In1Qty = string.format('Lvl %d+', level), | |||
} | |||
return frame:expandTemplate{title='ItemRecipe', args=fogdata} | |||
end | end | ||
Line 398: | Line 426: | ||
end | end | ||
return false | return false | ||
end | |||
function isItemFogDrop(item) | |||
return item.EnemyDropRange.y > 0 | |||
end | end | ||