Files
Vocaluxe/PartyModes/PartyModePartnerSwap/CPartyScreenPartnerSwapNames.cs
McSchneidarandFlorian Ostertag 3bdf22c870 New party mode: Partner Swap (#915)
* Add partner swap party mode

A new party mode for 3 to 12 players that only needs 2 microphones. Everyone plays for themselves, but always sings together with a partner. Both singers get the score of the pair, and the partners change every round.

- In each round every player sings once, with a partner they haven't sung with yet; with an odd number of players someone takes a break, in turns
- Ranking by the average score per song, so breaks are no disadvantage
- Optional harmony bonus of 500 points when both singers are no more than 500 points apart
- Duet songs are sung with both voices; duets can be mixed in, used exclusively or left out
- Up to 3 jokers per player to skip a song
- The best pair is shown all the time, and the winner and the best pair of the night are celebrated at the end

* Rename the harmony bonus points constant to avoid shadowing

---------

Co-authored-by: Florian Ostertag <flokuep@users.noreply.github.com>
2026-10-18 08:20:24 +02:00

74 lines
2.1 KiB
C#

#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.PartnerSwap
{
public class CPartyScreenPartnerSwapNames : CMenuPartyNameSelection
{
protected override int _ScreenVersion
{
get { return 1; }
}
private new CPartyModePartnerSwap _PartyMode;
public override void Init()
{
base.Init();
_PartyMode = (CPartyModePartnerSwap)base._PartyMode;
_AllowChangePlayerNum = false;
_Teams = false;
}
public override void OnShow()
{
base.OnShow();
SetPartyModeData(_PartyMode.GameData.NumPlayer);
while (_PartyMode.GameData.ProfileIds.Count > _NumPlayer)
{
_PartyMode.GameData.ProfileIds.RemoveAt(_PartyMode.GameData.ProfileIds.Count - 1);
}
var ids = new List<Guid>[] { _PartyMode.GameData.ProfileIds };
SetPartyModeProfiles(ids);
}
public override void Back()
{
if (_TeamList.Length == 1)
{
_PartyMode.GameData.ProfileIds = _TeamList[0];
}
_PartyMode.Back();
}
public override void Next()
{
if (_TeamList.Length == 1)
{
_PartyMode.GameData.ProfileIds = _TeamList[0];
}
_PartyMode.Next();
}
}
}