summaryrefslogtreecommitdiff
path: root/src/Sequence/Contact/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Sequence/Contact/Tests.hs')
-rw-r--r--src/Sequence/Contact/Tests.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Sequence/Contact/Tests.hs b/src/Sequence/Contact/Tests.hs
index 8665186..c100ce9 100644
--- a/src/Sequence/Contact/Tests.hs
+++ b/src/Sequence/Contact/Tests.hs
@@ -40,7 +40,7 @@ tests = do
40 40
41 views sExtraSkills (baseTests <>) 41 views sExtraSkills (baseTests <>)
42 where 42 where
43 test k v = maybe mempty (Map.singleton k) <$> preview v 43 test k v = maybe mempty (Map.singleton k) <$> previews v (set (mapped . tName) k)
44 44
45 skillTest = to (\x -> flip (set tBaseDifficulty) def <$> x) 45 skillTest = to (\x -> flip (set tBaseDifficulty) def <$> x)
46 attributeTest = to (\x -> flip (set tBaseDifficulty) def . (* 10) <$> x) 46 attributeTest = to (\x -> flip (set tBaseDifficulty) def . (* 10) <$> x)
@@ -61,10 +61,11 @@ instance Argument (FormulaM Stats Test) GameState where
61enactTest :: Test -> FormulaM Stats TestResult 61enactTest :: Test -> FormulaM Stats TestResult
62enactTest rawTest = do 62enactTest rawTest = do
63 test <- foldM (&) rawTest =<< toListOf (ctx . sModifiers . folded . _Modifier . _2) <$> ask 63 test <- foldM (&) rawTest =<< toListOf (ctx . sModifiers . folded . _Modifier . _2) <$> ask
64 manualMod <- val ignored [CI.original (rawTest ^. tName), "Modifier"] False
64 let 65 let
65 critFailureBar = 95 - test^.tCritFailureMod 66 critFailureBar = 95 - test^.tCritFailureMod
66 critSuccessBar = 5 + test^.tCritSuccessMod 67 critSuccessBar = 5 + test^.tCritSuccessMod
67 bar = test^.tBaseDifficulty + test^.tMod 68 bar = test^.tBaseDifficulty + test^.tMod + manualMod
68 toResult pw = (toResult' pw) pw (abs $ bar - pw) 69 toResult pw = (toResult' pw) pw (abs $ bar - pw)
69 toResult' pw 70 toResult' pw
70 | bar > critSuccessBar 71 | bar > critSuccessBar