Move towards incorporating sound into ai

This commit is contained in:
2021-09-08 17:41:13 +01:00
parent 45bbf9b005
commit 643cd5a420
25 changed files with 150 additions and 144 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ Deals with setting a target for creatures
module Dodge.Creature.SetTarget
where
import Dodge.Data
import Dodge.Creature.AlertLevel.Data
import Dodge.Creature.Perception.Data
import Control.Lens
import qualified Data.IntMap.Strict as IM
@@ -13,7 +13,7 @@ targetYouWhenCognizant
:: World
-> Creature
-> Creature
targetYouWhenCognizant w cr = case cr ^? crAwarenessLevel . ix 0 of
targetYouWhenCognizant w cr = case cr ^? crPerception . crAwarenessLevel . ix 0 of
Just (Cognizant _) -> cr & crTarget ?~ _creatures w IM.! 0
_ -> cr & crTarget .~ Nothing