Merge branch 'master' into dev
This commit is contained in:
commit
721b409e07
@ -232,9 +232,10 @@ let scan (ctx : IDiscordContext) =
|
|||||||
let! targets = DbService.getRandomHackablePlayers (ctx.GetDiscordMember().Id)
|
let! targets = DbService.getRandomHackablePlayers (ctx.GetDiscordMember().Id)
|
||||||
let targets =
|
let targets =
|
||||||
let hackedIds =
|
let hackedIds =
|
||||||
player.Events
|
player
|
||||||
|> List.choose (fun e ->
|
|> Player.removeExpiredActions
|
||||||
match e.Type with | Hacking hack -> Some hack.Adversary.Id | _ -> None)
|
|> fun p -> p.Events
|
||||||
|
|> List.choose (fun e -> match e.Type with | Hacking hack -> Some hack.Adversary.Id | _ -> None)
|
||||||
targets
|
targets
|
||||||
|> List.filter (fun t -> hackedIds |> List.exists (fun hid -> hid = t.Id) |> not)
|
|> List.filter (fun t -> hackedIds |> List.exists (fun hid -> hid = t.Id) |> not)
|
||||||
|> List.truncate 5
|
|> List.truncate 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user