diff options
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index 4b78ae2..3d098e2 100644 --- a/src/Main.hs +++ b/src/Main.hs | |||
@@ -165,9 +165,12 @@ stateMaintenance = do | |||
165 | return x | 165 | return x |
166 | isDead <- evalF =<< MaybeT (preuse $ lStats . sDead) | 166 | isDead <- evalF =<< MaybeT (preuse $ lStats . sDead) |
167 | isUnconscious <- evalF =<< MaybeT (preuse $ lStats . sUnconscious) | 167 | isUnconscious <- evalF =<< MaybeT (preuse $ lStats . sUnconscious) |
168 | guard $ isDead || isUnconscious | 168 | isDestroyed <- evalF =<< MaybeT (preuse $ lStats . sDestroyed) |
169 | when isDead . lift . shellPutStrLn $ name ++ " is dead" | 169 | guard $ isDead || isUnconscious || isDestroyed |
170 | when (isUnconscious && not isDead) . lift . shellPutStrLn $ name ++ " is unconscious" | 170 | case (isDead, isDestroyed, isUnconscious) of |
171 | (True, _, _) -> lift . shellPutStrLn $ name ++ " is dead" | ||
172 | (_, True, _) -> lift . shellPutStrLn $ name ++ " is unconscious" | ||
173 | (_, _, True) -> lift . shellPutStrLn $ name ++ " is destroyed" | ||
171 | gFocus' . eSeqVal .= Nothing | 174 | gFocus' . eSeqVal .= Nothing |
172 | -- gFocus .= Nothing | 175 | -- gFocus .= Nothing |
173 | void $ do | 176 | void $ do |