Assorted fixes
This commit is contained in:
parent
a80d31b40c
commit
1ff6a4dc28
@ -11,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 =
|
let constructButtons (actionId: string) (buttonInfo : string) (player: PlayerData) (items : Inventory) ignoreCooldown =
|
||||||
items
|
items
|
||||||
|
|> List.sortBy (fun item -> item.Id)
|
||||||
|> List.map (fun item ->
|
|> List.map (fun item ->
|
||||||
let action =
|
let action =
|
||||||
player.Events
|
player.Events
|
||||||
@ -71,7 +72,7 @@ let pickHack actionId attacker defender bonus isTrainer =
|
|||||||
let stealMsg =
|
let stealMsg =
|
||||||
if not isTrainer
|
if not isTrainer
|
||||||
then $"""
|
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:__**
|
**__Your Strength:__**
|
||||||
`💪 {attacker.Stats.Strength.Amount}`
|
`💪 {attacker.Stats.Strength.Amount}`
|
||||||
@ -86,7 +87,8 @@ let pickHack actionId attacker defender bonus isTrainer =
|
|||||||
.WithDescription($"{stealMsg}\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
|
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
|
let amount = if hack.Power > int defender.Bank then int defender.Bank else hack.Power
|
||||||
let emoji =
|
let emoji =
|
||||||
match hack.Id with
|
match hack.Id with
|
||||||
@ -95,11 +97,10 @@ let pickHack actionId attacker defender bonus isTrainer =
|
|||||||
| "WORM" -> "<:worm_hack:971636842640310312>"
|
| "WORM" -> "<:worm_hack:971636842640310312>"
|
||||||
| _ -> ""
|
| _ -> ""
|
||||||
let fieldMsg = $"""
|
let fieldMsg = $"""
|
||||||
**Cooldown:** {hack.Cooldown} mins
|
Hack Base: `{hack.Power} 💰$GBT`
|
||||||
**Hack Base:** {hack.Power}
|
Bonus: `{bonus} 💰$GBT`
|
||||||
**Strength Bonus:** {bonus}
|
**Hack Total:** `{amount + bonus} 💰$GBT`"""
|
||||||
**Hack Total:** {amount + bonus} $GBT"""
|
embed.AddField($"{emoji} __{hack.Name}__", fieldMsg, true) |> ignore
|
||||||
embed.AddField($"{emoji} {hack.Name}", fieldMsg, true) |> ignore
|
|
||||||
|
|
||||||
DiscordFollowupMessageBuilder()
|
DiscordFollowupMessageBuilder()
|
||||||
.AddComponents(buttons)
|
.AddComponents(buttons)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user