This commit is contained in:
2021-12-11 22:08:43 +00:00
parent 7116129a37
commit 6cd59d99bc
17 changed files with 115 additions and 170 deletions
+6 -10
View File
@@ -16,7 +16,6 @@ import Dodge.Item.Weapon.Booster
import Dodge.Item.Weapon.Utility
import Dodge.Item.Weapon.Drone
import Dodge.Item.Craftable
--import Dodge.Creature.ReaderUpdate
--import Dodge.Creature.AlertLevel
--import Dodge.Creature.SetTarget
import Dodge.Creature.Volition
@@ -52,7 +51,6 @@ import qualified IntMapHelp as IM
--import Data.Maybe
--import Data.Function
import Control.Lens
--import Control.Monad.Reader
--import System.Random
--import qualified Data.Set as S
--import qualified Data.Map as M
@@ -110,12 +108,12 @@ multGunCrit = defaultCreature
, _crRad = 10
, _crHP = 300
, _crUpdate = stateUpdate $ impulsiveAI $ sentinelExtraWatchUpdate
[ ( not . crHasAmmo
[ ( const $ not . crHasAmmo
, \_ _ -> StrategyActions Reload reloadActions
)
, (not . crSafeDistFromTarg 150
, (const $ not . crSafeDistFromTarg 150
, \_ cr -> StrategyActions Flee
[(not . crSafeDistFromTarg 150) `DoActionWhile` UseTarget (fleeFrom cr)
[const (not . crSafeDistFromTarg 150) `DoActionWhile` UseTarget (fleeFrom cr)
`DoActionThen` DoImpulses [ChangeStrategy WatchAndWait] ]
)
, (crHasTargetLOS, \_ _ -> StrategyActions (ShootAt 0)
@@ -130,10 +128,10 @@ multGunCrit = defaultCreature
}
}
where
drawwp = DoActionIfElse NoAction crIsAiming (DoActionThen drawWeapon (WaitThen 50 NoAction))
drawwp = DoActionIfElse NoAction (const crIsAiming) (DoActionThen drawWeapon (WaitThen 50 NoAction))
reloadActions =
[ holsterWeapon
, WaitThen 1 $ DoActionWhileInterrupt NoAction crIsReloading (DoImpulses [ChangeStrategy WatchAndWait])
, WaitThen 1 $ DoActionWhileInterrupt NoAction (const crIsReloading) (DoImpulses [ChangeStrategy WatchAndWait])
]
addArmour :: Creature -> Creature
@@ -163,9 +161,7 @@ startCr = defaultCreature
}
{- | Items you start with. -}
startInvList :: [Item]
startInvList =
[
]
startInvList = [ ]
startInventory :: IM.IntMap Item
startInventory = IM.fromList $ zip [0..] startInvList
testInventory :: IM.IntMap Item