File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,17 @@ def add_xp(self, amount: float) -> None: # add XP
8888 1 # reset multiplier if amount is not the same as last item clicked
8989 )
9090 self .last_item_clicked = amount # set last item clicked to amount
91- self .xp += amount * self .multiplier * self .time_multiplier # add XP by amount
92- self .total_xp += (
93- amount * self .multiplier * self .time_multiplier
91+ self .xp += round (
92+ amount
93+ * self .multiplier
94+ * self .time_multiplier
95+ * (1 + 5.0 / (abs (time_difference_seconds ) + 1 ))
96+ ) # add XP by amount
97+ self .total_xp += round (
98+ amount
99+ * self .multiplier
100+ * self .time_multiplier
101+ * (1 + 5.0 / (abs (time_difference_seconds ) + 1 ))
94102 ) # add total XP by amount
95103 self .check_level_up () # check if user has leveled up
96104
You can’t perform that action at this time.
0 commit comments