Skip to content

feat(match2): reduce number of bans generated in deadlock copypaste - #8027

Open
Corsaka wants to merge 3 commits into
Liquipedia:mainfrom
Corsaka:patch-1
Open

feat(match2): reduce number of bans generated in deadlock copypaste#8027
Corsaka wants to merge 3 commits into
Liquipedia:mainfrom
Corsaka:patch-1

Conversation

@Corsaka

@Corsaka Corsaka commented Aug 31, 2026

Copy link
Copy Markdown

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.

By default, deadlock drafting only has 2 bans (and rarely, 3). 6 is excessive by default.
@Corsaka
Corsaka requested review from a team as code owners August 31, 2026 09:27
@ElectricalBoy ElectricalBoy changed the title Reduce ban size to 2 feat(match2): reduce number of bans generated in deadlock copypaste Sep 1, 2026

@ElectricalBoy ElectricalBoy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@Corsaka

Corsaka commented Sep 1, 2026

Copy link
Copy Markdown
Author

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 hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" --> '
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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
banBool and (INDENT .. INDENT .. ban2Text) or nil,
bans(2),

ban1Text = ban1Text .. "|t1b" .. ban .. "="
ban2Text = ban2Text .. "|t2b" .. ban .. "="
end
end

@hjpalpha hjpalpha Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants