Cleanup creature update slightly, add show instance for impulses

This commit is contained in:
2022-03-26 08:08:16 +00:00
parent ae7fbe29c2
commit 3698a738f3
17 changed files with 158 additions and 198 deletions
+8 -8
View File
@@ -27,9 +27,9 @@ import Control.Lens
spreadGunCrit :: Creature
spreadGunCrit = defaultCreature
{ _crPict = basicCrPict red
, _crUpdate = stateUpdate $ impulsiveAI $ chainCreatureUpdatesLR
[Left performActions
,Left $ watchUpdateStrat
, _crUpdate = stateUpdate $ impulsiveAI $ chainCreatureUpdates
[performActions
,watchUpdateStrat
[ (crHasTargetLOS, \_ _ -> StrategyActions (ShootAt 0)
[DoActionIf (const $ not . crIsAiming) drawWeapon
,DoActionThen
@@ -39,11 +39,11 @@ spreadGunCrit = defaultCreature
)
, (const crAwayFromPost, const goToPostStrat)
]
,Left $ perceptionUpdate' [0]
,Right doStrategyActions
,Right reloadOverride
,Left targetYouWhenCognizant
,Right $ overrideInternal
,perceptionUpdate [0]
,const doStrategyActions
,const reloadOverride
,targetYouWhenCognizant
,const $ overrideInternal
(\cr -> crHasTarget' cr && crStratConMatches' (GetTo (V2 0 0)) cr)
(\ cr -> cr & crActionPlan . crStrategy .~ WatchAndWait)
]