Commit before trying to use traverseMaybe for creature update
This commit is contained in:
@@ -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'''
|
||||
|
||||
Reference in New Issue
Block a user