diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-11 23:00:13 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-11 23:00:13 +0200 |
commit | bf24ff9ffd25841da5e20386548fb63ff191ed9a (patch) | |
tree | bcdfee20698fa0accdbb5dc5457770f45cd19fd0 /src/Sequence/Contact | |
parent | 1bdb2f64c92f79918ea5e1a3f98af45e06d4aae7 (diff) | |
download | 2017-01-16_17:13:37-bf24ff9ffd25841da5e20386548fb63ff191ed9a.tar 2017-01-16_17:13:37-bf24ff9ffd25841da5e20386548fb63ff191ed9a.tar.gz 2017-01-16_17:13:37-bf24ff9ffd25841da5e20386548fb63ff191ed9a.tar.bz2 2017-01-16_17:13:37-bf24ff9ffd25841da5e20386548fb63ff191ed9a.tar.xz 2017-01-16_17:13:37-bf24ff9ffd25841da5e20386548fb63ff191ed9a.zip |
Death & Unconsciousness
Diffstat (limited to 'src/Sequence/Contact')
-rw-r--r-- | src/Sequence/Contact/Types.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Sequence/Contact/Types.hs b/src/Sequence/Contact/Types.hs index 9854d92..80d4360 100644 --- a/src/Sequence/Contact/Types.hs +++ b/src/Sequence/Contact/Types.hs | |||
@@ -181,4 +181,10 @@ sDead :: Fold Stats (FormulaM Stats Bool) | |||
181 | sDead = folding $ do | 181 | sDead = folding $ do |
182 | maxVitality <- preview sMaxVitality | 182 | maxVitality <- preview sMaxVitality |
183 | damage <- view sTotalDamage | 183 | damage <- view sTotalDamage |
184 | return $ liftM2 (>) <$> Just (return damage) <*> maxVitality | 184 | return $ liftM2 (>=) <$> Just (return damage) <*> maxVitality |
185 | |||
186 | sUnconscious :: Fold Stats (FormulaM Stats Bool) | ||
187 | sUnconscious = folding $ do | ||
188 | maxVitality <- preview sMaxVitality | ||
189 | damage <- view sFatigue | ||
190 | return $ liftM2 (>=) <$> Just (return damage) <*> maxVitality | ||