First implementation of creatures detecting sounds
This commit is contained in:
@@ -47,7 +47,9 @@ tryMeleeAttack cr tcr
|
||||
setMvPos :: Creature -> Reader World Creature
|
||||
setMvPos cr = pure $ cr & crMvTarget .~ mpos
|
||||
where
|
||||
mpos = (_crPos <$> _crTarget cr) <|> listToMaybe (_soundsToInvestigate $ _crMemory cr)
|
||||
mpos = (_crPos <$> _crTarget cr)
|
||||
<|> _crMvTarget cr
|
||||
<|> listToMaybe (_soundsToInvestigate $ _crMemory cr)
|
||||
|
||||
setTargetMv
|
||||
:: (Creature -> Reader World (Maybe Creature)) -- ^ Function for determining target
|
||||
|
||||
Reference in New Issue
Block a user