summaryrefslogtreecommitdiff
path: root/src/Sequence/Utils.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-06-13 18:44:54 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-06-13 18:44:54 +0200
commit12dce406808620989646a163ff77a0782eb5ef63 (patch)
treea12d4af28af55ba7b851ec8ca3e5f1bf27f572e6 /src/Sequence/Utils.hs
parentae1ea97cdcca8d230dbee9460ae5d28242404d20 (diff)
download2017-01-16_17:13:37-12dce406808620989646a163ff77a0782eb5ef63.tar
2017-01-16_17:13:37-12dce406808620989646a163ff77a0782eb5ef63.tar.gz
2017-01-16_17:13:37-12dce406808620989646a163ff77a0782eb5ef63.tar.bz2
2017-01-16_17:13:37-12dce406808620989646a163ff77a0782eb5ef63.tar.xz
2017-01-16_17:13:37-12dce406808620989646a163ff77a0782eb5ef63.zip
combat rounds
Diffstat (limited to 'src/Sequence/Utils.hs')
-rw-r--r--src/Sequence/Utils.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Sequence/Utils.hs b/src/Sequence/Utils.hs
index dc6657a..513cb0b 100644
--- a/src/Sequence/Utils.hs
+++ b/src/Sequence/Utils.hs
@@ -61,7 +61,7 @@ withFocus f = use gFocus >>= maybe (shellPutErrLn $ "Currently not focusing any
61withFocus' :: (Entity -> Sh GameState a) -> Sh GameState (Maybe a) 61withFocus' :: (Entity -> Sh GameState a) -> Sh GameState (Maybe a)
62withFocus' f = preuse gFocus' >>= maybe (Nothing <$ shellPutErrLn "Currently not focusing any entity") (fmap Just . f) 62withFocus' f = preuse gFocus' >>= maybe (Nothing <$ shellPutErrLn "Currently not focusing any entity") (fmap Just . f)
63 63
64focusState :: MonadState GameState m => Traversal' GameState a -> StateT a (MaybeT m) b -> m (Maybe b) 64focusState :: MonadState s m => Traversal' s a -> StateT a (MaybeT m) b -> m (Maybe b)
65focusState lens action = runMaybeT $ uncurry (<$) . over _2 (lens .=) =<< runStateT action =<< MaybeT (preuse lens) 65focusState lens action = runMaybeT $ uncurry (<$) . over _2 (lens .=) =<< runStateT action =<< MaybeT (preuse lens)
66 66
67unaligned = view faction' def 67unaligned = view faction' def