From aee8570428680a23bb85c02a107309597982ad9f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 3 Jun 2016 22:09:10 +0200 Subject: Basic Contact stats --- src/Sequence/Contact/Types.hs | 63 +++++++++++++++++++++++++++++++++++++++++++ src/Sequence/Types.hs | 13 +++++---- 2 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 src/Sequence/Contact/Types.hs (limited to 'src') diff --git a/src/Sequence/Contact/Types.hs b/src/Sequence/Contact/Types.hs new file mode 100644 index 0000000..b33e132 --- /dev/null +++ b/src/Sequence/Contact/Types.hs @@ -0,0 +1,63 @@ +{-# LANGUAGE TemplateHaskell #-} + +module Sequence.Contact.Types where + +import Sequence.Formula + +import Control.Lens + +import Data.Default + +data Stats = Prop + | Human + { _sAStrength + , _sAEndurance + , _sAMass + , _sAReflexes + , _sAMobility + , _sADexterity + , _sAIntelligence + , _sACharisma + , _sAPerception + , _sAWillpower + + , _sSArchaicRanged + , _sSFirearms + , _sSHeavyWeapons + , _sSEnergyWeapons + , _sSUnarmedMelee + , _sSArmedMelee + , _sSThrownWeapons + , _sSStealth + , _sSThievery + , _sSLockpicking + , _sSTrapping + , _sSSciences + , _sSFirstAid + , _sSMedicine + , _sSHumanities + , _sSEngineering + , _sSCraft + , _sSInterfacte + , _sSSpeech + , _sSLeadership + , _sSHomeEconomics + , _sSSurvival + , _sSMotorcycle + , _sSWheeled + , _sSHovercraft + , _sSAircraft + , _sSSpacecraft + , _sSWatercraft + , _sSTracked + , _sSExoskeleton + + , _sMaxVitality + , _sSeqVal + , _sPainTolerance + , _sFatigueTolerance :: FormulaM Stats Int + } +makeLenses ''Stats + +instance Default Stats where + def = Prop diff --git a/src/Sequence/Types.hs b/src/Sequence/Types.hs index 55c9013..4370618 100644 --- a/src/Sequence/Types.hs +++ b/src/Sequence/Types.hs @@ -28,6 +28,8 @@ import Data.List import Data.Maybe import Data.Tuple import Data.Ord + +import Sequence.Contact.Types newtype Faction = Faction { _lFaction :: Maybe (CI String) } @@ -58,16 +60,17 @@ makeLenses ''SeqVal data Entity = Entity - { _eFaction :: Faction - , _eSeqVal :: Maybe SeqVal + { _eSeqVal :: Maybe SeqVal + , _eFaction :: Faction + , _eStats :: Stats } - deriving (Show) makeLenses ''Entity instance Default Entity where def = Entity - { _eFaction = def - , _eSeqVal = def + { _eSeqVal = def + , _eFaction = def + , _eStats = def } newtype EntityName = EntityName { _entityName :: CI String } -- cgit v1.2.3