Refactor ai
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user