Skip to content

Commit 0056aa8

Browse files
committed
slots command new logic
Signed-off-by: TiDurak <[email protected]>
1 parent a97568c commit 0056aa8

File tree

1 file changed

+12
-44
lines changed

1 file changed

+12
-44
lines changed

cogs/games.py

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -50,62 +50,30 @@ async def slots(self, ctx):
5050

5151
symbols = ['🍒', '🔔', '7️⃣', '👑', '☠️']
5252

53+
slot = [0, 1, 2]
5354

55+
for i in range(3):
56+
slot[i] = symbols[random.randint(0,3)]
5457

58+
is_same = True if slot[0] == slot[1] == slot[2] else False
5559

56-
percentage = random.uniform(0,100)
57-
if percentage <= 30:
58-
slot1 = symbols[4]
59-
elif percentage <= 55 and percentage > 30:
60-
slot1 = symbols[3]
61-
elif percentage <= 70 and percentage > 55:
62-
slot1 = symbols[2]
63-
elif percentage <= 85 and percentage > 70:
64-
slot1 = symbols[1]
65-
elif percentage <= 100 and percentage > 85:
66-
slot1 = symbols[0]
67-
68-
percentage = random.uniform(0,100)
69-
if percentage <= 20:
70-
slot2 = symbols[4]
71-
elif percentage <= 40 and percentage > 20:
72-
slot2 = symbols[3]
73-
elif percentage <= 60 and percentage > 40:
74-
slot2 = symbols[2]
75-
elif percentage <= 87 and percentage > 60:
76-
slot2 = symbols[1]
77-
elif percentage <= 100 and percentage > 87:
78-
slot2 = symbols[0]
79-
80-
percentage = random.uniform(0,100)
81-
if percentage <= 35:
82-
slot3 = symbols[4]
83-
elif percentage <= 41 and percentage > 35:
84-
slot3 = symbols[3]
85-
elif percentage <= 60 and percentage > 41:
86-
slot3 = symbols[2]
87-
elif percentage <= 94 and percentage > 60:
88-
slot3 = symbols[1]
89-
elif percentage <= 100 and percentage > 95:
90-
slot3 = symbols[0]
91-
92-
if slot1 == slot2 == slot3 == symbols[4]:
60+
if is_same and symbols[4] in slot:
9361
footer = 'Лузер! Ваш баланс обнулён'
94-
elif slot1 == slot2 == slot3 == symbols[3]:
62+
elif is_same and symbols[3] in slot:
9563
footer = '+ 5 000 баксов на ваш счёт'
96-
elif slot1 == slot2 == slot3 == symbols[2]:
64+
elif is_same and symbols[2] in slot:
9765
footer = '+ 10 000 баксов на ваш счёт'
98-
elif slot1 == slot2 == slot3 == symbols[1]:
66+
elif is_same and symbols[1] in slot:
9967
footer = '+ 15 000 баксов на ваш счёт'
100-
elif slot1 == slot2 == slot3 == symbols[0]:
68+
elif is_same and symbols[0] in slot:
10169
footer = 'ДЖЕКПОТ!!! + 1 000 000 баксов на ваш счёт'
102-
elif slot1 == slot2 == symbols[0] or slot1 == slot3 == symbols[0] or slot2 == slot3 == symbols[0]:
70+
elif symbols[0] == slot[0] == slot[1] or slot[0] == slot[2] == symbols[0] or slot[1] == slot[2] == symbols[0]:
10371
footer = '+ 3 500 баксов на ваш счёт'
104-
elif slot1 == symbols[0] or slot2 == symbols[0] or slot3 == symbols[0]:
72+
elif symbols[0] in slot:
10573
footer = '+ 1 500 баксов на ваш счёт'
10674
else:
10775
footer = 'Ничего('
108-
embed = discord.Embed(color = 0x36c600, title = '🎰 Slots Azino777', description = str(slot1) + str(slot2) + str(slot3))
76+
embed = discord.Embed(color = 0x36c600, title = '🎰 Slots Azino777', description = str(slot[0]) + str(slot[1]) + str(slot[2]))
10977
embed.set_footer(text = footer, icon_url = "https://i.imgur.com/uZIlRnK.png")
11078
await ctx.send(embed = embed)
11179

0 commit comments

Comments
 (0)