Remove GBT reward from Trainer
This commit is contained in:
parent
49f716bff7
commit
22cac7c96a
@ -13,7 +13,6 @@ let hackItem = Arsenal.weapons |> Inventory.findItemById (string ItemId.REMOTE)
|
||||
let shieldItem = Arsenal.weapons |> Inventory.findItemById (string ItemId.FIREWALL)
|
||||
let defaultHack = (Inventory.getHackItem hackItem).Value
|
||||
let defaultShield = (Inventory.getShieldItem shieldItem ).Value
|
||||
let CurrencyGift = 250<GBT>
|
||||
let BeginnerProtectionHours = 24
|
||||
|
||||
let HackEvent () = {
|
||||
@ -169,7 +168,6 @@ Here, I'm going to gift you:
|
||||
|
||||
1. A hack - `{defaultHack.Name}`,
|
||||
2. A shield - `{defaultShield.Name}`,
|
||||
3. `{CurrencyGift} 💰 $GBT`,
|
||||
|
||||
I'm also going to give you some **TEMPORARY SHIELDS** until you buy your own.
|
||||
They will **ONLY** protect you from hacks for **{BeginnerProtectionHours} hrs**...
|
||||
@ -199,22 +197,6 @@ let handleArsenal (ctx : IDiscordContext) = PlayerInteractions.executePlayerActi
|
||||
if inventory |> List.exists (fun i -> i.Id = weapon.Id)
|
||||
then inventory
|
||||
else weapon::inventory
|
||||
let updatedPlayer = {
|
||||
player with
|
||||
Events =
|
||||
player
|
||||
|> Player.removeExpiredActions
|
||||
|> fun p -> p.Events
|
||||
|> List.filter (fun e -> match e.Type with Shielding _ -> false | _ -> true)
|
||||
|> List.append (ShieldEvents())
|
||||
|> List.consTo (HackEvent())
|
||||
Inventory =
|
||||
player.Inventory
|
||||
|> addIfDoesntExist hackItem
|
||||
|> addIfDoesntExist shieldItem
|
||||
Bank = player.Bank + CurrencyGift
|
||||
}
|
||||
do! DbService.updatePlayer updatedPlayer |> Async.Ignore
|
||||
if player.Inventory |> List.exists (fun i -> i.Id = hackItem.Id) |> not then
|
||||
do! DbService.addToPlayerInventory player.DiscordId hackItem |> Async.Ignore
|
||||
if player.Inventory |> List.exists (fun i -> i.Id = shieldItem.Id) |> not then
|
||||
@ -228,11 +210,25 @@ let handleArsenal (ctx : IDiscordContext) = PlayerInteractions.executePlayerActi
|
||||
printfn "%s" ex.Message
|
||||
()
|
||||
|
||||
let updatedPlayer = {
|
||||
player with
|
||||
Events =
|
||||
player
|
||||
|> Player.removeExpiredActions
|
||||
|> fun p -> p.Events
|
||||
|> List.filter (fun e -> match e.Type with Shielding _ -> false | _ -> true)
|
||||
|> List.append (ShieldEvents())
|
||||
|> List.consTo (HackEvent())
|
||||
Inventory =
|
||||
player.Inventory
|
||||
|> addIfDoesntExist hackItem
|
||||
|> addIfDoesntExist shieldItem
|
||||
}
|
||||
let embed = Embeds.getArsenalEmbed updatedPlayer
|
||||
do! ctx.FollowUp(embed) |> Async.AwaitTask
|
||||
|
||||
do! Async.Sleep 2000
|
||||
let rewards = [ $"{defaultHack.Name} Hack" ; $"{defaultShield.Name} Shield" ; $"{CurrencyGift} 💰$GBT"]
|
||||
let rewards = [ $"{defaultHack.Name} Hack" ; $"{defaultShield.Name} Shield" ]
|
||||
let embed = Embeds.getAchievementEmbed rewards "You completed the Training Dojo and collected some gifts." TrainerAchievement
|
||||
do! ctx.FollowUp(embed) |> Async.AwaitTask
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user