Files
Vocaluxe/PartyModes/PartyModePartnerSwap/CPartyScreenPartnerSwapSongs.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

66 lines
1.8 KiB
C#

using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.PartnerSwap
{
class CPartyScreenPartnerSwapSongs : CMenuPartySongSelection
{
protected override int _ScreenVersion
{
get { return 1; }
}
private new CPartyModePartnerSwap _PartyMode;
public override void Init()
{
base.Init();
_PartyMode = (CPartyModePartnerSwap)base._PartyMode;
}
public override void OnShow()
{
Source = _PartyMode.GameData.SongSource;
Sorting = _PartyMode.GameData.Sorting;
Category = _PartyMode.GameData.CategoryIndex;
Playlist = _PartyMode.GameData.PlaylistId;
SongMode = _PartyMode.GameData.GameMode;
NumMedleySongs = _PartyMode.GameData.NumMedleySongs;
base.OnShow();
}
public override void Back()
{
_SaveConfig();
_PartyMode.Back();
}
public override void Next()
{
_SaveConfig();
_PartyMode.Next();
}
public override bool UpdateGame()
{
return true;
}
protected override void _SetAllowedOptions()
{
base._SetAllowedOptions();
AllowedSongModes = new EGameMode[] { EGameMode.TR_GAMEMODE_NORMAL, EGameMode.TR_GAMEMODE_SHORTSONG, EGameMode.TR_GAMEMODE_MEDLEY };
}
private void _SaveConfig()
{
_PartyMode.GameData.SongSource = Source;
_PartyMode.GameData.Sorting = Sorting;
_PartyMode.GameData.CategoryIndex = Category;
_PartyMode.GameData.PlaylistId = Playlist;
_PartyMode.GameData.GameMode = SongMode;
_PartyMode.GameData.NumMedleySongs = NumMedleySongs;
}
}
}