feat(match2): reduce number of bans generated in deadlock copypaste - #8027
feat(match2): reduce number of bans generated in deadlock copypaste#8027Corsaka wants to merge 3 commits into
Conversation
By default, deadlock drafting only has 2 bans (and rarely, 3). 6 is excessive by default.
ElectricalBoy
left a comment
There was a problem hiding this comment.
By default, deadlock drafting only has 2 bans (and rarely, 3)
if there are valid cases that need 3 bans, then why not make it configurable with user input?
|
i somehow pinged myself in my own commit message. note to self to bite the bullet and clone the git repo in future Implemented suggested changes with a lightly hacky solution, tested at my sandbox. Form:BracketCopyPaste will need to be updated if merged, since the parameter is changing from a boolean to an integer. |
hjpalpha
left a comment
There was a problem hiding this comment.
" --> '
don't define globals!
| INDENT .. INDENT .. '|team1side=', | ||
| INDENT .. INDENT .. '|t1h1=|t1h2=|t1h3=|t1h4=|t1h5=|t1h6=', | ||
| bans and (INDENT .. INDENT .. '|t1b1=|t1b2=|t1b3=|t1b4=|t1b5=|t1b6=') or nil, | ||
| banBool and (INDENT .. INDENT .. ban1Text) or nil, |
There was a problem hiding this comment.
| banBool and (INDENT .. INDENT .. ban1Text) or nil, | |
| bans(1), |
| INDENT .. INDENT .. '|team2side=', | ||
| INDENT .. INDENT .. '|t2h1=|t2h2=|t2h3=|t2h4=|t2h5=|t2h6=', | ||
| bans and (INDENT .. INDENT .. '|t2b1=|t2b2=|t2b3=|t2b4=|t2b5=|t2b6=') or nil, | ||
| banBool and (INDENT .. INDENT .. ban2Text) or nil, |
There was a problem hiding this comment.
| banBool and (INDENT .. INDENT .. ban2Text) or nil, | |
| bans(2), |
| ban1Text = ban1Text .. "|t1b" .. ban .. "=" | ||
| ban2Text = ban2Text .. "|t2b" .. ban .. "=" | ||
| end | ||
| end |
There was a problem hiding this comment.
kick the stuff you added here and rather use something like this
---@param opponentIndex integer
---@return string?
local bans = function(opponentIndex)
if bans <= 0 then
return
end
return INDENT .. INDENT .. table.concat(Array.mapRange(1, bans, function(banIndex)
return '|t' .. opponentIndex .. 'b' .. banIndex .. '='
end))
end
Summary
By default, deadlock drafting only has 2 bans (and rarely, 3). 6 is excessive and I've changed that here.
How did you test this change?
I implemented the custom code at .../wiki/dev/corsaka. I ran this edited BracketCopyPaste at my sandbox via
{{GetBracketCopyPaste|dev=corsaka|...}}. The results correctly show only two bans.