Réajustement de la machine à sous
This commit is contained in:
parent
234ffdf34d
commit
c9e7f9f1b9
1 changed files with 6 additions and 6 deletions
12
ecoplus.py
12
ecoplus.py
|
@ -164,8 +164,9 @@ async def collect(message):
|
|||
cursor.execute(f"UPDATE tab_{gid} SET lst_coll = {curr_time} WHERE id={usrid}")
|
||||
cursor.execute(f"UPDATE tab_{gid} SET cash = {cash} WHERE id={usrid}")
|
||||
database.commit()
|
||||
nc = cooldown//60
|
||||
await message.channel.send(f"Vous avez recu {collect_gain}$ en RSA. Vous avez désormais {cash}$\n"\
|
||||
f"Revenez dans {cooldown} minutes pour votre prochain chèque")
|
||||
f"Revenez dans {nc} minutes pour votre prochain chèque")
|
||||
else:
|
||||
await message.channel.send(init_perso_str)
|
||||
|
||||
|
@ -188,20 +189,19 @@ async def slot(message):
|
|||
return
|
||||
roll = random.random()
|
||||
gain = 0
|
||||
print("Roll :",roll)
|
||||
if roll < 1/6:
|
||||
await message.channel.send(f"<@{uid}> a perdu toute sa mise")
|
||||
if roll >= 1/6 and roll < 3/6:
|
||||
gain = int(amnt*0.35*random.random())
|
||||
gain = int(round(amnt*0.5*random.random()))
|
||||
await message.channel.send(f"<@{uid}> n'a remporté que {gain}$")
|
||||
if roll >= 3/6 and roll < 5/6:
|
||||
gain = int(amnt*1.1*random.random())
|
||||
gain = int(round(amnt*1.25*random.random()))
|
||||
await message.channel.send(f"<@{uid}> a réussi à remporter {gain}$")
|
||||
if roll >= 5/6 and roll < 19/20:
|
||||
gain = int(amnt*0.4 + amnt*1.2*random.random())
|
||||
gain = int(round(amnt*0.5 + amnt*1.2*random.random()))
|
||||
await message.channel.send(f"<@{uid}> a extrait {gain}$ des griffes de la machine")
|
||||
if roll >= 19/20:
|
||||
gain = int(amnt*4 + amnt*16*random.random())
|
||||
gain = int(round(amnt*4 + amnt*17*random.random()))
|
||||
await message.channel.send(f"## <@{uid}> JACKPOT ! Vous avez gagné {gain}$ !")
|
||||
cash -= amnt-gain
|
||||
cursor.execute(f"UPDATE tab_{gid} SET cash = {cash} WHERE id={uid}")
|
||||
|
|
Loading…
Add table
Reference in a new issue