summaryrefslogtreecommitdiff
path: root/src/Sequence/Contact
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-06-11 23:00:13 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-06-11 23:00:13 +0200
commitbf24ff9ffd25841da5e20386548fb63ff191ed9a (patch)
treebcdfee20698fa0accdbb5dc5457770f45cd19fd0 /src/Sequence/Contact
parent1bdb2f64c92f79918ea5e1a3f98af45e06d4aae7 (diff)
download2017-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.hs8
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)
181sDead = folding $ do 181sDead = 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
186sUnconscious :: Fold Stats (FormulaM Stats Bool)
187sUnconscious = folding $ do
188 maxVitality <- preview sMaxVitality
189 damage <- view sFatigue
190 return $ liftM2 (>=) <$> Just (return damage) <*> maxVitality