Actually heal the character when they eat food

This commit is contained in:
Griffin Smith 2019-10-12 12:23:41 -04:00
parent 2d72c0e413
commit d2b81df6b8

View file

@ -175,6 +175,8 @@ handleCommand Eat = do
in before <> fromMaybe Empty (tailMay after) in before <> fromMaybe Empty (tailMay after)
let msg = fromMaybe (Messages.lookup ["eat", "eat"]) let msg = fromMaybe (Messages.lookup ["eat", "eat"])
$ edibleItem ^. eatMessage $ edibleItem ^. eatMessage
character . characterHitpoints +=
edibleItem ^. hitpointsHealed . to fromIntegral
message msg $ object ["item" A..= item] message msg $ object ["item" A..= item]
continue continue