From fb065aeac90ce0766a3f74b84c34547cd087da77 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 11 Jun 2016 01:34:07 +0200 Subject: trigger effects on taking damage --- src/Sequence/Contact/Archetypes.hs | 1 + src/Sequence/Contact/Types.hs | 1 + src/Sequence/Contact/Types/Internal.hs | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Sequence/Contact') diff --git a/src/Sequence/Contact/Archetypes.hs b/src/Sequence/Contact/Archetypes.hs index 30aa2b6..1ad26bb 100644 --- a/src/Sequence/Contact/Archetypes.hs +++ b/src/Sequence/Contact/Archetypes.hs @@ -110,6 +110,7 @@ human = Humanoid , _sCripple = fromJust . flip Map.lookup [ ("Kopf", def & set seVal (sDamage' "Kopf" . to return) & set seBar (sMaxVitality . mapping (scaled 0.5)) + & set seReBar (sMaxVitality . mapping (scaled 0.2)) & set seEffect (cTable [ (1, 10, Effect "Tod" headshot) , (11, 25, effect "Blind") , (26, 35, effect "Blind, Rechts") diff --git a/src/Sequence/Contact/Types.hs b/src/Sequence/Contact/Types.hs index 47687b7..9854d92 100644 --- a/src/Sequence/Contact/Types.hs +++ b/src/Sequence/Contact/Types.hs @@ -107,6 +107,7 @@ instance Default ShockEffect where def = ShockEffect { _seApplied = False , _seVal = ignored , _seBar = ignored + , _seReBar = ignored , _seEffect = def } diff --git a/src/Sequence/Contact/Types/Internal.hs b/src/Sequence/Contact/Types/Internal.hs index e4a2eef..0fe6266 100644 --- a/src/Sequence/Contact/Types/Internal.hs +++ b/src/Sequence/Contact/Types/Internal.hs @@ -55,8 +55,9 @@ data SeqVal = SeqVal data ShockEffect = ShockEffect { _seApplied :: Bool - , _seVal :: Getting (First (Formula Stats)) Stats (Formula Stats) - , _seBar :: Getting (First (Formula Stats)) Stats (Formula Stats) + , _seVal + , _seBar + , _seReBar :: Getting (First (Formula Stats)) Stats (Formula Stats) , _seEffect :: Table Effect } -- cgit v1.2.3