Commit before trying to use traverseMaybe for creature update

This commit is contained in:
jgk
2021-08-17 23:38:08 +02:00
parent a283bb286a
commit 5971fae5ec
+2 -2
View File
@@ -39,11 +39,11 @@ meleeCooldown u w (f,g) cr = u w (f,g) $ cr & crMeleeCooldown . _Just %~ (max 0
-- the whole of this update cycle could do with a rethink, it is becoming
-- convoluted
stateUpdate :: CRUpdate -> CRUpdate
stateUpdate u w (f,g) cr = case u w (f,g) cr of
stateUpdate u w (f,g) cr = case u w (f,g) (updateMovement g cr) of
((f',g') , maybeCr) ->
( (invSideEff cr . movementSideEff cr . deathEff . f'
, g')
, fmap (stepReloading . stepItemUseCooldown . doDamage . crAutoReload . updateMovement g') $ crOrCorpse =<< maybeCr
, fmap (stepReloading . stepItemUseCooldown . doDamage . crAutoReload) $ crOrCorpse =<< maybeCr
)
where
crOrCorpse cr'''