Module:StreetBrawlItems: Difference between revisions

Jump to navigation Jump to search
p.tier: split into left side (High over Low) and right Middle for the new 35/65 layout (with help from vergir-bot LLM)
Vergir (talk | contribs)
Revert p.tier to three sibling columns (High | Middle | Low) (with help from vergir-bot LLM)
Tag: Manual revert
Line 140: Line 140:


-- {{#invoke:StreetBrawlItems|tier|HERO|TIER|style=icon|card|size=..|theme=..|high=..|middle=..|low=..}}
-- {{#invoke:StreetBrawlItems|tier|HERO|TIER|style=icon|card|size=..|theme=..|high=..|middle=..|low=..}}
-- Renders one tier: a left side stacking High chance (favored, top) over Low chance
-- Renders one tier as three columns: High chance (favored), Middle chance
-- (unfavored, bottom), beside Middle chance (the leftover pool). Empty columns still render.
-- (the leftover pool), Low chance (unfavored). Empty columns still render.
function p.tier(frame)
function p.tier(frame)
local hkey = hero_key(frame.args[1]); if not hkey then return "" end
local hkey = hero_key(frame.args[1]); if not hkey then return "" end
Line 180: Line 180:
if theme ~= "" then cls = cls .. " " .. theme end
if theme ~= "" then cls = cls .. " " .. theme end
return '<div class="' .. cls .. '">'
return '<div class="' .. cls .. '">'
.. '<div class="sb-side">'
.. col(high, "sb-col-high", hi)
.. col(high, "sb-col-high", hi)
.. col(normal, "sb-col-normal", mid)
.. col(low, "sb-col-low", lo)
.. col(low, "sb-col-low", lo)
.. '</div>'
.. col(normal, "sb-col-normal", mid)
.. '</div>'
.. '</div>'
end
end