utilize past transactions in gamble command
@@ -671,6 +671,15 @@ class Econ(commands.Cog):
await self.bot.send(ctx, ctx.l.econ.gamble.roll.format(u_roll, b_roll))
if u_roll > b_roll:
+ past_transactions = await self.db.fetch_transactions(ctx.author.id, 7)
+ multi = None
+
+ for record in past_transactions:
+ if record['item'] == 'emerald' and record['amount'] > 2048:
+ multi = 1.05
+ break
+
+ if multi is not None:
multi = 100 + random.randint(5, 30) + (await self.db.fetch_item(ctx.author.id, 'Bane Of Pillagers Amulet') is not None) * 20
multi += ((await self.db.fetch_item(ctx.author.id, 'Rich Person Trophy') is not None) * 20)
multi = (150 + random.randint(-5, 0)) if multi >= 150 else multi
