Tweak perception. Bug: CloseToMelee is not getting applied
This commit is contained in:
@@ -29,10 +29,6 @@ perceptionUpdate ::
|
||||
Creature
|
||||
perceptionUpdate is w = rememberSounds w . basicAwarenessUpdate w . basicAttentionUpdate is w
|
||||
|
||||
--chaseCritPerceptionUpdate :: [Int] -> World -> Creature -> Creature
|
||||
--chaseCritPerceptionUpdate is w =
|
||||
-- rememberSounds w . chaseCritAwarenessUpdate w . basicAttentionUpdate is w
|
||||
|
||||
{- | Update a creatures awareness based upon the creatures' current direction
|
||||
of attention
|
||||
-} -- TODO delete?
|
||||
@@ -64,9 +60,9 @@ basicAwarenessUpdate w cr = case _cpAttention $ _crPerception cr of
|
||||
crImpulsesOnCognizant :: World -> Creature -> [[Impulse]]
|
||||
crImpulsesOnCognizant w cr = case cr ^. crType of
|
||||
ChaseCrit {} | Just sid <- cognizantVoc w cr -> [Bark sid]: replicate 5 [RandomImpulse $ RandImpulseCircMove 3]
|
||||
<> [[ChangeStrategy $ CloseToMelee 0]]
|
||||
++ [[ChangeStrategy $ CloseToMelee 0]]
|
||||
HoverCrit {} | Just sid <- cognizantVoc w cr -> [[Bark sid]]
|
||||
<> [[ChangeStrategy $ CloseToMelee 0]]
|
||||
++ [[ChangeStrategy $ CloseToMelee 0]]
|
||||
_ | Just sid <- cognizantVoc w cr -> [Bark sid]: replicate 5 [RandomImpulse $ RandImpulseCircMove 1]
|
||||
_ -> replicate 5 [RandomImpulse $ RandImpulseCircMove 3]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user