diff --git a/Bot/Embeds.fs b/Bot/Embeds.fs index 0fc5700..7e8011b 100644 --- a/Bot/Embeds.fs +++ b/Bot/Embeds.fs @@ -55,13 +55,28 @@ let pickHack actionId attacker defender bonus isTrainer = |> Inventory.getItemsByType ItemType.Hack |> List.sortBy (fun item -> item.Id) let buttons = constructButtons actionId $"{defender.DiscordId}-{defender.Name}" attacker hackItems isTrainer + + let ( outcomeMsg , bonusMsg ) = + if attacker.Stats.Strength.Amount > defender.Stats.Strength.Amount then + "\nYou're stronger so you'll steal more!!!\n" , $"\n**__Potential Bonus:__**\n{bonus} 💰$GBT" + else + "\nYou're not stronger than them, you need to eat more!" , "" + let stealMsg = + if not isTrainer + then $""" + {defender.Name} has **{defender.Bank} $GBT** we can take from them. - let stealMsg = if not isTrainer then $"{defender.Name} has **{defender.Bank} $GBT** we can take from them. " else "" - let strengthMsg = $"You have `{attacker.Stats.Strength.Amount}` strength, while they have `{defender.Stats.Strength.Amount}`\n**Bonus:** `{bonus} 💰$GBT`" + **__Your Strength:__** + 💪 {attacker.Stats.Strength.Amount} + + **__Their Strength:__** + 💪 {defender.Stats.Strength.Amount} + {outcomeMsg}{bonusMsg}""" + else "" let embed = DiscordEmbedBuilder() .WithTitle("Hack Attack") - .WithDescription($"{stealMsg}\n\n{strengthMsg}\n\nPick the hack you want to use.") + .WithDescription($"{stealMsg}\n\nPick the hack you want to use.") if not isTrainer then for hack in Inventory.getHacks attacker.Inventory do @@ -75,20 +90,21 @@ let pickHack actionId attacker defender bonus isTrainer = let responseSuccessfulHack (hacker : PlayerData) (target : PlayerData) totalTaken bonus (hack : HackItem) = let earnedMoney = totalTaken > 0 + + let msg = $"You successfully hacked <@{target.DiscordId}> using {hack.Name}!\n\n" + + (if earnedMoney then $"**__Total Stolen__**: {totalTaken} 💰$GBT\n" else "") + + let bonusMsg = + if bonus > 0 + then $"Because your strength is `💪 {hacker.Stats.Strength.Amount}` and your target's strength is `💪 {target.Stats.Strength.Amount}` You stole an extra `{bonus}` 💰$GBT" + else "" + let embed = DiscordEmbedBuilder() .WithImageUrl(hack.ImageUrl) - .WithTitle("Hack Attack") - .WithDescription($"You successfully hacked <@{target.DiscordId}> using {hack.Name}" - + (if earnedMoney then $", and took {totalTaken} 💰$GBT from them!" else "!")) - - embed.AddField("Prize", $"`{totalTaken} 💰$GBT`", true) |> ignore - let bonusMsg = - if bonus > 0 - then $"{hacker.Stats.Strength.Amount} **VS** {target.Stats.Strength.Amount} -> `+{bonus} $GBT`" - else "None" - embed.AddField("Strength Bonus", bonusMsg, true) |> ignore - + .WithTitle("✅ Hack Successful!") + .WithDescription($"{msg}\n{bonusMsg}") + embed.AddField("New $GBT Balance", $"`💰` {hacker.Bank} ⋙ `💰` {hacker.Bank + totalTaken} `(+{totalTaken} $GBT)`") |> ignore DiscordFollowupMessageBuilder() .AddEmbed(embed.Build())