Refactor bullet particles
This commit is contained in:
@@ -7,7 +7,6 @@ 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
|
||||
@@ -18,8 +17,3 @@ 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