about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index d3f266a1e340..2f27948cdee5 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -95,7 +95,7 @@ stepGameBy ticks = do
     pEntity' <- step ticks pEntity
     entities . ix eid .= pEntity'
 
-  whenM (uses (character . characterHitpoints) (== 0))
+  whenM (uses character isDead)
     . prompt_ @'Continue ["dead"] Uncancellable
     . const . lift . liftIO
     $ exitSuccess
@@ -186,7 +186,7 @@ handleCommand Eat = do
               in before <> fromMaybe Empty (tailMay after)
             let msg = fromMaybe (Messages.lookup ["eat", "eat"])
                       $ edibleItem ^. eatMessage
-            character . characterHitpoints +=
+            character . characterHitpoints' +=
               edibleItem ^. hitpointsHealed . to fromIntegral
             message msg $ object ["item" A..= item]
   stepGame -- TODO