Fix CloseToMelee bug
The problem was not updating the strategy to WarningCry. The whole procedure needs more work.
This commit is contained in:
@@ -51,11 +51,13 @@ basicAwarenessUpdate w cr = case _cpAttention $ _crPerception cr of
|
||||
any isCognizant $ IM.unionWith cogRaised oldAwareness newAwareness
|
||||
maybeBecomeCognizant = fromMaybe id $ do
|
||||
guard becomesCognizant
|
||||
-- guard $ cr ^. crVocalization == VocReady
|
||||
return $
|
||||
crActionPlan . apAction
|
||||
(crActionPlan . apStrategy .~ WarningCry) .
|
||||
(crActionPlan . apAction
|
||||
.~ [ImpulsesList (crImpulsesOnCognizant w cr)
|
||||
, AimAt 0 (w ^?! cWorld . lWorld . creatures . ix 0 . crPos . _xy)
|
||||
]
|
||||
])
|
||||
|
||||
crImpulsesOnCognizant :: World -> Creature -> [[Impulse]]
|
||||
crImpulsesOnCognizant w cr = case cr ^. crType of
|
||||
|
||||
Reference in New Issue
Block a user