Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def skill_level(rank, difficulty):
- '''
- RANK += RANK BONUS PER RANK
- --------------------------
- 1 to 10 += 3
- 11 to 30 += 2
- 31 to 50 += 1
- 51 to 100 += 0.5
- 101 to 150 += 0.25
- 151 to 200 += 0.125
- 201 to 500 += 0.0625
- 501 to 1,000 += 0.025
- 1,001 to infinity += 0.01
- '''
- #Temp Values
- rb = 0
- rank = 100
- #Formula
- if rank:
- r = rank if rank < 10 else 10
- rb += (3 * r)
- if rank >= 11:
- r = rank - 10 if rank < 30 else 10
- rb += (2 * r)
- if rank >= 31:
- r = rank - 30 if rank < 50 else 20
- rb += (1 * r)
- if rank >= 51:
- r = rank - 50 if rank < 100 else 50
- rb += (0.5 * r)
- if rank >= 101:
- r = rank - 100 if rank < 150 else 50
- rb += (0.25 * r)
- if rank >= 151:
- r = rank - 150 if rank < 200 else 50
- rb += (0.125 * r)
- if rank >= 201:
- r = rank - 200 if rank < 500 else 300
- rb += (0.0625 * r)
- if rank >= 501:
- r = rank - 500 if rank < 1000 else 500
- rb += (0.025 * r)
- if rank >= 1001:
- r = rank - 1000
- rb += (0.01 * r)
- '''
- 15% RB loss per difficulty.
- At rank 100:
- Easy(100%) 115 RB
- Average(85%) 97.75 RB
- Difficult(70%) 80.5 RB
- Impossible(55%) 63.25 RB
- '''
- if difficulty == 'easy':
- rb *= 1
- elif difficulty == 'average':
- rb *= 0.85
- elif difficulty == 'difficult':
- rb *= 0.7
- elif difficulty == 'impossible':
- rb *= 0.55
- return rb # Return if any rank.
- return None # Return if no rank.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement