forked from LackWiz/ppCurve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTransfer.txt
34 lines (23 loc) · 1.52 KB
/
Transfer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def curveAccMulti(acc):
pointList = [[1, 7],[0.999, 5.8],[0.9975, 4.7],[0.995, 3.76],[0.9925, 3.17],[0.99, 2.73],[0.9875, 2.38],[0.985, 2.1],
[0.9825, 1.88],[0.98, 1.71],[0.9775, 1.57],[0.975, 1.45],[0.9725, 1.37],[0.97, 1.31],[0.965, 1.20],[0.96, 1.11],
[0.955, 1.045],[0.95, 1],[0.94, 0.94],[0.93, 0.885],[0.92, 0.835],[0.91, 0.79],[0.9, 0.75],[0.875, 0.655],
[0.85, 0.57],[0.825, 0.51],[0.8, 0.47],[0.75, 0.40],[0.7, 0.34],[0.65, 0.29],[0.6, 0.25],[0.0, 0.0]] # An array of pairs of (ACC, Multiplier)
for i in range(0, len(pointList)):
if pointList[i][0] <= acc: # Searches the acc portion of each pair in the array until it finds a pair with a lower acc than the players acc, then breaks
break
if i == 0: # Special case for 100% acc scores
i = 1
middle_dis = (acc - pointList[i-1][0]) / (pointList[i][0] - pointList[i-1][0])
return pointList[i-1][1] + middle_dis * (pointList[i][1] - pointList[i-1][1])
AIacc = dzRamens_predicted_acc
passRating = lacks_passRating_value
playerACC = the_players_accuracy
#if AIacc returns a number greater than 0
difficulty_to_acc = 600 / curveAccMulti(AIacc) / 50 * (-4**(-passRating-0.5) + 1)
#if AIacc returns 0 or Not Found (usually because it's V3 map):
difficulty_to_acc = (-1.3**(-passRating) + 1) * 8 + 2
passPP = passRating * 17.5
accPP = curveAccMulti(playerACC) * difficulty_to_acc * 30
totalPP = passPP + accPP
# We probably want to cache difficulty_to_acc and passRating