Refactor creature ai

This commit is contained in:
2021-05-20 21:25:42 +02:00
parent 4463dc7716
commit 114335fdbe
32 changed files with 449 additions and 270 deletions
+5 -5
View File
@@ -48,7 +48,6 @@ sentinelAI = sentinelExtraWatchUpdate
)
]
>=> reloadOverrideR
where
sentinelFireType
:: (Int -> Action)
@@ -66,8 +65,9 @@ sentinelFireType f = performActionsR
>=> doStrategyActionsR
>=> reloadOverrideR
>=> targetYouWhenCognizantR
>=> (overrideInternalR (onBoth (&&) crHasTarget (crStratConMatches (GetTo (0,0))))
$ \ _ -> crActionPlan . crStrategy .~ WatchAndWait)
>=> overrideInternalR
(onBoth (&&) crHasTarget (crStratConMatches (GetTo (0,0))))
(\ _ -> crActionPlan . crStrategy .~ WatchAndWait)
where
drawwp = DoActionIfElse NoAction crIsAiming (DoActionThen drawWeapon (WaitThen 50 NoAction))
aiming = AimAtCloseSlow
@@ -89,8 +89,8 @@ sentinelExtraWatchUpdate xs = performActionsR
>=> doStrategyActionsR
-- >=> reloadOverrideR
>=> targetYouWhenCognizantR
>=> (overrideInternalR (onBoth (&&) crHasTarget (crStratConMatches (GetTo (0,0))))
$ \ _ -> crActionPlan . crStrategy .~ WatchAndWait)
>=> overrideInternalR (onBoth (&&) crHasTarget (crStratConMatches (GetTo (0,0))))
(\ _ -> crActionPlan . crStrategy .~ WatchAndWait)
shootAtAdvance :: Int -> [Action]