Refactor ai

This commit is contained in:
2021-05-12 14:24:31 +02:00
parent 86faf9fd01
commit ead87af3c1
25 changed files with 718 additions and 453 deletions
+4 -5
View File
@@ -36,11 +36,10 @@ charFiringStrat
-> Int -- ^ Creature id
-> World
-> World
charFiringStrat strats cid w =
let Just (c :<| _) = w ^? creatures . ix cid . crInv
. ix (_crInvSel $ _creatures w IM.! cid) . itAttachment
. _Just . itCharMode
in fromJust (Prelude.lookup c strats) cid w
charFiringStrat strats cid w = case w ^? creatures . ix cid . crInv
. ix (_crInvSel $ _creatures w IM.! cid) . itAttachment . _Just . itCharMode of
Just (c :<| _) -> fromJust (Prelude.lookup c strats) cid w
Nothing -> w
increaseFuse
:: Int -- ^ Old fuse time