ActionPlan refactor

This commit is contained in:
2022-07-21 22:56:19 +01:00
parent 583027112d
commit dfc9b2dca9
9 changed files with 180 additions and 61 deletions
+1 -7
View File
@@ -3,12 +3,10 @@ module Dodge.Creature.Volition
( holsterWeapon
, drawWeapon
, shootTillEmpty
, fleeFrom
-- , fleeFrom
, shootFirstMiss
) where
import Dodge.Data
--import Dodge.Base.Collide
import Dodge.Creature.Test
import Dodge.SoundLogic.LoadSound
import Geometry
@@ -16,10 +14,6 @@ holsterWeapon, drawWeapon :: Action
holsterWeapon = DoImpulses [ChangePosture AtEase, MakeSound whiteNoiseFadeOutS]
drawWeapon = DoImpulses [ChangePosture Aiming, MakeSound whiteNoiseFadeInS]
fleeFrom :: Creature -> Maybe Creature -> Action
fleeFrom cr mtcr = case mtcr of
Just tcr -> DoImpulses [MoveForward 3, TurnToward ((2 *.* _crPos cr) -.- _crPos tcr) (pi/4)]
Nothing -> NoAction
shootTillEmpty :: Action
--shootTillEmpty = (crCanShoot `DoActionWhile` DoImpulses [UseItem])