diff --git a/components/match2/commons/match_group_input.lua b/components/match2/commons/match_group_input.lua index 388530e386..5014fab67d 100644 --- a/components/match2/commons/match_group_input.lua +++ b/components/match2/commons/match_group_input.lua @@ -348,10 +348,12 @@ function MatchGroupInput.applyOverrideArgs(matches, args) end end +---@param matches {match2opponents: table[]}[] +---@return integer function MatchGroupInput.getMaxOpponentCount(matches) return Array.reduce(matches, function(cur, match) return math.max(#match.match2opponents, cur) - end) + end, 0) end ---@param headerInput string?