Editing Module:StreetBrawlItemsGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 229: | Line 229: | ||
end | end | ||
return tostring(tbl) | return tostring(tbl) | ||
end | |||
-- TEMPORARY: report the largest favored / unfavored group across released heroes. | |||
function p.debug_counts(frame) | |||
local maxfav, favwho = 0, "" | |||
local maxunf, unfwho = 0, "" | |||
for hkey in pairs(RELEASED) do | |||
local favored, unfavored = hero_sets(hkey) | |||
for tier = 1, 5 do | |||
local fc, uc = 0, 0 | |||
for _, c in ipairs(sb.AvailableItems) do | |||
if iok(c) and itier(c) == tier then | |||
if favored[c] then fc = fc + 1 end | |||
if unfavored[c] then uc = uc + 1 end | |||
end | |||
end | |||
if fc > maxfav then maxfav = fc; favwho = (KEY_TO_NAME[hkey] or hkey) .. " T" .. tier end | |||
if uc > maxunf then maxunf = uc; unfwho = (KEY_TO_NAME[hkey] or hkey) .. " T" .. tier end | |||
end | |||
end | |||
return "maxFavored=" .. maxfav .. " (" .. favwho .. "); maxUnfavored=" .. maxunf .. " (" .. unfwho .. ")" | |||
end | end | ||
return p | return p | ||