Cleanup warnings
This commit is contained in:
@@ -7,6 +7,7 @@ import Dodge.Data
|
||||
import Dodge.Creature.AlertLevel.Data
|
||||
|
||||
import Control.Lens
|
||||
import Control.Monad.Reader
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
{- | Assumes that you are id 0: if creature is cognizant of you, sets you as target -}
|
||||
targetYouWhenCognizant
|
||||
@@ -16,3 +17,9 @@ targetYouWhenCognizant
|
||||
targetYouWhenCognizant w cr = case cr ^? crAwarenessLevel . ix 0 of
|
||||
Just (Cognizant _) -> cr & crTarget ?~ _creatures w IM.! 0
|
||||
_ -> cr & crTarget .~ Nothing
|
||||
|
||||
targetYouWhenCognizantR :: Creature -> Reader World Creature
|
||||
targetYouWhenCognizantR cr = reader $ \w -> case cr ^? crAwarenessLevel . ix 0 of
|
||||
-- Just (Cognizant _) -> cr & crTarget ?~ _creatures w IM.! 0
|
||||
Just (Cognizant _) -> cr {_crTarget = Just $! _creatures w IM.! 0}
|
||||
_ -> cr & crTarget .~ Nothing
|
||||
|
||||
Reference in New Issue
Block a user