diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-07-09 14:45:28 +0200 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-07-09 14:45:28 +0200 |
commit | a016d9c507e906cba12f8d39d42a93e09ab4e7ec (patch) | |
tree | 4b13e71cfde0b1ec5488165c30045241fb0e1923 /src/Main.hs | |
parent | 90c94957cb7f1fef4df051d18700a34ecb797293 (diff) | |
download | 2017-01-16_17:13:37-a016d9c507e906cba12f8d39d42a93e09ab4e7ec.tar 2017-01-16_17:13:37-a016d9c507e906cba12f8d39d42a93e09ab4e7ec.tar.gz 2017-01-16_17:13:37-a016d9c507e906cba12f8d39d42a93e09ab4e7ec.tar.bz2 2017-01-16_17:13:37-a016d9c507e906cba12f8d39d42a93e09ab4e7ec.tar.xz 2017-01-16_17:13:37-a016d9c507e906cba12f8d39d42a93e09ab4e7ec.zip |
Transfinite armor
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 |