This commit is contained in:
2021-12-11 22:08:43 +00:00
parent 7116129a37
commit 6cd59d99bc
17 changed files with 115 additions and 170 deletions
+3 -4
View File
@@ -8,8 +8,8 @@ import Dodge.Creature.Volition
import Data.List
goToPostStrat :: World -> Creature -> Strategy
goToPostStrat w cr = case find sentinelGoal $ _crGoal $ _crActionPlan cr of
goToPostStrat :: Creature -> Strategy
goToPostStrat cr = case find sentinelGoal $ _crGoal $ _crActionPlan cr of
Just (SentinelAt p _) -> StrategyActions (GetTo p)
[DoActionThen (WaitThen 150 holsterIfAiming)
$ DoActionThen (PathTo p)
@@ -21,6 +21,5 @@ goToPostStrat w cr = case find sentinelGoal $ _crGoal $ _crActionPlan cr of
sentinelGoal (SentinelAt _ _) = True
sentinelGoal _ = False
holsterIfAiming
| crIsAiming (w,cr) = holsterWeapon
| crIsAiming cr = holsterWeapon
| otherwise = NoAction