Make reloading based upon creature stance

This commit is contained in:
2022-06-20 00:53:47 +01:00
parent 8d457033a2
commit 2f4b381484
11 changed files with 91 additions and 77 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ onBoth :: (a -> b -> c) -> (d -> a) -> (d -> b) -> d -> c
onBoth f g h x = f (g x) (h x)
crIsReloading :: Creature -> Bool
crIsReloading cr = case cr ^? crInv . ix (_crInvSel cr) . itConsumption . laReloadState . _Just' of
Just t -> t > 0
crIsReloading cr = case cr ^? crStance . posture of
Just Reloading -> True
_ -> False
crCanSeeCr :: Creature -> (World, Creature) -> Bool