Add 'slt' command to Unbelievaboat cog for stealthy currency acquisition

This commit introduces a new command, 'slt', which allows users to engage in a stealth operation to earn currency with a lower risk of failure compared to traditional crime commands. The command features custom responses and integrates with existing wallet and bank systems, ensuring a seamless user experience while maintaining the game's economy balance.
This commit is contained in:
Valerie 2025-05-28 08:49:56 -04:00
parent 1d2223c439
commit c05d8de172

View file

@ -366,6 +366,64 @@ class Unbelievaboat(Wallet, Roulette, SettingsMixin, commands.Cog, metaclass=Com
embed.description += f"\nYou've reached the maximum amount of {await bank.get_currency_name(ctx.guild)}s in your bank!"
await ctx.send(embed=embed)
@commands.command()
@commands.guild_only()
@commands.bot_has_permissions(embed_links=True)
async def slt(self, ctx):
"""Silent but deadly, less risk but good payout."""
if ctx.assume_yes:
return await ctx.send("This command can't be scheduled.")
cdcheck = await self.cdcheck(ctx, "crimecd") # Using same cooldown as crime
if isinstance(cdcheck, tuple):
embed = await self.cdnotice(ctx.author, cdcheck[1], "crime")
return await ctx.send(embed=embed)
conf = await self.configglobalcheck(ctx)
failrates = await conf.failrates()
fail = random.randint(1, 100)
if fail < (failrates["crime"] / 2): # Half the failure rate of crime
return await self.fine(ctx, "crime")
payouts = await conf.payouts()
wage = random.randint(payouts["crime"]["min"], int(payouts["crime"]["max"] * 0.8)) # 80% of crime max
wagesentence = str(humanize_number(wage)) + " " + await bank.get_currency_name(ctx.guild)
# Custom responses for slt command
slt_responses = [
"You silently pickpocket someone in the crowd and find {amount}.",
"A quick sleight of hand earns you {amount}.",
"You hack into a system undetected and transfer {amount}.",
"Your silent infiltration mission yields {amount}.",
"A perfectly executed stealth operation nets you {amount}.",
"Without leaving a trace, you acquire {amount}.",
"Your shadow operation succeeds, earning you {amount}.",
"A discrete transaction yields {amount}.",
"Your stealth skills earn you {amount}.",
"Nobody saw you coming or going, but your wallet is heavier by {amount}."
]
job = random.choice(slt_responses)
line = job.format(amount=wagesentence)
linenum = slt_responses.index(job)
embed = discord.Embed(
colour=discord.Color.green(), description=line, timestamp=ctx.message.created_at
)
embed.set_author(name=ctx.author, icon_url=ctx.author.display_avatar)
embed.set_footer(text="Silent Operation #{}".format(linenum))
if not await self.walletdisabledcheck(ctx):
try:
await self.walletdeposit(ctx, ctx.author, wage)
except ValueError:
embed.description += f"\nYou've reached the maximum amount of {await bank.get_currency_name(ctx.guild)}s in your wallet!"
else:
try:
await bank.deposit_credits(ctx.author, wage)
except BalanceTooHigh as e:
await bank.set_balance(ctx.author, e.max_balance)
embed.description += f"\nYou've reached the maximum amount of {await bank.get_currency_name(ctx.guild)}s in your bank!"
await ctx.send(embed=embed)
@commands.command()
@commands.guild_only()
@wallet_disabled_check()