50 lines
1.4 KiB
Haskell
50 lines
1.4 KiB
Haskell
module Dodge.Creature.ArmourChase
|
|
( armourChaseCrit
|
|
) where
|
|
import Dodge.Data
|
|
import Dodge.Default
|
|
import Dodge.Creature.State
|
|
import Dodge.Creature.ChainUpdates
|
|
import Dodge.Creature.ReaderUpdate
|
|
import Dodge.Creature.Perception
|
|
import Dodge.Creature.Picture
|
|
import Dodge.Creature.Impulse
|
|
import Dodge.Creature.Action
|
|
import Dodge.Item.Equipment
|
|
import Dodge.Item.Consumable
|
|
import Picture
|
|
|
|
import qualified Data.IntMap.Strict as IM
|
|
import Control.Lens
|
|
|
|
armourChaseCrit :: Creature
|
|
armourChaseCrit = defaultCreature
|
|
{ _crUpdate = stateUpdate $ impulsiveAI $ chainCreatureUpdatesLR
|
|
[ Left $ watchUpdateStrat []
|
|
, Right doStrategyActions
|
|
, Left performActions
|
|
, Left targetYouWhenCognizant
|
|
, Left $ setTargetMv (\_ -> _targetCr . _crIntention)
|
|
, Left flockACC
|
|
, Left $ perceptionUpdate' [0]
|
|
, Left goToTarget
|
|
, Right overrideMeleeCloseTarget
|
|
, Right (crMeleeCooldown %~ max 0 . subtract 1)
|
|
]
|
|
, _crHP = 300
|
|
, _crPict = basicCrPict green
|
|
, _crInv = IM.fromList
|
|
[(0,frontArmour)
|
|
,(1,medkit 200)
|
|
]
|
|
, _crActionPlan = ActionPlan
|
|
{_crImpulse = []
|
|
,_crAction = []
|
|
,_crStrategy = FollowImpulses
|
|
,_crGoal = [Kill 0]
|
|
}
|
|
, _crMeleeCooldown = 0
|
|
, _crGroup = ShieldGroup
|
|
, _crMvType = defaultChaseMvType
|
|
}
|