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 6 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!
through implementation of hjpalpha's suggested changes, this increasingly complicated minor change is finally in a good state
i've never seen this in lua before so i'm just gonna hope it works this way
|
|
||
| ---@param mapIndex integer | ||
| ---@param bans boolean | ||
| ---@param bans number? |
There was a problem hiding this comment.
since we use it for the range it has to be an integer
| ---@param bans number? | |
| ---@param bans integer |
| function WikiCopyPaste.getMatchCode(bestof, mode, index, opponents, args) | ||
| local showScore = Logic.nilOr(Logic.readBoolOrNil, bestof == 0) | ||
| local bans = Logic.readBool(args.bans) | ||
| local bans = tonumber(args.bans) |
There was a problem hiding this comment.
| local bans = tonumber(args.bans) | |
| local bans = tonumber(args.bans) or 0 |
use this instead so the linter shuts up
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.