Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ async def perform_roll(interaction: discord.Interaction):
|
|
100 |
|
101 |
# Calculate the index based on luck
|
102 |
max_index = len(sorted_pets) - 1
|
103 |
-
index = int(max_index * (luck_multiplier - 1) /
|
104 |
|
105 |
# Select a random pet from the start of the list to the calculated index
|
106 |
rolled_pet = random.choice(sorted_pets[:index+1])
|
@@ -166,7 +166,7 @@ async def perform_roll(interaction: discord.Interaction):
|
|
166 |
return
|
167 |
|
168 |
current_luck = luck_multipliers.get(user_id, 1)
|
169 |
-
new_luck = min(current_luck
|
170 |
luck_multipliers[user_id] = new_luck
|
171 |
luck_expiration[user_id] = time.time() + 1800 # 30 minutes
|
172 |
|
|
|
100 |
|
101 |
# Calculate the index based on luck
|
102 |
max_index = len(sorted_pets) - 1
|
103 |
+
index = int(max_index * (luck_multiplier - 1) / 99999) # Assuming max luck is 100,000
|
104 |
|
105 |
# Select a random pet from the start of the list to the calculated index
|
106 |
rolled_pet = random.choice(sorted_pets[:index+1])
|
|
|
166 |
return
|
167 |
|
168 |
current_luck = luck_multipliers.get(user_id, 1)
|
169 |
+
new_luck = min(current_luck * 10, 100000) # Cap at 100,000x
|
170 |
luck_multipliers[user_id] = new_luck
|
171 |
luck_expiration[user_id] = time.time() + 1800 # 30 minutes
|
172 |
|