summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-06-03 22:09:10 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-06-03 22:09:10 +0200
commitaee8570428680a23bb85c02a107309597982ad9f (patch)
tree0c7027b3312483df7a32c623a72e5849fb26bea3
parentcfb7be14aebffd68ca357d7c6ef15e1c0974a156 (diff)
download2017-01-16_17:13:37-aee8570428680a23bb85c02a107309597982ad9f.tar
2017-01-16_17:13:37-aee8570428680a23bb85c02a107309597982ad9f.tar.gz
2017-01-16_17:13:37-aee8570428680a23bb85c02a107309597982ad9f.tar.bz2
2017-01-16_17:13:37-aee8570428680a23bb85c02a107309597982ad9f.tar.xz
2017-01-16_17:13:37-aee8570428680a23bb85c02a107309597982ad9f.zip
Basic Contact stats
-rw-r--r--src/Sequence/Contact/Types.hs63
-rw-r--r--src/Sequence/Types.hs13
2 files changed, 71 insertions, 5 deletions
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 @@
1{-# LANGUAGE TemplateHaskell #-}
2
3module Sequence.Contact.Types where
4
5import Sequence.Formula
6
7import Control.Lens
8
9import Data.Default
10
11data Stats = Prop
12 | Human
13 { _sAStrength
14 , _sAEndurance
15 , _sAMass
16 , _sAReflexes
17 , _sAMobility
18 , _sADexterity
19 , _sAIntelligence
20 , _sACharisma
21 , _sAPerception
22 , _sAWillpower
23
24 , _sSArchaicRanged
25 , _sSFirearms
26 , _sSHeavyWeapons
27 , _sSEnergyWeapons
28 , _sSUnarmedMelee
29 , _sSArmedMelee
30 , _sSThrownWeapons
31 , _sSStealth
32 , _sSThievery
33 , _sSLockpicking
34 , _sSTrapping
35 , _sSSciences
36 , _sSFirstAid
37 , _sSMedicine
38 , _sSHumanities
39 , _sSEngineering
40 , _sSCraft
41 , _sSInterfacte
42 , _sSSpeech
43 , _sSLeadership
44 , _sSHomeEconomics
45 , _sSSurvival
46 , _sSMotorcycle
47 , _sSWheeled
48 , _sSHovercraft
49 , _sSAircraft
50 , _sSSpacecraft
51 , _sSWatercraft
52 , _sSTracked
53 , _sSExoskeleton
54
55 , _sMaxVitality
56 , _sSeqVal
57 , _sPainTolerance
58 , _sFatigueTolerance :: FormulaM Stats Int
59 }
60makeLenses ''Stats
61
62instance Default Stats where
63 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
28import Data.Maybe 28import Data.Maybe
29import Data.Tuple 29import Data.Tuple
30import Data.Ord 30import Data.Ord
31
32import Sequence.Contact.Types
31 33
32 34
33newtype Faction = Faction { _lFaction :: Maybe (CI String) } 35newtype Faction = Faction { _lFaction :: Maybe (CI String) }
@@ -58,16 +60,17 @@ makeLenses ''SeqVal
58 60
59 61
60data Entity = Entity 62data Entity = Entity
61 { _eFaction :: Faction 63 { _eSeqVal :: Maybe SeqVal
62 , _eSeqVal :: Maybe SeqVal 64 , _eFaction :: Faction
65 , _eStats :: Stats
63 } 66 }
64 deriving (Show)
65makeLenses ''Entity 67makeLenses ''Entity
66 68
67instance Default Entity where 69instance Default Entity where
68 def = Entity 70 def = Entity
69 { _eFaction = def 71 { _eSeqVal = def
70 , _eSeqVal = def 72 , _eFaction = def
73 , _eStats = def
71 } 74 }
72 75
73newtype EntityName = EntityName { _entityName :: CI String } 76newtype EntityName = EntityName { _entityName :: CI String }