Dataify impulse/action/strategy function fields
This commit is contained in:
@@ -23,7 +23,7 @@ sentinelAI w = reloadOverride .
|
||||
[ (crHasTargetLOS
|
||||
, \ _ cr -> StrategyActions (ShootAt (fromJust $ tcid cr))
|
||||
[ DoActionIf
|
||||
(const $ not . crIsAiming)
|
||||
(WdCrNegate $ WdCrBlfromCrBl CrIsAiming)
|
||||
(drawWeapon `DoActionThen` (50 `WaitThen` NoAction))
|
||||
`DoActionThen` lostest
|
||||
`DoActionWhile` advanceShoot
|
||||
@@ -38,7 +38,7 @@ sentinelAI w = reloadOverride .
|
||||
where
|
||||
advanceShoot = DoImpulses [UseItem, MoveForward 3]
|
||||
tcid cr = _crID <$> _targetCr (_crIntention cr)
|
||||
lostest w' cr = maybe False (\cid -> canSee (_crID cr) cid w') (tcid cr)
|
||||
lostest = WdCrLOSTarget -- w' cr = maybe False (\cid -> canSee (_crID cr) cid w') (tcid cr)
|
||||
|
||||
--chainCreatureUpdates :: [World -> Creature -> Creature] -> World -> Creature -> Creature
|
||||
--chainCreatureUpdates ls w cr = foldr (\f -> f w) cr ls
|
||||
@@ -65,7 +65,7 @@ sentinelFireType f = chainCreatureUpdates
|
||||
(crActionPlan . apStrategy .~ WatchAndWait)
|
||||
]
|
||||
where
|
||||
drawwp = DoActionIfElse NoAction (const crIsAiming) (DoActionThen drawWeapon (WaitThen 50 NoAction))
|
||||
drawwp = DoActionIfElse NoAction (WdCrBlfromCrBl CrIsAiming) (DoActionThen drawWeapon (WaitThen 50 NoAction))
|
||||
aiming = AimAt
|
||||
{ _targetID = 0
|
||||
, _targetSeenAt = V2 0 0 -- hack
|
||||
|
||||
Reference in New Issue
Block a user