Skip to content

Commit

Permalink
Ratings onder 8 met een geheel getal met 0.5 verhogen
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter Bas Hofstede committed Apr 25, 2012
1 parent 6a695e7 commit e43d981
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
24 changes: 24 additions & 0 deletions uHTPredictor.pas
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,30 @@ function SavePlayersToMemDataSet(aExcelSheet: TExcelFunctions; aPlayerDataSet: T
end;
end;

if (aPlayerDataSet.Fields[j].FieldName = 'VORM') or
(aPlayerDataSet.Fields[j].FieldName = 'CONDITIE') or
(aPlayerDataSet.Fields[j].FieldName = 'KEEPEN') or
(aPlayerDataSet.Fields[j].FieldName = 'VERDEDIGEN') or
(aPlayerDataSet.Fields[j].FieldName = 'POSITIESPEL') or
(aPlayerDataSet.Fields[j].FieldName = 'VLEUGELSPEL') or
(aPlayerDataSet.Fields[j].FieldName = 'PASSEN') or
(aPlayerDataSet.Fields[j].FieldName = 'SCOREN') or
(aPlayerDataSet.Fields[j].FieldName = 'SPELHERVATTEN') or
(aPlayerDataSet.Fields[j].FieldName = 'ERVARING') or
(aPlayerDataSet.Fields[j].FieldName = 'LOYALITEIT') then
begin
if uBibConv.AnyStrToInt(vValue) > 0 then
begin
if (Floor(vValue) = vValue) and
((vValue < 8) or
(((aPlayerDataSet.Fields[j].FieldName = 'ERVARING') or
(aPlayerDataSet.Fields[j].FieldName = 'LOYALITEIT')) and
(vValue < 20))) then
begin
vValue := vValue + 0.5;
end;
end;
end;
aPlayerDataSet.Fields[j].Value := vValue;
end;
end;
Expand Down
3 changes: 2 additions & 1 deletion uOpstelling.pas
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ function TOpstelling.VerrekenTypeCoach(aRating: double; aVerdediging: boolean):
function TOpstelling.VerwerkTS(aRating: double): double;
begin
//Result := aRating * Power((FTS - 0.5) * 0.2, 0.417779); //MMM
Result := aRating * Power((FTS - 0.5) * 0.147832, 0.417779); //HO
//Result := aRating * Power((FTS - 0.5) * 0.147832, 0.417779); //HO
Result := aRating * Power((FTS - 1) * 0.147832, 0.417779);
end;

procedure TOpstelling.ZetPlayerIDOpPositie(aPlayerID: integer; aPositie: TPlayerPosition; aPlayerOrder: TPlayerOrder);
Expand Down
4 changes: 2 additions & 2 deletions uPlayer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ function TPlayer.GetConditieFactor: double;
-----------------------------------------------------------------------------}
function TPlayer.GetXPFactor: double;
begin
//formule MMM / HAG / HO Result := (0.0716 * Power(FXP - 0.5, 0.5)) + 1;
//formule MMM / HAG / HO Result := (0.0716 * Power(FXP - 1, 0.5)) + 1;
//formule Schumi Result := (Max(Power(FXP - 0.5, 0.43), 0) + 14) / 14;
Result := (0.0716 * Power(FXP - 0.5, 0.5)) + 1;
Result := (0.0716 * Power(FXP - 1, 0.5)) + 1;
end;

{-----------------------------------------------------------------------------
Expand Down

0 comments on commit e43d981

Please sign in to comment.