Module:Mazunki/Dungeons: Difference between revisions
From Melvor Idle
mNo edit summary |
mNo edit summary |
||
Line 29: | Line 29: | ||
result = result..'||'..Monsters._getMonsterCombatLevel(boss) | result = result..'||'..Monsters._getMonsterCombatLevel(boss) | ||
result = result..'||'..pm.getDungeonTotalHP(dung) | result = result..'||'..pm.getDungeonTotalHP(dung) | ||
result = result..'||'.. | result = result..'||'..pm.getDungeonMinDR(dung) | ||
result = result..'||'..p._getDungeonRewards(dung, false) | result = result..'||'..p._getDungeonRewards(dung, false) | ||
Line 45: | Line 45: | ||
function pm.getDungeonTotalHP(frame) | function pm.getDungeonTotalHP(frame) | ||
return "N/A" | |||
end | |||
function pm.getDungeonMinDR(frame) | |||
return "N/A" | return "N/A" | ||
end | end | ||
return pm | return pm |
Revision as of 14:17, 13 April 2022
Documentation for this module may be created at Module:Mazunki/Dungeons/doc
local p = require("Module:CombatAreas/AreaTables")
local pm = {}
local AreaData = mw.loadData('Module:CombatAreas/data')
local Constants = require('Module:Constants')
local Shared = require('Module:Shared')
local Icons = require('Module:Icons')
local Items = require('Module:Items')
local Monsters = require('Module:Monsters')
local CombatAreas = require('Module:CombatAreas')
local Pets = require('Module:Pets')
function pm.getDungeonTable(frame)
local result = '{| class="wikitable sortable stickyHeader"'
result = result..'\r\n|-class="headerRow-0"'
result = result..'\r\n!Icon!!Dungeon!!Monsters!!Boss Level!!Total HP!!Min. DR!!Reward(s)!!Boss Pet'
for i, dungIdx in ipairs(AreaData.displayOrder.dungeons) do
local dung = CombatAreas.getAreaByID('dungeon', dungIdx)
result = result..'\r\n|-'
result = result..'\r\n|data-sort-value="'..dung.name..'"|'..Icons.Icon({dung.name, type='dungeon', size='50', notext=true})
result = result..'||'..Icons.Icon({dung.name, type='dungeon', noicon=true})
result = result..'||'..Shared.tableCount(dung.monsters)
local boss = Monsters.getMonsterByID(dung.monsters[Shared.tableCount(dung.monsters)])
result = result..'||'..Monsters._getMonsterCombatLevel(boss)
result = result..'||'..pm.getDungeonTotalHP(dung)
result = result..'||'..pm.getDungeonMinDR(dung)
result = result..'||'..p._getDungeonRewards(dung, false)
if dung.petID ~= nil then
local pet = Pets.getPetByID(dung.petID)
result = result..'||data-sort-value="'..pet.name..'"|'..Icons.Icon({pet.name, type='pet'})
else
result = result..'|| '
end
end
result = result..'\r\n|}'
return result
end
function pm.getDungeonTotalHP(frame)
return "N/A"
end
function pm.getDungeonMinDR(frame)
return "N/A"
end
return pm