diff --git a/PlayerInteractions/HackerBattle.fs b/PlayerInteractions/HackerBattle.fs index 25ed59b..13af5a7 100644 --- a/PlayerInteractions/HackerBattle.fs +++ b/PlayerInteractions/HackerBattle.fs @@ -118,11 +118,12 @@ let handleAttack (event : ComponentInteractionCreateEventArgs) = |> Array.contains Weak match wasSuccessfulHack with | false -> - let prize = 1.337f // LEET +// let prize = 1.337f // LEET + let prize = 13 let attack = { HackType = enum(int weapon) ; Timestamp = DateTime.UtcNow ; Target = { Id = targetId ; Name = split.[3] } } // TODO: Make a single update instead of two do! DbService.updatePlayer <| updatePlayer prize attack player - do! DbService.updatePlayer { target with Bank = MathF.Max(target.Bank - prize, 0f)} + do! DbService.updatePlayer { target with Bank = Math.Max(target.Bank - prize, 0)} let builder = DiscordInteractionResponseBuilder() builder.IsEphemeral <- true @@ -138,7 +139,7 @@ let handleAttack (event : ComponentInteractionCreateEventArgs) = |> Async.Ignore | true -> let builder = DiscordInteractionResponseBuilder() - let prize = 0.223f + let prize = 2 builder.IsEphemeral <- true builder.Content <- $"Hack failed! {split.[3]} was able to mount a successful defense! You lost {prize} GoodBoyTokenz!" do! event.Interaction.CreateResponseAsync(InteractionResponseType.UpdateMessage, builder) diff --git a/PlayerInteractions/PlayerInteractions.fs b/PlayerInteractions/PlayerInteractions.fs index 154ec61..d9ceb29 100644 --- a/PlayerInteractions/PlayerInteractions.fs +++ b/PlayerInteractions/PlayerInteractions.fs @@ -2,6 +2,7 @@ module Degenz.PlayerInteractions open System open System.Threading.Tasks +open AsciiTableFormatter open DSharpPlus.Entities open DSharpPlus open DSharpPlus.SlashCommands @@ -29,7 +30,7 @@ module Commands = Shields = shields Attacks = [||] Defenses = [||] - Bank = 15f } + Bank = 15 } let addHackerRole (ctx : InteractionContext) = async { diff --git a/PlayerInteractions/SlotMachine.fs b/PlayerInteractions/SlotMachine.fs index b992edf..5db886f 100644 --- a/PlayerInteractions/SlotMachine.fs +++ b/PlayerInteractions/SlotMachine.fs @@ -26,9 +26,9 @@ type SlotMachine() = || (results.[0] <> results.[1] && results.[1] <> results.[2] && results.[0] <> results.[2]) if winConditions then - do! DbService.updatePlayer { player with Bank = player.Bank + 10.0f } + do! DbService.updatePlayer { player with Bank = player.Bank + 10 } else - do! DbService.updatePlayer { player with Bank = MathF.Max(player.Bank - 0.5f, 0.0f) } + do! DbService.updatePlayer { player with Bank = Math.Max(player.Bank - 1, 0) } do! ctx.Interaction.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource) diff --git a/PlayerInteractions/Trainer.fs b/PlayerInteractions/Trainer.fs index 480536a..07b1f82 100644 --- a/PlayerInteractions/Trainer.fs +++ b/PlayerInteractions/Trainer.fs @@ -50,7 +50,7 @@ let handleDefense (event : ComponentInteractionCreateEventArgs) = do! sendMessage' $"Hacking attempt failed! {player.Name} defended hack from Degenz-Trainer and took {prize} from them! " do! sendMessage' "Great, I wasn't able to hack you. Great job! Because you had your system protected, when I tried to hack you, I lost some money and had to give it to you" do! sendMessage' "But you can make even more by successfully hacking your target. Why don't you try hacking me?" - let weaponName = player.Weapons |> Array.tryHead |> Option.defaultValue Weapon.Virus + let weaponName = player.Weapons |> Array.tryHead |> Option.defaultValue Hack.Virus do! sendMessage' $"You currently have {weaponName} equipped. To attempt a hack, type the '/hack' command and select {weaponName}." | None -> do! sendMessage' $"Something went wrong, please contact a moderator"