1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Fixed issue where pick order was following ban order structure

This commit is contained in:
Rodrigo Pina 2023-11-29 11:31:15 +00:00
parent 60d6c0fe53
commit a33a4c4d1d

View File

@ -155,10 +155,14 @@ namespace osu.Game.Tournament.Screens.MapPool
var previousBan = CurrentMatch.Value.PicksBans.LastOrDefault()?.Team ?? roll_winner;
var nextColour = (CurrentMatch.Value.PicksBans.Count() >= 2 ? CurrentMatch.Value.PicksBans[^2]?.Team : previousBan) == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
var nextColour = previousBan == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
bool hasAllBans = CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) >= totalBansRequired;
if (!hasAllBans)
// If it's the third ban or later, we need to check if it's the team's first or second ban in a row
nextColour = (CurrentMatch.Value.PicksBans.Count() >= 2 ? CurrentMatch.Value.PicksBans[^2]?.Team : previousBan) == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
if (hasAllBans && pickType == ChoiceType.Ban)
{
// When switching from bans to picks, we don't rotate the team colour.