From f235d13556440d9ae6e4cf0885f68e1794b81e61 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 8 Jul 2016 01:31:19 +0200 Subject: More logging --- src/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 449e21d..de90b80 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -297,6 +297,7 @@ entitySeqVal' ident = void . runMaybeT $ do & set seqVal (Just sNum) & set seqEpsilon (entity ^. eStats . sSeqEpsilon) gEntities . at ident .= Just (newEntity & set eSeqVal val) + gLog <>= pure (ident, "Sequence: " ++ show sNum) spendSeq :: Int -> String -> Sh GameState () spendSeq n logStr = withFocus $ \focusId -> do @@ -342,7 +343,7 @@ doShock dmg efLens = withFocus $ \focusId -> do lStats . efLens . seApplied .= True Effect (CI.original -> effectName) effect <- evalF . table $ cripple ^. seEffect lStats <~ (MaybeT . fmap join . runMaybeT $ evalF effect) - lift $ shellPutStrLn effectName + lift . outputLogged focusId $ "Effect: " ++ effectName lift . addNote $ "Effect: " ++ effectName takeHit :: Int -> Completable (Set Hitzone) -> Completable DamageType -> Sh GameState () @@ -355,7 +356,7 @@ takeHit dmg a1 a2 = flip withArg a1 $ \zones -> flip withArg a2 $ \dType -> with dmg' <- MaybeT . focusState lStats . evalFormula' [name] $ absorb armor dType dmg forM_ (Map.toList dmg') $ \(dType, dmg) -> lift . runMaybeT $ do guard $ dmg > 0 - lift $ shellPutStrLn $ name ++ " took " ++ show dmg ++ " " ++ show dType + lift . outputLogged focusId $ name ++ " took " ++ show dmg ++ " " ++ show dType case dType of Fatigue -> lStats . sFatigue += dmg _ -> lStats . sDamage . ix zone += dmg -- cgit v1.2.3