Skip to content

Commit 40d6f07

Browse files
committed
Change XP calculation to float
1 parent 68058d8 commit 40d6f07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ def check_level_up(self): # check if user has leveled up
5555
): # if user XP is greater than or equal to XP required
5656
self.xp -= self.xp_required
5757
self.xp_required = max(
58-
1,
58+
1.0,
5959
round(
6060
self.xp_required
61-
+ max(1, self.xp_required * 1 / math.sqrt(self.level))
61+
+ max(1.0, self.xp_required * 1.0 / math.sqrt(self.level))
6262
),
6363
) # increase XP required exponentially with slower growth at higher levels
6464
self.level += 1 # increase level

0 commit comments

Comments
 (0)