From 0daa059aa8c6ece13d337e6f3dba30b89527530d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 10 Jun 2016 15:03:59 +0200 Subject: make extraTests available --- src/Sequence/Contact/Tests.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Sequence/Contact/Tests.hs b/src/Sequence/Contact/Tests.hs index a3b15d7..8665186 100644 --- a/src/Sequence/Contact/Tests.hs +++ b/src/Sequence/Contact/Tests.hs @@ -17,6 +17,7 @@ import Control.Lens import Data.Default import Data.List import Data.Maybe +import Data.Monoid import Data.CaseInsensitive (CI) import qualified Data.CaseInsensitive as CI @@ -29,12 +30,15 @@ import Data.Traversable (mapM) import Prelude hiding (mapM) tests :: MonadReader Stats m => m (Map (CI String) (FormulaM Stats Test)) -tests = mconcat <$> sequence [ test "Stärke" $ sAStrength . attributeTest +tests = do + baseTests <- mconcat <$> sequence [ test "Stärke" $ sAStrength . attributeTest + + , test "Archaische Distanzwaffen" $ sSArchaicRanged . skillTest - , test "Archaische Distanzwaffen" $ sSArchaicRanged . skillTest + , test "Beißen" $ sSBiting . skillTest + ] - , test "Beißen" $ sSBiting . skillTest - ] + views sExtraSkills (baseTests <>) where test k v = maybe mempty (Map.singleton k) <$> preview v -- cgit v1.2.3