summaryrefslogtreecommitdiff
path: root/src/Sequence/Contact
diff options
context:
space:
mode:
Diffstat (limited to 'src/Sequence/Contact')
-rw-r--r--src/Sequence/Contact/Archetypes.hs90
-rw-r--r--src/Sequence/Contact/Types.hs12
2 files changed, 101 insertions, 1 deletions
diff --git a/src/Sequence/Contact/Archetypes.hs b/src/Sequence/Contact/Archetypes.hs
new file mode 100644
index 0000000..94addce
--- /dev/null
+++ b/src/Sequence/Contact/Archetypes.hs
@@ -0,0 +1,90 @@
1{-# LANGUAGE OverloadedStrings, OverloadedLists, ViewPatterns, MultiParamTypeClasses #-}
2
3module Sequence.Contact.Archetypes where
4
5import Control.Lens
6
7import Sequence.Contact.Types
8import Sequence.Formula
9
10import Sequence.Types
11import Sequence.Utils
12
13import Data.Map (Map)
14import qualified Data.Map as Map
15
16import Data.Default
17
18import Data.List
19
20import Data.CaseInsensitive (CI)
21import qualified Data.CaseInsensitive as CI
22
23
24instance Completion Entity GameState where
25 completableLabel _ = "<archetype>"
26 complete _ _ (CI.foldCase -> prefix) = return . filter (prefix `isPrefixOf`) . map CI.foldedCase $ Map.keys archetypes
27
28instance Argument Entity GameState where
29 arg = return . fmap (flip (set eStats) def) . flip Map.lookup archetypes . CI.mk
30
31archetypes :: Map (CI String) Stats
32archetypes = [ ("Mensch", human)
33 , ("Kind von Mu", childOfMu)
34 ]
35
36
37human = Humanoid
38 { _sAStrength = vStrength
39 , _sAEndurance = vEndurance
40 , _sAMass = vMass
41 , _sAReflexes = vReflexes
42 , _sAMobility = vMobility
43 , _sADexterity = vDexterity
44 , _sAIntelligence = vIntelligence
45 , _sACharisma = vCharisma
46 , _sAPerception = vPerception
47 , _sAWillpower = vWillpower
48
49 , _sSArchaicRanged = 20 + vStrength `quot'` 2 + vDexterity `quot'` 2 + vPerception
50 , _sSFirearms = 15 + vMobility `quot'` 2 + vDexterity `quot'` 2 + vPerception
51 , _sSHeavyWeapons = vStrength `quot'` 2 + vPerception
52 , _sSEnergyWeapons = 10 + vMobility `quot'` 2 + vDexterity `quot'` 2 + vPerception
53 , _sSUnarmedMelee = 30 + vReflexes + vMobility `quot'` 2
54 , _sSArmedMelee = 25 + vReflexes + vMobility `quot'` 2
55 , _sSThrownWeapons = 25 + vMobility `quot'` 2 + vPerception
56 , _sSStealth = 5 + vMobility + vDexterity
57 , _sSThievery = 5 + vDexterity * 2 + vIntelligence
58 , _sSLockpicking = vDexterity + vIntelligence
59 , _sSTrapping = vDexterity + vIntelligence + vPerception `quot'` 2
60 , _sSSciences = 10 + vIntelligence * 4
61 , _sSFirstAid = 10 + vDexterity + vIntelligence * 2
62 , _sSMedicine = 5 + vDexterity `quot'` 2 + vIntelligence * 3
63 , _sSHumanities = 20 + vIntelligence * 3
64 , _sSEngineering = 5 + vDexterity + vIntelligence * 2
65 , _sSCraft = 25 + vDexterity * 2
66 , _sSInterface = 5 + vIntelligence * 2 + vPerception `quot'` 2
67 , _sSSpeech = vIntelligence + vCharisma * 2 + vWillpower `quot'` 2
68 , _sSLeadership = 5 + vCharisma * 3 + vWillpower
69 , _sSHomeEconomics = 25 + vIntelligence
70 , _sSSurvival = 30 + vReflexes + vMobility + vIntelligence + vPerception + vWillpower `quot'` 2
71 , _sSMotorcycle = vReflexes * 2 + vMobility + vWillpower
72 , _sSWheeled = 15 + vReflexes + vWillpower
73 , _sSHovercraft = 10 + vReflexes + vWillpower
74 , _sSAircraft = vReflexes + vWillpower
75 , _sSSpacecraft = vReflexes + vIntelligence `quot'` 2 + vPerception `quot'` 2
76 , _sSWatercraft = 20 + vReflexes `quot'` 2 + vPerception `quot'` 2
77 , _sSTracked = 15 + vReflexes + vPerception
78 , _sSExoskeleton = 30 + vReflexes + vMobility * 2 + vPerception
79
80 , _sMaxVitality = vEndurance * 2 + vMass * 2 + vWillpower + 10
81 , _sSeqVal = vReflexes * 2 + vMobility + vPerception + d 10
82 , _sPainTolerance = vMass `quot'` 2 + vWillpower
83 , _sFatigueTolerance = vWillpower `quot'` 2 + vEndurance
84 }
85
86childOfMu = human
87 & sAStrength +~ 2
88 & sAReflexes +~ 5
89 & sAMobility +~ 5
90 & sAPerception +~ 2
diff --git a/src/Sequence/Contact/Types.hs b/src/Sequence/Contact/Types.hs
index b63b369..d3ca31e 100644
--- a/src/Sequence/Contact/Types.hs
+++ b/src/Sequence/Contact/Types.hs
@@ -38,7 +38,7 @@ data Stats = Prop
38 , _sSHumanities 38 , _sSHumanities
39 , _sSEngineering 39 , _sSEngineering
40 , _sSCraft 40 , _sSCraft
41 , _sSInterfacte 41 , _sSInterface
42 , _sSSpeech 42 , _sSSpeech
43 , _sSLeadership 43 , _sSLeadership
44 , _sSHomeEconomics 44 , _sSHomeEconomics
@@ -108,3 +108,13 @@ makeLenses ''Stats
108instance Default Stats where 108instance Default Stats where
109 def = Prop 109 def = Prop
110 110
111vStrength = val sAStrength "Stärke?" True
112vEndurance = val sAEndurance "Ausdauer?" True
113vMass = val sAMass "Masse?" True
114vReflexes = val sAReflexes "Reflexe?" True
115vMobility = val sAMobility "Beweglichkeit?" True
116vDexterity = val sADexterity "Geschicklichkeit?" True
117vIntelligence = val sAIntelligence "Intelligenz?" True
118vCharisma = val sACharisma "Charisma?" True
119vPerception = val sAPerception "Wahrnehmung?" True
120vWillpower = val sAWillpower "Entschlossenheit?" True