diff --git a/Output/PartyModes/Challenge.xml b/Output/PartyModes/Challenge.xml
index 77bf84e2..964a589e 100644
--- a/Output/PartyModes/Challenge.xml
+++ b/Output/PartyModes/Challenge.xml
@@ -8,7 +8,7 @@
Challenge
CPartyModeChallenge
0
- 2
+ 3
TR_PARTYMODE_AUDIENCE
diff --git a/Output/PartyModes/Challenge/Languages/English.xml b/Output/PartyModes/Challenge/Languages/English.xml
index 5be99eff..3907bf70 100644
--- a/Output/PartyModes/Challenge/Languages/English.xml
+++ b/Output/PartyModes/Challenge/Languages/English.xml
@@ -16,6 +16,7 @@
Number of mics
Number of rounds
Number of jokers
+ Refill jokers every round
Challenge Mode: Choose Player
Select random
Challenge Mode: Overview
diff --git a/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeConfig.xml b/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeConfig.xml
index 5254ccbb..64e3adad 100644
--- a/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeConfig.xml
+++ b/Output/PartyModes/Challenge/Themes/Default/Screens/PartyScreenChallengeConfig.xml
@@ -2,7 +2,7 @@
PartyScreenChallengeConfig
- 2
+ 3
@@ -96,6 +96,20 @@
Outline
TR_SCREENCONFIG_NUMJOKERS
+
+
+ 75
+ 345
+ 0
+ 27
+ 0
+
+
+ Left
+ Center
+
+ Outline
+ TR_SCREENCONFIG_REFILLJOKERS
@@ -340,6 +354,48 @@
Outline
Bold
10
+
+
+
+ SelectSlideArrowLeft
+ SelectSlideArrowRight
+ SelectSlide
+ SelectSlideArrowLeft
+ SelectSlideArrowRight
+
+ 500
+ 340
+ 700
+ 50
+ 0
+
+
+ 505
+ 345
+ 40
+ 40
+ 0
+
+
+ 1170
+ 345
+ 40
+ 40
+ 0
+
+
+
+
+
+
+
+ 27
+ 50
+ 0
+ 205.33
+ Outline
+ Bold
+ 2
diff --git a/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs b/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs
index b81edd9b..f92f2dea 100644
--- a/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs
+++ b/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs
@@ -114,6 +114,8 @@ namespace VocaluxeLib.PartyModes.Challenge
public int NumPlayerAtOnce;
public int NumRounds;
public int NumJokers;
+ public bool RefillJokers;
+ public int[] Jokers;
public List ProfileIDs;
public CChallengeRounds Rounds;
@@ -148,7 +150,7 @@ namespace VocaluxeLib.PartyModes.Challenge
_ScreenSongOptions.Sorting.SearchActive = false;
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
- GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, NumJokers = 5, CurrentRoundNr = 1, ProfileIDs = new List(), CatSongIndices = null, Results = null};
+ GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, NumJokers = 5, RefillJokers = true, CurrentRoundNr = 1, ProfileIDs = new List(), CatSongIndices = null, Results = null};
}
public override bool Init()
@@ -214,6 +216,7 @@ namespace VocaluxeLib.PartyModes.Challenge
GameData.ResultTable = new List();
GameData.Rounds = new CChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
GameData.CurrentRoundNr = 1;
+ GameData.Jokers = null;
break;
case EStage.Main:
_Stage = EStage.Singing;
@@ -321,6 +324,11 @@ namespace VocaluxeLib.PartyModes.Challenge
if (teamNr >= _ScreenSongOptions.Selection.NumJokers.Length)
return;
+ if (!GameData.RefillJokers)
+ {
+ CRound round = GameData.Rounds[GameData.CurrentRoundNr - 1];
+ GameData.Jokers[round.Players[teamNr]]--;
+ }
_ScreenSongOptions.Selection.NumJokers[teamNr]--;
_ScreenSongOptions.Selection.RandomOnly = true;
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
@@ -375,9 +383,27 @@ namespace VocaluxeLib.PartyModes.Challenge
private void _SetNumJokers()
{
int[] jokers = new int[GameData.NumPlayerAtOnce];
- for (int i = 0; i < jokers.Length; i++)
- jokers[i] = GameData.NumJokers;
-
+ if (GameData.RefillJokers)
+ {
+ for (int i = 0; i < jokers.Length; i++)
+ jokers[i] = GameData.NumJokers;
+ }
+ else
+ {
+ if (GameData.Jokers == null)
+ {
+ GameData.Jokers = new int[GameData.NumPlayer];
+ for (int i = 0; i < GameData.ProfileIDs.Count; i++)
+ {
+ GameData.Jokers[i] = GameData.NumJokers;
+ }
+ }
+ CRound round = GameData.Rounds[GameData.CurrentRoundNr - 1];
+ for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
+ {
+ jokers[i] = GameData.Jokers[round.Players[i]];
+ }
+ }
_ScreenSongOptions.Selection.NumJokers = jokers;
}
diff --git a/PartyModes/PartyModeChallenge/CPartyScreenChallengeConfig.cs b/PartyModes/PartyModeChallenge/CPartyScreenChallengeConfig.cs
index 2b53612f..99cfae4d 100644
--- a/PartyModes/PartyModeChallenge/CPartyScreenChallengeConfig.cs
+++ b/PartyModes/PartyModeChallenge/CPartyScreenChallengeConfig.cs
@@ -27,13 +27,14 @@ namespace VocaluxeLib.PartyModes.Challenge
// Version number for theme files. Increment it, if you've changed something on the theme files!
protected override int _ScreenVersion
{
- get { return 2; }
+ get { return 3; }
}
private const string _SelectSlideNumPlayers = "SelectSlideNumPlayers";
private const string _SelectSlideNumMics = "SelectSlideNumMics";
private const string _SelectSlideNumRounds = "SelectSlideNumRounds";
private const string _SelectSlideNumJokers = "SelectSlideNumJokers";
+ private const string _SelectSlideRefillJokers = "SelectSlideRefillJokers";
private const string _ButtonNext = "ButtonNext";
private const string _ButtonBack = "ButtonBack";
@@ -44,7 +45,7 @@ namespace VocaluxeLib.PartyModes.Challenge
{
base.Init();
- _ThemeSelectSlides = new string[] {_SelectSlideNumPlayers, _SelectSlideNumMics, _SelectSlideNumRounds, _SelectSlideNumJokers};
+ _ThemeSelectSlides = new string[] { _SelectSlideNumPlayers, _SelectSlideNumMics, _SelectSlideNumRounds, _SelectSlideNumJokers, _SelectSlideRefillJokers };
_ThemeButtons = new string[] {_ButtonNext, _ButtonBack};
}
@@ -132,6 +133,12 @@ namespace VocaluxeLib.PartyModes.Challenge
}
_SelectSlides[_SelectSlideNumJokers].SelectedValue = "5";
+ //build joker config slide
+ _SelectSlides[_SelectSlideRefillJokers].Clear();
+ _SelectSlides[_SelectSlideRefillJokers].AddValue(CBase.Language.Translate("TR_BUTTON_NO", PartyModeID));
+ _SelectSlides[_SelectSlideRefillJokers].AddValue(CBase.Language.Translate("TR_BUTTON_YES", PartyModeID));
+ _SelectSlides[_SelectSlideRefillJokers].SelectLastValue();
+
_UpdateMicsAtOnce();
_SetRoundSteps();
_UpdateSlideRounds();
@@ -145,6 +152,7 @@ namespace VocaluxeLib.PartyModes.Challenge
_PartyMode.GameData.NumPlayerAtOnce = _SelectSlides[_SelectSlideNumMics].Selection + _PartyMode.MinPlayers;
_PartyMode.GameData.NumRounds = (_SelectSlides[_SelectSlideNumRounds].Selection + 1) * _RoundSteps;
_PartyMode.GameData.NumJokers = _SelectSlides[_SelectSlideNumJokers].Selection + 1;
+ _PartyMode.GameData.RefillJokers = (_SelectSlides[_SelectSlideRefillJokers].Selection == 1) ? true : false;
_UpdateMicsAtOnce();
_SetRoundSteps();