remotes/1693045480750635534/spooky-22
Aevann1 2022-04-03 17:34:21 +02:00
parent 9d9e130022
commit 8fa660a241
1 changed files with 4 additions and 3 deletions

View File

@ -16,12 +16,13 @@ def check_for_treasure(in_text, from_comment):
amount = random.randint(special_min, special_max)
elif is_standard:
amount = random.randint(standard_min, standard_max)
if random.randint(1, 100) > 90: amount = -amount
if random.randint(1, 100) > 90:
if amount > user.coins: amount = user.coins
amount = -amount
if amount != 0:
user = from_comment.author
user.coins += amount
if user.coins < 0: user.coins = 0
from_comment.treasure_amount = str(amount)