From 635e2dac8e4db3f0d785537d55002540ae2aaa11 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 6 Jul 2016 19:36:12 +0200 Subject: =?UTF-8?q?Ask=20for=20seqVal=20if=20we=20don=C2=B4t=20have=20a=20?= =?UTF-8?q?formula?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main.hs b/src/Main.hs index b056aff..bddc85e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -287,7 +287,7 @@ factionSeqVal = withArg $ \qFaction -> use gEntities >>= mapM_ (entitySeqVal') . entitySeqVal' :: EntityIdentifier -> Sh GameState () entitySeqVal' ident = void . runMaybeT $ do entity <- MaybeT $ preuse (gEntities . ix ident) - sVal <- MaybeT . return $ preview (eStats . sSeqVal) entity + let sVal = fromMaybe (val ignored ["Sequenzwert"] False) $ preview (eStats . sSeqVal) entity name <- toName ident round <- use gRound (newEntity, sNum) <- evalFormula [name] entity sVal -- cgit v1.2.3