diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-05-22 13:03:35 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-05-22 13:03:35 +0000 |
commit | a93c26232ea1b01259cd045cc11eb43eb40a0273 (patch) | |
tree | 2b833a624f4d205bca1cbd54598be25da087bde8 /Game/Code/Classes/UPartyM2.pas | |
parent | 0c9e08b24bea976fd0bb1fa537d16ad7c224172a (diff) | |
download | usdx-a93c26232ea1b01259cd045cc11eb43eb40a0273.tar.gz usdx-a93c26232ea1b01259cd045cc11eb43eb40a0273.tar.xz usdx-a93c26232ea1b01259cd045cc11eb43eb40a0273.zip |
added duel-ratio-option (normal, 10%-90%) for challenge mode. the plugins are nice but in challenge mode the normal duel-mode is more important.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2394 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UPartyM2.pas')
-rw-r--r-- | Game/Code/Classes/UPartyM2.pas | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Game/Code/Classes/UPartyM2.pas b/Game/Code/Classes/UPartyM2.pas index ccf3bf7f..8c572610 100644 --- a/Game/Code/Classes/UPartyM2.pas +++ b/Game/Code/Classes/UPartyM2.pas @@ -62,6 +62,7 @@ type Teams: TTeamInfo;
Order: PlayerOrderArray;
Option_Plugins: boolean;
+ ID_DUELL: Byte;
constructor Create;
procedure GenScores;
@@ -86,6 +87,7 @@ uses UGraphic,
ULanguage,
UMain,
+ UIni,
Math,
ULog;
@@ -261,6 +263,7 @@ var max_played: integer;
max_flag: boolean;
must_sing: integer;
+ DuelRatioFactor: integer;
//debug
rn: array of TRN;
@@ -445,6 +448,23 @@ begin //Set rounds
if (Length(Plugins) >= 1) then
begin
+ //set DuelRatioFactor
+ DuelRatioFactor := Round((Ini.DuelRatio*Length(Plugins)-10)/(10-Ini.DuelRatio));
+
+ for I := 0 to Length(Plugins) - 1 do
+ begin
+ if (Plugins[I].ID = ID_DUELL) and
+ not Plugins[I].Medley and not Plugins[I].MedleySurprise then
+ begin
+ for K := 1 to DuelRatioFactor do
+ begin
+ len := Length(Plugins);
+ SetLength(Plugins, len+1);
+ Plugins[len] := Plugins[I];
+ end;
+ end;
+ end;
+
for I := 0 to NumRounds - 1 do
begin
SetLength (Rounds, I+1);
|