Copy for strength hacking
This commit is contained in:
parent
56525f2ac2
commit
929195393a
@ -56,12 +56,27 @@ let pickHack actionId attacker defender bonus isTrainer =
|
||||
|> List.sortBy (fun item -> item.Id)
|
||||
let buttons = constructButtons actionId $"{defender.DiscordId}-{defender.Name}" attacker hackItems isTrainer
|
||||
|
||||
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`"
|
||||
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.
|
||||
|
||||
**__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,19 +90,20 @@ let pickHack actionId attacker defender bonus isTrainer =
|
||||
|
||||
let responseSuccessfulHack (hacker : PlayerData) (target : PlayerData) totalTaken bonus (hack : HackItem) =
|
||||
let earnedMoney = totalTaken > 0<GBT>
|
||||
|
||||
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<GBT>
|
||||
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<GBT>
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user