diff --git a/Bot/Embeds.fs b/Bot/Embeds.fs index 7e8011b..be75379 100644 --- a/Bot/Embeds.fs +++ b/Bot/Embeds.fs @@ -1,6 +1,7 @@ module Degenz.Embeds open System +open DSharpPlus open Degenz open Degenz.Messaging open DSharpPlus.Entities @@ -10,6 +11,7 @@ let shieldGif = "https://s10.gifyu.com/images/Defense-Degenz-V2-min.gif" let constructButtons (actionId: string) (buttonInfo : string) (player: PlayerData) (items : Inventory) ignoreCooldown = items + |> List.sortBy (fun item -> item.Id) |> List.map (fun item -> let action = player.Events @@ -42,7 +44,13 @@ let pickDefense actionId player isTrainer = for shield in Inventory.getShields player.Inventory do let hours = TimeSpan.FromMinutes(int shield.Cooldown).TotalHours |> int let against = WeaponClass.getGoodAgainst shield.Class |> snd - embed.AddField(shield.Name, $"Active {hours} hours\nDefeats {against}", true) |> ignore + let emoji = + match shield.Id with + | "FIREWALL" -> "<:firewall_shield:971620988649340989>" + | "ENCRYPTION" -> "<:encryption_shield:971620979912605727>" + | "CYPHER" -> "<:cypher_shield:971620965576503326>" + | _ -> "" + embed.AddField($"{emoji} {shield.Name}", $"Active {hours} hours\nDefeats {against}", true) |> ignore DiscordFollowupMessageBuilder() .AddComponents(buttons) @@ -58,19 +66,19 @@ let pickHack actionId attacker defender bonus 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" + "\nYou're **STRONGER** so you'll **HACK MORE!!!**\n" , $"\n**__Potential Bonus:__**\n`{bonus} 💰$GBT`" else - "\nYou're not stronger than them, you need to eat more!" , "" + "\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. + **{defender.Name}** has `{defender.Bank} 💰$GBT` we can take from them. **__Your Strength:__** - 💪 {attacker.Stats.Strength.Amount} + `💪 {attacker.Stats.Strength.Amount}` **__Their Strength:__** - 💪 {defender.Stats.Strength.Amount} + `💪 {defender.Stats.Strength.Amount}` {outcomeMsg}{bonusMsg}""" else "" let embed = @@ -79,9 +87,20 @@ let pickHack actionId attacker defender bonus isTrainer = .WithDescription($"{stealMsg}\n\nPick the hack you want to use.") if not isTrainer then - for hack in Inventory.getHacks attacker.Inventory do + let hacks = Inventory.getHacks attacker.Inventory |> List.sortBy (fun h -> h.Id) + for hack in hacks do let amount = if hack.Power > int defender.Bank then int defender.Bank else hack.Power - embed.AddField(hack.Name, $"Cooldown {hack.Cooldown} mins\nExtract {amount} $GBT", true) |> ignore + let emoji = + match hack.Id with + | "REMOTE" -> "<:remote_access:971621009981571132>" + | "VIRUS" -> "<:virus_hack:971636840580927510>" + | "WORM" -> "<:worm_hack:971636842640310312>" + | _ -> "" + let fieldMsg = $""" + Hack Base: `{hack.Power} 💰$GBT` + Bonus: `{bonus} 💰$GBT` + **Hack Total:** `{amount + bonus} 💰$GBT`""" + embed.AddField($"{emoji} __{hack.Name}__", fieldMsg, true) |> ignore DiscordFollowupMessageBuilder() .AddComponents(buttons)