Make creature update an external function
This commit is contained in:
@@ -6,18 +6,11 @@ module Dodge.Creature.ChaseCrit
|
||||
import Dodge.Data
|
||||
import Dodge.Default
|
||||
import Dodge.Creature.Picture
|
||||
import Dodge.Creature.Update
|
||||
import Dodge.Creature.ReaderUpdate
|
||||
import Dodge.Creature.Action
|
||||
import Dodge.Creature.Perception
|
||||
import Dodge.Item.Consumable
|
||||
import Dodge.Item.Equipment
|
||||
import Dodge.SoundLogic
|
||||
--import Geometry
|
||||
import Picture
|
||||
--import Dodge.RandomHelp
|
||||
|
||||
--import Data.Maybe
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
--import System.Random
|
||||
@@ -37,19 +30,7 @@ invisibleChaseCrit = chaseCrit
|
||||
& crInvEquipped . at 0 ?~ OnLeftWrist
|
||||
chaseCrit :: Creature
|
||||
chaseCrit = defaultCreature
|
||||
{ _crUpdate = defaultImpulsive
|
||||
[ const doStrategyActions
|
||||
, performActions
|
||||
, const overrideMeleeCloseTarget
|
||||
, const setViewPos
|
||||
, setMvPos
|
||||
, chaseCritMv
|
||||
, chaseCritPerceptionUpdate [0]
|
||||
, targetYouWhenCognizant
|
||||
, const searchIfDamaged
|
||||
, const (crMeleeCooldown %~ max 0 . subtract 1)
|
||||
]
|
||||
, _crName = "chaseCrit"
|
||||
{ _crName = "chaseCrit"
|
||||
, _crHP = 150
|
||||
, _crInv = IM.fromList [(0,medkit 200)]
|
||||
, _crMeleeCooldown = 0
|
||||
@@ -66,3 +47,4 @@ chaseCrit = defaultCreature
|
||||
] 50 0
|
||||
, _crMvType = defaultChaseMvType
|
||||
}
|
||||
& crType . humanoidAI .~ ChaseAI
|
||||
|
||||
Reference in New Issue
Block a user