Module:StreetBrawlItems: Difference between revisionsGive feedback
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) |
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: | -- Renders one tier as three columns: High chance (favored), Middle chance | ||
-- ( | -- (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 .. '">' | ||
.. 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>' | .. '</div>' | ||
end | end | ||