about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-10-12T16·23-0400
committerGriffin Smith <root@gws.fyi>2019-10-12T16·23-0400
commitd2b81df6b882e702e321b55eba85a8bfab1f77c4 (patch)
tree40b43f75a6c123a951a484062690a1e2463bfce2
parent2d72c0e41390016bdd22c90c3489d91ae2ac8a81 (diff)
Actually heal the character when they eat food
-rw-r--r--src/Xanthous/App.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index eb2f0cf7ad83..ac0a213f08a1 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -175,6 +175,8 @@ handleCommand Eat = do
               in before <> fromMaybe Empty (tailMay after)
             let msg = fromMaybe (Messages.lookup ["eat", "eat"])
                       $ edibleItem ^. eatMessage
+            character . characterHitpoints +=
+              edibleItem ^. hitpointsHealed . to fromIntegral
             message msg $ object ["item" A..= item]
   continue