coollsd commited on
Commit
c527752
·
verified ·
1 Parent(s): 840e6c2

Update petroll.py

Browse files
Files changed (1) hide show
  1. petroll.py +3 -3
petroll.py CHANGED
@@ -92,14 +92,14 @@ async def perform_roll(interaction: discord.Interaction):
92
  view = discord.ui.View()
93
  view.add_item(roll_again_button)
94
 
95
- sell_button = discord.ui.Button(style=discord.ButtonStyle.success, label=f"Sell Pet for ${rap_value // 100}", custom_id="sell_pet")
96
 
97
  async def sell_pet_callback(interaction: discord.Interaction):
98
  if interaction.user.id != user_id:
99
  await interaction.response.send_message("You cannot sell this pet.", ephemeral=True)
100
  return
101
 
102
- sell_value = rap_value // 100
103
  user_cash[user_id] = user_cash.get(user_id, 0) + sell_value
104
  await interaction.response.send_message(f"You sold the pet for ${sell_value}. Your new balance is ${user_cash[user_id]}.", ephemeral=True)
105
  for item in view.children:
@@ -111,7 +111,7 @@ async def perform_roll(interaction: discord.Interaction):
111
  sell_button.callback = sell_pet_callback
112
  view.add_item(sell_button)
113
 
114
- if random.random() < 0.2 and user_id not in used_luck_opportunities:
115
  luck_opportunities[user_id] = luck_opportunities.get(user_id, 0) + 1
116
  increase_luck_button = discord.ui.Button(style=discord.ButtonStyle.success, label="Increase Luck", custom_id=f"increase_luck_{luck_opportunities[user_id]}")
117
 
 
92
  view = discord.ui.View()
93
  view.add_item(roll_again_button)
94
 
95
+ sell_button = discord.ui.Button(style=discord.ButtonStyle.success, label=f"Sell Pet for ${rap_value}", custom_id="sell_pet")
96
 
97
  async def sell_pet_callback(interaction: discord.Interaction):
98
  if interaction.user.id != user_id:
99
  await interaction.response.send_message("You cannot sell this pet.", ephemeral=True)
100
  return
101
 
102
+ sell_value = rap_value
103
  user_cash[user_id] = user_cash.get(user_id, 0) + sell_value
104
  await interaction.response.send_message(f"You sold the pet for ${sell_value}. Your new balance is ${user_cash[user_id]}.", ephemeral=True)
105
  for item in view.children:
 
111
  sell_button.callback = sell_pet_callback
112
  view.add_item(sell_button)
113
 
114
+ if random.random() < 0.6 and luck_opportunities.get(user_id, 0) < 3:
115
  luck_opportunities[user_id] = luck_opportunities.get(user_id, 0) + 1
116
  increase_luck_button = discord.ui.Button(style=discord.ButtonStyle.success, label="Increase Luck", custom_id=f"increase_luck_{luck_opportunities[user_id]}")
117