Cleanup creatures somewhat, fix LOS to LOSIndirect

This commit is contained in:
2022-07-03 15:07:55 +01:00
parent b43ec42a2e
commit ffdfaa41c0
24 changed files with 81 additions and 116 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ basicAwarenessUpdate cr = case _cpAttention $ _crPerception cr of
return $ Move p
maybeBark
| becomesCognizant = case vocalizationTest cr of
Just sid -> crActionPlan . crAction .~
Just sid -> crActionPlan . apAction .~
[ImpulsesList
[[Bark sid]
,[RandomImpulse thejitter]
@@ -85,7 +85,7 @@ chaseCritAwarenessUpdate w cr = case _cpAttention $ _crPerception cr of
&& cr ^? crVocalization . vcCoolDown == Just 0
= let soundid = evalState (takeOne (_vcWarnings (_crVocalization cr))) (_randGen w)
numjits = fst $ randomR (15,25) (_randGen w)
in crActionPlan . crStrategy .~ StrategyActions WarningCry
in crActionPlan . apStrategy .~ StrategyActions WarningCry
[ImpulsesList ([Bark soundid]: replicate numjits [RandomImpulse thejitter]++
[[ChangeStrategy $ CloseToMelee 0] ])
, AimAt 0 (_crPos $ _creatures w IM.! 0)