Skip to content

Commit

Permalink
Hummm clover
Browse files Browse the repository at this point in the history
  • Loading branch information
paris-ci committed Dec 11, 2023
1 parent 1112495 commit db329d7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/cogs/shopping_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,22 @@ async def clover(self, ctx: MyContext):

max_experience = db_channel.clover_max_experience
if self.bot.current_event == Events.FLORIST:
max_experience *= 2
new_max_experience = max_experience * 2
clover_exp = random.randint(db_channel.clover_min_experience, new_max_experience)

if clover_exp > max_experience:
clover_exp = random.randint(db_channel.clover_min_experience, new_max_experience)
else:
clover_exp = random.randint(db_channel.clover_min_experience, max_experience)

clover_exp = random.randint(db_channel.clover_min_experience, max_experience)
await db_hunter.edit_experience_with_levelups(ctx, -ITEM_COST)
db_hunter.active_powerups["clover"] = int(time.time()) + DAY
db_hunter.active_powerups["clover_exp"] = clover_exp

db_hunter.bought_items["clover"] += 1

await db_hunter.save()
await ctx.reply(
m = await ctx.reply(
_(
"🍀 You bought a 4-Leaf clover. Every time you kill a duck, you'll get {clover_exp} more experience points."
" [Bought: -{ITEM_COST} exp, total {db_hunter.experience} exp]",
Expand All @@ -520,6 +525,9 @@ async def clover(self, ctx: MyContext):
)
)

if clover_exp == max_experience:
await m.add_reaction("✨")

@shop.command(aliases=["11", "glasses", "👓️", "🕶️", "😎"])
async def sunglasses(self, ctx: MyContext):
"""
Expand Down

0 comments on commit db329d7

Please sign in to comment.