forked from sass/tipibot
Make exp gains less grindy
This commit is contained in:
@@ -317,16 +317,16 @@ LEVEL_ROLES: list[tuple[int, str]] = [
|
||||
|
||||
|
||||
def get_level(exp: int) -> int:
|
||||
"""Level = max(1, floor(sqrt(exp/10))).
|
||||
Level 5 @ 250 EXP, 10 @ 1000, 20 @ 4000, 30 @ 9000."""
|
||||
return max(1, int(math.sqrt(max(0, exp) / 10)))
|
||||
"""Level = max(1, floor(sqrt(exp/6))).
|
||||
Level 5 @ 150 EXP, 10 @ 600, 20 @ 2400, 30 @ 5400."""
|
||||
return max(1, int(math.sqrt(max(0, exp) / 6)))
|
||||
|
||||
|
||||
def exp_for_level(level: int) -> int:
|
||||
"""Minimum cumulative EXP to reach this level."""
|
||||
"""Minimum cumulative EXP to reach this level. level^2 * 6."""
|
||||
if level <= 1:
|
||||
return 0
|
||||
return level * level * 10
|
||||
return level * level * 6
|
||||
|
||||
|
||||
def level_role_name(level: int) -> str:
|
||||
|
||||
Reference in New Issue
Block a user