diff --git a/unbelievaboat/failreplies.py b/unbelievaboat/failreplies.py new file mode 100644 index 0000000..70b3b19 --- /dev/null +++ b/unbelievaboat/failreplies.py @@ -0,0 +1,38 @@ +crime_fails = [ + "You got caught trying to rob the bank! The police fined you {amount}.", + "Your attempted heist failed miserably. You were fined {amount}.", + "The security cameras caught you in the act. Pay {amount} in fines.", + "Your getaway driver abandoned you. The cops caught up and fined you {amount}.", + "You triggered the silent alarm. The fine for attempted theft is {amount}.", + "The store owner pulled out a shotgun. You dropped everything and got fined {amount}.", + "Your mask fell off during the robbery. Easy identification led to a {amount} fine.", + "The police were waiting outside. You got caught and fined {amount}.", + "Your criminal plan backfired spectacularly. Pay {amount} in fines.", + "You slipped on a banana peel while escaping. The cops fined you {amount}." +] + +rob_fails = [ + "They saw you coming and called the police. You were fined {amount}.", + "Their guard dog caught you in the act. The police fined you {amount}.", + "You picked the wrong target - they were an off-duty cop! Pay {amount} in fines.", + "Their security system was too advanced. Getting caught cost you {amount}.", + "You tripped their alarm. The fine for attempted robbery is {amount}.", + "They fought back and subdued you. The police fined you {amount}.", + "Their neighbors spotted you and called 911. Pay {amount} for your failed attempt.", + "You got caught on their doorbell camera. The fine is {amount}.", + "Their martial arts training surprised you. Getting caught cost you {amount}.", + "Their booby traps worked perfectly. The police fined you {amount}." +] + +slut_fails = [ + "An undercover cop caught you soliciting. Pay {amount} in fines.", + "The vice squad was running a sting operation. You were fined {amount}.", + "Someone reported your suspicious activity. The fine is {amount}.", + "Your attempt at seduction failed badly. Pay {amount} in fines.", + "You got caught in a police raid. The fine for solicitation is {amount}.", + "Your potential client was a police officer. You were fined {amount}.", + "The hotel staff called the authorities. Pay {amount} in fines.", + "Your indecent behavior got you fined {amount}.", + "You picked the wrong street corner. The police fined you {amount}.", + "Your flirting attracted police attention. The fine is {amount}." +] \ No newline at end of file diff --git a/unbelievaboat/unbelievaboat.py b/unbelievaboat/unbelievaboat.py index 396f16b..aed7c75 100644 --- a/unbelievaboat/unbelievaboat.py +++ b/unbelievaboat/unbelievaboat.py @@ -13,6 +13,7 @@ from redbot.core.utils.chat_formatting import humanize_number, humanize_timedelt from .checks import check_global_setting_admin, wallet_disabled_check from .defaultreplies import crimes, work, slut as default_slut_responses +from .failreplies import crime_fails, rob_fails, slut_fails from .functions import roll from .roulette import Roulette from .settings import SettingsMixin @@ -59,7 +60,7 @@ class Unbelievaboat(Wallet, Roulette, SettingsMixin, commands.Cog, metaclass=Com "failrates": { "crime": 50, "rob": 70, - "slut": 35 # Lower fail rate for stealth operations + "slut": 33 # 33% chance to fail }, "fines": {"max": 250, "min": 10}, "interest": 5, @@ -150,17 +151,29 @@ class Unbelievaboat(Wallet, Roulette, SettingsMixin, commands.Cog, metaclass=Com return True async def fine(self, ctx, job): + """Handle fines with custom failure messages based on job type.""" conf = await self.configglobalcheck(ctx) fines = await conf.fines() randint = random.randint(fines["min"], fines["max"]) amount = str(humanize_number(randint)) + " " + await bank.get_currency_name(ctx.guild) + + # Select appropriate failure message based on job type + if job == "crime": + fail_msg = random.choice(crime_fails).format(amount=amount) + elif job == "rob": + fail_msg = random.choice(rob_fails).format(amount=amount) + elif job == "slut": + fail_msg = random.choice(slut_fails).format(amount=amount) + else: + fail_msg = f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}." + userconf = await self.configglobalcheckuser(ctx.author) if not await self.walletdisabledcheck(ctx): if randint < await userconf.wallet(): await self.walletremove(ctx.author, randint) embed = discord.Embed( colour=discord.Color.red(), - description=f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}.", + description=fail_msg, ) else: interestfee = await self.config.guild(ctx.guild).interest() @@ -171,32 +184,32 @@ class Unbelievaboat(Wallet, Roulette, SettingsMixin, commands.Cog, metaclass=Com await bank.withdraw_credits(ctx.author, fee) embed = discord.Embed( colour=discord.Color.red(), - description=f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}. You did not have enough cash in your wallet and thus it was taken from your bank with a {interestfee}% interest fee ({fee} {await bank.get_currency_name(ctx.guild)}).", + description=f"{fail_msg}\nYou did not have enough cash in your wallet and thus it was taken from your bank with a {interestfee}% interest fee ({fee} {await bank.get_currency_name(ctx.guild)}).", ) else: await bank.set_balance(ctx.author, 0) embed = discord.Embed( colour=discord.Color.red(), - description=f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}. You did not have enough cash to pay the fine and are now bankrupt.", + description=f"{fail_msg}\nYou did not have enough cash to pay the fine and are now bankrupt.", ) elif await bank.can_spend(ctx.author, randint): await bank.withdraw_credits(ctx.author, randint) embed = discord.Embed( colour=discord.Color.red(), - description=f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}.", + description=fail_msg, ) else: if await bank.can_spend(ctx.author, randint): await bank.withdraw_credits(ctx.author, randint) embed = discord.Embed( colour=discord.Color.red(), - description=f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}.", + description=fail_msg, ) else: await bank.set_balance(ctx.author, 0) embed = discord.Embed( colour=discord.Color.red(), - description=f"\N{NEGATIVE SQUARED CROSS MARK} You were caught by the police and fined {amount}. You did not have enough cash to pay the fine and are now bankrupt.", + description=f"{fail_msg}\nYou did not have enough cash to pay the fine and are now bankrupt.", ) embed.set_author(name=ctx.author, icon_url=ctx.author.display_avatar.url) await ctx.send(embed=embed)