Module:StreetBrawlItems: Difference between revisionsGive feedback
p.tier: support style=icon|card, size, theme class, Middle-chance label (with help from vergir-bot LLM) |
Default card size to 0.875 so counter cards match the tier columns (with help from vergir-bot LLM) |
||
| Line 7: | Line 7: | ||
-- Slot display order: Weapon -> Vitality (Armor) -> Spirit (Tech) | -- Slot display order: Weapon -> Vitality (Armor) -> Spirit (Tech) | ||
local SLOT_RANK = { Weapon = 1, Armor = 2, Tech = 3 } | local SLOT_RANK = { Weapon = 1, Armor = 2, Tech = 3 } | ||
-- | -- Default card scale passed to ItemBox (tier columns and counter cards). | ||
local CARD_SIZE = "0. | local CARD_SIZE = "0.875" | ||
local NAME_TO_KEY, KEY_TO_NAME, RELEASED = {}, {}, {} | local NAME_TO_KEY, KEY_TO_NAME, RELEASED = {}, {}, {} | ||
| Line 97: | Line 97: | ||
-- {{#invoke:StreetBrawlItems|hero|HERO|GROUP|TIER|label=..|collapse=yes|style=card|icon}} | -- {{#invoke:StreetBrawlItems|hero|HERO|GROUP|TIER|label=..|collapse=yes|style=card|icon}} | ||
-- GROUP = favored | unfavored | common (use hero_counter for counters) | -- GROUP = favored | unfavored | common (use hero_counter for counters) | ||
-- Legacy: superseded by p.tier, kept for reference. | |||
function p.hero(frame) | function p.hero(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 124: | Line 125: | ||
if collapse then | if collapse then | ||
local id = "sbcommon-" .. hkey .. "-" .. tostring(tier or 0) | local id = "sbcommon-" .. hkey .. "-" .. tostring(tier or 0) | ||
local head = (label ~= "" and label) or "Common" | local head = (label ~= "" and label) or "Common" | ||