Simplify creature update
This commit is contained in:
@@ -11,6 +11,7 @@ module Dodge.Creature
|
||||
, smallChaseCrit
|
||||
) where
|
||||
import Dodge.Creature.State.Data
|
||||
import Dodge.Creature.Update
|
||||
--import Dodge.Item.Weapon.Grenade
|
||||
import Dodge.Item.Weapon.Booster
|
||||
import Dodge.Item.Weapon.Utility
|
||||
@@ -20,7 +21,7 @@ import Dodge.Item.Craftable
|
||||
--import Dodge.Creature.SetTarget
|
||||
import Dodge.Creature.Volition
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Creature.Impulse
|
||||
--import Dodge.Creature.Impulse
|
||||
import Dodge.Creature.SentinelAI
|
||||
import Dodge.Creature.LauncherCrit
|
||||
import Dodge.Creature.PistolCrit
|
||||
@@ -66,8 +67,8 @@ spawnerCrit = defaultCreature
|
||||
miniGunCrit :: Creature
|
||||
miniGunCrit = defaultCreature
|
||||
{ _crPict = basicCrPict red
|
||||
, _crUpdate = stateUpdate $ impulsiveAI $
|
||||
sentinelFireType (const shootTillEmpty)
|
||||
, _crUpdate = defaultImpulsive $
|
||||
[sentinelFireType (const shootTillEmpty)]
|
||||
, _crActionPlan = ActionPlan
|
||||
{ _crImpulse = []
|
||||
, _crAction = []
|
||||
@@ -87,7 +88,7 @@ longCrit :: Creature
|
||||
longCrit = defaultCreature
|
||||
{ _crPict = basicCrPict red
|
||||
-- , _crUpdate = stateUpdate sniperAI
|
||||
, _crUpdate = stateUpdate $ impulsiveAI $ sentinelFireType $ const shootTillEmpty
|
||||
, _crUpdate = defaultImpulsive $ [sentinelFireType $ const shootTillEmpty]
|
||||
, _crActionPlan = ActionPlan
|
||||
{ _crImpulse = []
|
||||
, _crAction = []
|
||||
@@ -107,7 +108,7 @@ multGunCrit = defaultCreature
|
||||
, _crInvSel = 0
|
||||
, _crRad = 10
|
||||
, _crHP = 300
|
||||
, _crUpdate = stateUpdate $ impulsiveAI $ sentinelExtraWatchUpdate
|
||||
, _crUpdate = defaultImpulsive $ [sentinelExtraWatchUpdate
|
||||
[ ( const $ not . crHasAmmo
|
||||
, \_ _ -> StrategyActions Reload reloadActions
|
||||
)
|
||||
@@ -120,6 +121,7 @@ multGunCrit = defaultCreature
|
||||
[ drawwp `DoActionThen` shootFirstMiss `DoActionThen` DoImpulses [ChangeStrategy WatchAndWait] ]
|
||||
)
|
||||
]
|
||||
]
|
||||
, _crActionPlan = ActionPlan
|
||||
{ _crImpulse = []
|
||||
, _crAction = []
|
||||
@@ -148,7 +150,7 @@ startCr = defaultCreature
|
||||
, _crMvDir = pi/2
|
||||
, _crID = 0
|
||||
, _crPict = basicCrPict black
|
||||
, _crUpdate = stateUpdate yourControl
|
||||
, _crUpdate = stateUpdate' yourControl'
|
||||
, _crRad = 10
|
||||
, _crMass = 10
|
||||
, _crHP = 1000
|
||||
|
||||
Reference in New Issue
Block a user