internal static int tランク値を計算して返す(int nTotal, int nPerfect, int nGreat, int nGood, int nPoor, int nMiss, int nCombo)
{
if (nTotal <= 0)
return (int)ERANK.UNKNOWN;
//int nRank = (int)ERANK.E;
int nAuto = nTotal - (nPerfect + nGreat + nGood + nPoor + nMiss);
if (nTotal <= nAuto)
{
return (int)ERANK.SS;
}
double dRate = ((((100 * nPerfect / nTotal)) * 0.85) + (((100 * nGreat / nTotal)) * 0.35) + ((100 * nCombo / nTotal)) * 0.15);
System.IO.StreamWriter sw = new System.IO.StreamWriter(@"debug.txt", true, System.Text.Encoding.GetEncoding("shift_jis"));
sw.WriteLine("-------------------------------");
sw.WriteLine("dRateの値は{0}です。", dRate);
sw.WriteLine("dbPERFECT率は{0}、dbGREAT率は{1}です。",(nPerfect / nTotal) * 100f, (nGreat / nTotal) * 100f);
sw.WriteLine("nTotalは{0}で、nAutoは{1}です。", nTotal, nAuto);
sw.Close();
if (dRate >= 95)
{
return (int)ERANK.SS;
}
if (dRate >= 80)
{
return (int)ERANK.S;
}
if (dRate >= 73)
{
return (int)ERANK.A;
}
if (dRate >= 63)
{
return (int)ERANK.B;
}
if (dRate >= 53)
{
return (int)ERANK.C;
}
if (dRate >= 45)
{
return (int)ERANK.D;
}
return (int)ERANK.E;
}
internal static int t達成率からランク値を計算して返す(double dbRate)
{
if (dbRate >= 95)
{
return (int)ERANK.SS;
}
if (dbRate >= 80)
{
return (int)ERANK.S;
}
if (dbRate >= 73)
{
return (int)ERANK.A;
}
if (dbRate >= 63)
{
return (int)ERANK.B;
}
if (dbRate >= 53 )
{
return (int)ERANK.C;
}
if (dbRate >= 45)
{
return (int)ERANK.D;
}
return (int)ERANK.E;
}
internal static double tゲーム型スキルを計算して返す(int nLevel, int nTotal, int nPerfect, int nGreat, int nCombo, E楽器パート inst, STAUTOPLAY bAutoPlay)
{
double dbPERFECT率 = (100 * nPerfect / nTotal);
double dbGREAT率 = (100 * nGreat / nTotal);
double dbCOMBO率 = (100 * nCombo / nTotal);
double ret;
double dbRate = (dbPERFECT率 * 0.85 + dbGREAT率 * 0.35 + dbCOMBO率 * 0.15);
if ((nTotal == 0) || ((nPerfect == 0) && (nCombo == 0)))
ret = 0.0;
ret = ((dbRate * (nLevel / 100) * 20));
ret *= dbCalcReviseValForDrGtBsAutoLanes(inst, bAutoPlay);
return ret;
}
internal static double t演奏型スキルを計算して返す(int nTotal, int nPerfect, int nGreat, int nGood, int nPoor, int nMiss, int nCombo, E楽器パート inst, STAUTOPLAY bAutoPlay)
{
if (nTotal == 0)
return 0.0;
double dbPERFECT率 = (100 * nPerfect / nTotal);
double dbGREAT率 = (100 * nGreat / nTotal);
double dbCOMBO率 = (100 * nCombo / nTotal);
int nAuto = nTotal - (nPerfect + nGreat + nGood + nPoor + nMiss);
double ret = dbPERFECT率 * 0.85 + dbGREAT率 * 0.35 + dbCOMBO率 * 0.15;
System.IO.StreamWriter sw = new System.IO.StreamWriter(@"debug.txt", true, System.Text.Encoding.GetEncoding("shift_jis"));
sw.WriteLine("retの値は{0}です。", ret);
sw.WriteLine("nTotalは{0}で、dbPERFECT率は{1}、dbGREAT率は{2}です。", nTotal, dbPERFECT率, dbGREAT率);
sw.Close();
ret *= dbCalcReviseValForDrGtBsAutoLanes(inst, bAutoPlay);
return ret;
}
PR