Remove a usage of StrategyActions

This commit is contained in:
2025-10-15 19:41:26 +01:00
parent f9bcac915f
commit 57ca53638a
2 changed files with 22 additions and 34 deletions
+1 -8
View File
@@ -149,19 +149,12 @@ goToTarget w cr = case cr ^? crIntention . mvToPoint . _Just of
Just p -> cr & crActionPlan . apAction .~ [PathTo p]
_ -> viewTarget w cr
--lookAroundSelf :: Action
--lookAroundSelf = UseSelf CrTurnAround
viewTarget :: World -> Creature -> Creature
viewTarget w cr = case cr ^? crIntention . viewPoint . _Just of
Just p
| hasLOSIndirect p (cr ^. crPos . _xy) w ->
cr
& crActionPlan . apAction
.~ [TurnToPoint p]
-- %~ replaceNullWith
-- ( TurnToPoint p
-- )
& crActionPlan . apAction .~ [TurnToPoint p]
& crIntention . viewPoint .~ Nothing
& crActionPlan . apStrategy .~ Investigate
| otherwise ->