diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Sequence/Contact/Types.hs | 63 | ||||
-rw-r--r-- | src/Sequence/Types.hs | 13 |
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 | |||
3 | module Sequence.Contact.Types where | ||
4 | |||
5 | import Sequence.Formula | ||
6 | |||
7 | import Control.Lens | ||
8 | |||
9 | import Data.Default | ||
10 | |||
11 | data 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 | } | ||
60 | makeLenses ''Stats | ||
61 | |||
62 | instance 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 | |||
28 | import Data.Maybe | 28 | import Data.Maybe |
29 | import Data.Tuple | 29 | import Data.Tuple |
30 | import Data.Ord | 30 | import Data.Ord |
31 | |||
32 | import Sequence.Contact.Types | ||
31 | 33 | ||
32 | 34 | ||
33 | newtype Faction = Faction { _lFaction :: Maybe (CI String) } | 35 | newtype Faction = Faction { _lFaction :: Maybe (CI String) } |
@@ -58,16 +60,17 @@ makeLenses ''SeqVal | |||
58 | 60 | ||
59 | 61 | ||
60 | data Entity = Entity | 62 | data Entity = Entity |
61 | { _eFaction :: Faction | 63 | { _eSeqVal :: Maybe SeqVal |
62 | , _eSeqVal :: Maybe SeqVal | 64 | , _eFaction :: Faction |
65 | , _eStats :: Stats | ||
63 | } | 66 | } |
64 | deriving (Show) | ||
65 | makeLenses ''Entity | 67 | makeLenses ''Entity |
66 | 68 | ||
67 | instance Default Entity where | 69 | instance 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 | ||
73 | newtype EntityName = EntityName { _entityName :: CI String } | 76 | newtype EntityName = EntityName { _entityName :: CI String } |