AI refactor
This commit is contained in:
+7
-19
@@ -3,6 +3,8 @@ module Dodge.Creature
|
||||
, module Dodge.Creature.Inanimate
|
||||
, launcherCrit
|
||||
, pistolCrit
|
||||
, ltAutoCrit
|
||||
, spreadGunCrit
|
||||
)
|
||||
where
|
||||
import Dodge.Creature.Stance.Data
|
||||
@@ -16,6 +18,8 @@ import Dodge.Creature.SetTarget
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Creature.LauncherCrit
|
||||
import Dodge.Creature.PistolCrit
|
||||
import Dodge.Creature.LtAutoCrit
|
||||
import Dodge.Creature.SpreadGunCrit
|
||||
import Dodge.Data
|
||||
import Dodge.AIs
|
||||
import Dodge.Default
|
||||
@@ -56,8 +60,8 @@ import Control.Concurrent
|
||||
|
||||
spawnerCrit :: Creature
|
||||
spawnerCrit = defaultCreature
|
||||
{ _crUpdate = stateUpdate $ spawnerAI chaseCrit
|
||||
, _crHP = 300
|
||||
{ --_crUpdate = stateUpdate $ spawnerAI chaseCrit
|
||||
_crHP = 300
|
||||
, _crPict = basicCrPict blue
|
||||
, _crState = defaultState {_goals = [[WaitFor 0]] }
|
||||
, _crInv = IM.empty -- IM.fromList [(0,frontArmour)]
|
||||
@@ -67,10 +71,7 @@ smallChaseCrit = defaultCreature
|
||||
{ _crUpdate = stateUpdate $ meleeCooldown $ impulsiveAI $ chaseTarget targetYouLOS
|
||||
, _crHP = 1
|
||||
, _crRad = 4
|
||||
, _crPict = basicCrPict green
|
||||
, _crState = defaultState
|
||||
{_goals = [[Wait]]
|
||||
}
|
||||
, _crPict = basicCrPict yellow
|
||||
, _crInv = IM.empty -- IM.fromList [(0,frontArmour)]
|
||||
, _crCorpse = onLayer CorpseLayer $ color (greyN 0.5) $ circleSolid 4
|
||||
, _crFaction = ColorFaction green
|
||||
@@ -80,9 +81,6 @@ chaseCrit = defaultCreature
|
||||
{ _crUpdate = stateUpdate $ meleeCooldown $ impulsiveAI $ chaseTarget targetYouLOS
|
||||
, _crHP = 300
|
||||
, _crPict = basicCrPict green
|
||||
, _crState = defaultState
|
||||
{_goals = [[Wait]]
|
||||
}
|
||||
, _crInv = IM.empty
|
||||
, _crMeleeCooldown = Just 0
|
||||
, _crFaction = ColorFaction green
|
||||
@@ -171,16 +169,6 @@ multGunCrit = defaultCreature
|
||||
, _crGoal = []
|
||||
}
|
||||
}
|
||||
spreadGunCrit :: Creature
|
||||
spreadGunCrit = defaultCreature
|
||||
{ _crPict = basicCrPict red
|
||||
, _crUpdate = stateUpdate chargeAI
|
||||
, _crInv = IM.fromList [(0,spreadGun),(1,medkit 100)]
|
||||
, _crInvSel = 0
|
||||
, _crRad = 10
|
||||
, _crState = defaultState {_goals = [[Init]]}
|
||||
, _crHP = 300
|
||||
}
|
||||
autoCrit :: Creature
|
||||
autoCrit = defaultCreature
|
||||
{ _crPict = basicCrPict red
|
||||
|
||||
Reference in New Issue
Block a user