Implement basic attention and awareness

This commit is contained in:
2021-05-08 17:34:25 +02:00
parent 1aa59cc205
commit 86faf9fd01
12 changed files with 243 additions and 135 deletions
+8 -3
View File
@@ -9,6 +9,7 @@ import Dodge.Creature.Impulse.Data
import Dodge.Creature.ImpulseRat
import Dodge.Creature.ActionRat
import Dodge.Creature.Rationality.Data
import Dodge.Creature.AlertLevel
import Dodge.Data
import Dodge.AIs
import Dodge.Default
@@ -94,7 +95,11 @@ armourChaseCrit = defaultCreature
miniGunCrit' :: Creature
miniGunCrit' = defaultCreature
{ _crPict = basicCrPict red
, _crUpdate = stateUpdate $ impulsiveAI $ actionUpdateAI $ shootAtTarget targetYouLOS
, _crUpdate = stateUpdate $ impulsiveAI $ composeInternalAIs
[ actionUpdateAI performActions
, shootAtTarget targetYouCognizant
, basicPerceptionUpdate [0]
]
, _crInv = IM.fromList [(0,miniGun)]
, _crInvSel = 0
, _crRad = 10
@@ -102,7 +107,7 @@ miniGunCrit' = defaultCreature
, _crHP = 500
, _crRationality = ActionRat
{ _crImpulse = []
, _crAction = [AimAtCloseSlow 0 (0,0) 0.05 0.2 (pi/4) ]
, _crAction = [AimAtCloseSlow 0 (0,0) 0.2 0.01 (pi/4) ]
}
}
miniGunCrit :: Creature
@@ -237,7 +242,7 @@ startCr = defaultCreature
, _crUpdate = stateUpdate yourControl
, _crRad = 10
, _crMass = 10
, _crHP = 1000
, _crHP = 1000000000
, _crMaxHP = 1500
, _crInv = startInventory
, _crCorpse = onLayer CorpseLayer $ color (greyN 0.5) $ pictures [color (greyN 0.8) $ circleSolid 10, circLine 10]