private static double WN8_WinRate(WN8ExpValue WN8ExpectedTank, RatingStructure ratingStruct) { double rWIN = 0; if (ratingStruct.isOverall) { rWIN = ratingStruct.overallWinRate; } else { if (WN8ExpectedTank.expWin > 0) { rWIN = ratingStruct.winRate / WN8ExpectedTank.expWin; } } return Math.Max(0, (rWIN - 0.71) / (1 - 0.71)); }
private static double WN8_Spotted(WN8ExpValue WN8ExpectedTank, double rDAMAGEc, RatingStructure ratingStruct) { double rSPOT = 0; if (ratingStruct.isOverall) { rSPOT = ratingStruct.overallSpotted; } else { if (WN8ExpectedTank.expSpot > 0) { rSPOT = ratingStruct.AvgSpotted / WN8ExpectedTank.expSpot; } } double oResult = Math.Max(0, Math.Min(rDAMAGEc + 0.1, (rSPOT - 0.38) / (1 - 0.38))); return oResult; }
private static double WN8_Defence(WN8ExpValue WN8ExpectedTank, double rDAMAGEc, RatingStructure ratingStruct) { double rDEF = 0; if (ratingStruct.isOverall) { rDEF = ratingStruct.overallDefencePoints; } else { if (WN8ExpectedTank.expDefense > 0) { rDEF = ratingStruct.AvgDefencePoints / WN8ExpectedTank.expDefense; } } return Math.Max(0, Math.Min(rDAMAGEc + 0.1, (rDEF - 0.10) / (1 - 0.10))); //Math.Min(rDAMAGEc + 0.1, Math.Max(0, (rDEF - 0.10) / (1 - 0.10))); }
private static double WN8_Frags(WN8ExpValue WN8ExpectedTank, double rDAMAGEc, RatingStructure ratingStruct) { double rFRAG = 0; if (ratingStruct.isOverall) { rFRAG = ratingStruct.overallFrags; } else { if (WN8ExpectedTank.expFrag > 0) { rFRAG = ratingStruct.AvgFrags / WN8ExpectedTank.expFrag; } } return Math.Min(rDAMAGEc + 0.2, Math.Max(0, (rFRAG - 0.12) / (1 - 0.12))); }
private static double WN8_Damage(WN8ExpValue WN8ExpectedTank, RatingStructure ratingStruct) { double rDAMAGE = 0; if (ratingStruct.isOverall) { rDAMAGE = ratingStruct.overallDamageDealt; } else { if (WN8ExpectedTank.expDamage > 0) { rDAMAGE = ratingStruct.AvgDamageDealt / WN8ExpectedTank.expDamage; } } return Math.Max(0, (rDAMAGE - 0.22) / (1 - 0.22)); }