This commit is contained in:
Joseph Ferano 2022-03-09 12:12:00 +07:00
parent 5796d5d03d
commit e0fea6dd64

View File

@ -75,7 +75,7 @@ let runHackerBattle defender (hack : HackItem) =
|> fun p -> p.Events
|> List.choose (fun event ->
match event.Type with
| Shielding id -> defender.Inventory |> Inventory.getShields |> List.find (fun item -> item.Item.Id = id) |> Some
| Shielding id -> defender.Inventory |> Inventory.getShields |> List.tryFind (fun item -> item.Item.Id = id)
| _ -> None)
|> List.map (fun shield -> if hack.Class = shield.Class then Weak else Strong)
|> List.contains Weak