Add file, fix lamp doDamage space leak

This commit is contained in:
2021-05-12 20:48:55 +02:00
parent ead87af3c1
commit 9b3fbba393
13 changed files with 165 additions and 226 deletions
+23 -3
View File
@@ -111,7 +111,26 @@ miniGunCrit = defaultCreature
longCrit :: Creature
longCrit = defaultCreature
{ _crPict = basicCrPict red
, _crUpdate = stateUpdate sniperAI
-- , _crUpdate = stateUpdate sniperAI
, _crUpdate = stateUpdate $ impulsiveAI $ composeInternalAIs
[ performActions
, watchUpdateStrat
[ (crHasTargetLOS, aimThenShootStrat 0)
, (crAwayFromPost, goToPostStrat)
]
, basicPerceptionUpdate [0]
, doStrategyActions
, reloadOverrideNoHolster
, targetYouWhenCognizant
, overrideInternal (onBoth (&&) crHasTarget (crStratConMatches (GetTo (0,0))))
$ \ _ -> crActionPlan . crStrategy .~ WatchAndWait
]
, _crActionPlan = ActionPlan
{ _crImpulse = []
, _crAction = []
, _crStrategy = StrategyActions WatchAndWait [StartSentinelPost]
, _crGoal = []
}
, _crInv = IM.fromList [(0,longGun),(1,medkit 100)]
, _crInvSel = 0
, _crRad = 10
@@ -130,7 +149,8 @@ multGunCrit = defaultCreature
, _crUpdate = stateUpdate $ impulsiveAI $ composeInternalAIs
[ performActions
, watchUpdateStrat
[ (crHasTargetLOS, shootFirstMiss 0)
[ (not . crSafeDistFromTarg 150 , fleeTime 5)
, (crHasTargetLOS, shootFirstMiss 0)
, (crAwayFromPost, goToPostStrat)
]
, basicPerceptionUpdate [0]
@@ -196,7 +216,7 @@ autoCrit = defaultCreature
, _crActionPlan = ActionPlan
{ _crImpulse = []
, _crAction = []
, _crStrategy = StrategyActions [StartSentinelPost] WatchAndWait
, _crStrategy = StrategyActions WatchAndWait [StartSentinelPost]
, _crGoal = []
}
, _crInv = IM.fromList [(0,autoGun),(1,medkit 100)]