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)
|
|> List.sortBy (fun item -> item.Id)
|
||||||
let buttons = constructButtons actionId $"{defender.DiscordId}-{defender.Name}" attacker hackItems isTrainer
|
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 ( outcomeMsg , bonusMsg ) =
|
||||||
let strengthMsg = $"You have `{attacker.Stats.Strength.Amount}` strength, while they have `{defender.Stats.Strength.Amount}`\n**Bonus:** `{bonus} 💰$GBT`"
|
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 =
|
let embed =
|
||||||
DiscordEmbedBuilder()
|
DiscordEmbedBuilder()
|
||||||
.WithTitle("Hack Attack")
|
.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
|
if not isTrainer then
|
||||||
for hack in Inventory.getHacks attacker.Inventory do
|
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 responseSuccessfulHack (hacker : PlayerData) (target : PlayerData) totalTaken bonus (hack : HackItem) =
|
||||||
let earnedMoney = totalTaken > 0<GBT>
|
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 =
|
let embed =
|
||||||
DiscordEmbedBuilder()
|
DiscordEmbedBuilder()
|
||||||
.WithImageUrl(hack.ImageUrl)
|
.WithImageUrl(hack.ImageUrl)
|
||||||
.WithTitle("Hack Attack")
|
.WithTitle("✅ Hack Successful!")
|
||||||
.WithDescription($"You successfully hacked <@{target.DiscordId}> using {hack.Name}"
|
.WithDescription($"{msg}\n{bonusMsg}")
|
||||||
+ (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
|
|
||||||
|
|
||||||
embed.AddField("New $GBT Balance", $"`💰` {hacker.Bank} ⋙ `💰` {hacker.Bank + totalTaken} `(+{totalTaken} $GBT)`") |> ignore
|
embed.AddField("New $GBT Balance", $"`💰` {hacker.Bank} ⋙ `💰` {hacker.Bank + totalTaken} `(+{totalTaken} $GBT)`") |> ignore
|
||||||
DiscordFollowupMessageBuilder()
|
DiscordFollowupMessageBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user