Cleanup creature update slightly, add show instance for impulses
This commit is contained in:
@@ -45,9 +45,9 @@ sentinelAI w = reloadOverride .
|
||||
|
||||
|
||||
sentinelFireType :: (Int -> Action) -> World -> Creature -> Creature
|
||||
sentinelFireType f = chainCreatureUpdatesLR
|
||||
[ Left performActions
|
||||
, Left $ watchUpdateStrat
|
||||
sentinelFireType f = chainCreatureUpdates
|
||||
[ performActions
|
||||
, watchUpdateStrat
|
||||
[ (crHasTargetLOS, \_ _ -> StrategyActions (ShootAt 0)
|
||||
[ drawwp `DoActionThen` f 0 `DoActionThen` DoImpulses [ChangeStrategy WatchAndWait]
|
||||
, aiming
|
||||
@@ -55,12 +55,12 @@ sentinelFireType f = chainCreatureUpdatesLR
|
||||
)
|
||||
, (const crAwayFromPost, const goToPostStrat)
|
||||
]
|
||||
, Left $ perceptionUpdate' [0]
|
||||
, perceptionUpdate [0]
|
||||
-- , Left $ perceptionUp 0
|
||||
, Right doStrategyActions
|
||||
, Right reloadOverride
|
||||
, Left targetYouWhenCognizant
|
||||
, Right $ overrideInternal
|
||||
, const doStrategyActions
|
||||
, const reloadOverride
|
||||
, targetYouWhenCognizant
|
||||
, const $ overrideInternal
|
||||
(\cr -> crHasTarget' cr && crStratConMatches' (GetTo (V2 0 0)) cr)
|
||||
(crActionPlan . crStrategy .~ WatchAndWait)
|
||||
]
|
||||
@@ -76,14 +76,14 @@ sentinelExtraWatchUpdate
|
||||
-> World
|
||||
-> Creature
|
||||
-> Creature
|
||||
sentinelExtraWatchUpdate xs = chainCreatureUpdatesLR
|
||||
[ Left performActions
|
||||
, Left $ watchUpdateStrat
|
||||
sentinelExtraWatchUpdate xs = chainCreatureUpdates
|
||||
[ performActions
|
||||
, watchUpdateStrat
|
||||
( xs ++ [(const crAwayFromPost, const goToPostStrat)] )
|
||||
, Left $ perceptionUpdate' [0]
|
||||
, Right doStrategyActions
|
||||
, Left targetYouWhenCognizant
|
||||
, Right $ overrideInternal
|
||||
, perceptionUpdate [0]
|
||||
, const doStrategyActions
|
||||
, targetYouWhenCognizant
|
||||
, const $ overrideInternal
|
||||
(\cr -> crHasTarget' cr && crStratConMatches' (GetTo (V2 0 0)) cr)
|
||||
(crActionPlan . crStrategy .~ WatchAndWait)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user