gacha pull updated

This commit is contained in:
esef committed 2026-07-05 14:11:11 +03:00
1 parent f00df3664c
commit 127aab1d29
1 file changed
+14 -11
+14 -11
View File
@@ -160,22 +160,25 @@ class Fun(commands.Cog):
percentage = random.randint(0, 100) percentage = random.randint(0, 100)
await ctx.reply(f"🛳️ **Ship:** {user1} x {user2}\n**Compatibility:** {percentage}%") await ctx.reply(f"🛳️ **Ship:** {user1} x {user2}\n**Compatibility:** {percentage}%")
# 10 Pull Gacha (5% Purple, 19% Yellow, 76% Blue) # 10 Pull Gacha (5% Purple, 19% Yellow, 76% Blue. 10th is guaranteed 97% Y / 3% P)
@commands.command() @commands.command()
async def pull(self, ctx): async def pull(self, ctx):
results = [] results = []
for _ in range(10): for i in range(10):
roll = random.randint(1, 100) roll = random.randint(1, 100)
if roll <= 5: # The 10th pull (index 9) uses different odds
results.append('🟪') if i == 9:
elif roll <= 24: if roll <= 3:
results.append('🟨') results.append('🟪')
else:
results.append('🟨')
else: else:
results.append('🟦') if roll <= 5:
results.append('🟪')
if '🟨' not in results and '🟪' not in results: elif roll <= 24:
if '🟦' in results: results.append('🟨')
results[results.index('🟦')] = '🟨' else:
results.append('🟦')
# Using En-Space (\u2002) so Discord doesn't collapse it # Using En-Space (\u2002) so Discord doesn't collapse it
row1 = "\u2002".join(results[0:5]) row1 = "\u2002".join(results[0:5])