diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-13 19:20:36 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-13 19:20:36 +0200 |
commit | 1ca2b48b49d559158cda4feffa145bdfded2c1c2 (patch) | |
tree | 67a6da1e6b089cc764031c71fa003c3a06326324 /src | |
parent | 12dce406808620989646a163ff77a0782eb5ef63 (diff) | |
download | 2017-01-16_17:13:37-1ca2b48b49d559158cda4feffa145bdfded2c1c2.tar 2017-01-16_17:13:37-1ca2b48b49d559158cda4feffa145bdfded2c1c2.tar.gz 2017-01-16_17:13:37-1ca2b48b49d559158cda4feffa145bdfded2c1c2.tar.bz2 2017-01-16_17:13:37-1ca2b48b49d559158cda4feffa145bdfded2c1c2.tar.xz 2017-01-16_17:13:37-1ca2b48b49d559158cda4feffa145bdfded2c1c2.zip |
shockeffekte
Diffstat (limited to 'src')
-rw-r--r-- | src/Sequence/Contact/Archetypes.hs | 159 |
1 files changed, 132 insertions, 27 deletions
diff --git a/src/Sequence/Contact/Archetypes.hs b/src/Sequence/Contact/Archetypes.hs index d790917..626104b 100644 --- a/src/Sequence/Contact/Archetypes.hs +++ b/src/Sequence/Contact/Archetypes.hs | |||
@@ -51,7 +51,7 @@ cTable :: Ord v => [(Integer, Integer, v)] -> Table v | |||
51 | cTable = Map.fromList . map (\(from, to, value) -> (value, (abs (to - from) + 1) % 100)) | 51 | cTable = Map.fromList . map (\(from, to, value) -> (value, (abs (to - from) + 1) % 100)) |
52 | 52 | ||
53 | death :: Hitzone -> FormulaM Stats (Maybe Stats) | 53 | death :: Hitzone -> FormulaM Stats (Maybe Stats) |
54 | death zone = runMaybeT $ do | 54 | death zone = Effect "Tod" . runMaybeT $ do |
55 | maxVitality <- (MaybeT . preview $ ctx . sMaxVitality) >>= lift | 55 | maxVitality <- (MaybeT . preview $ ctx . sMaxVitality) >>= lift |
56 | currentDmg <- MaybeT . preview $ ctx . sDamage' zone | 56 | currentDmg <- MaybeT . preview $ ctx . sDamage' zone |
57 | allDmg <- MaybeT . preview $ ctx . sTotalDamage | 57 | allDmg <- MaybeT . preview $ ctx . sTotalDamage |
@@ -88,6 +88,9 @@ damageMods = [ Modifier "Schmerz" $ damageMod sTotalDamage sPainTolerance | |||
88 | let mod = dmg - tolerance | 88 | let mod = dmg - tolerance |
89 | return $ test & over tMod (+ mod) | 89 | return $ test & over tMod (+ mod) |
90 | 90 | ||
91 | vitBar :: Ratio Int -> Traversal' Stats (Formula Stats) | ||
92 | vitBar prop = sMaxVitality . mapping (scaled prop) | ||
93 | |||
91 | human = Humanoid | 94 | human = Humanoid |
92 | { _sAStrength = vStrength | 95 | { _sAStrength = vStrength |
93 | , _sAEndurance = vEndurance | 96 | , _sAEndurance = vEndurance |
@@ -149,9 +152,9 @@ human = Humanoid | |||
149 | , _sArmor = const def | 152 | , _sArmor = const def |
150 | , _sCripple = fromJust . flip Map.lookup [ ("Kopf", def | 153 | , _sCripple = fromJust . flip Map.lookup [ ("Kopf", def |
151 | & set seVal (sDamage' "Kopf" . to return) | 154 | & set seVal (sDamage' "Kopf" . to return) |
152 | & set seBar (sMaxVitality . mapping (scaled 0.5)) | 155 | & set seBar (vitBar 0.5) |
153 | & set seReBar (sMaxVitality . mapping (scaled 0.2)) | 156 | & set seReBar (vitBar 0.2) |
154 | & set seEffect (cTable [ (1, 10, Effect "Tod" $ death "Kopf") | 157 | & set seEffect (cTable [ (1, 10, death "Kopf") |
155 | , (11, 25, effect "Blind") | 158 | , (11, 25, effect "Blind") |
156 | , (26, 35, effect "Blind, Rechts") | 159 | , (26, 35, effect "Blind, Rechts") |
157 | , (36, 45, effect "Blind, Links") | 160 | , (36, 45, effect "Blind, Links") |
@@ -161,9 +164,9 @@ human = Humanoid | |||
161 | ) | 164 | ) |
162 | , ("Torso", def | 165 | , ("Torso", def |
163 | & set seVal (sDamage' "Torso" . to return) | 166 | & set seVal (sDamage' "Torso" . to return) |
164 | & set seBar (sMaxVitality . mapping (scaled 0.75)) | 167 | & set seBar (vitBar 0.75) |
165 | & set seReBar (sMaxVitality . mapping (scaled 0.2)) | 168 | & set seReBar (vitBar 0.2) |
166 | & set seEffect (cTable [ (1, 5, Effect "Tod" $ death "Torso") | 169 | & set seEffect (cTable [ (1, 5, death "Torso") |
167 | , (6, 25, Effect "Organschäden" . previews ctx $ over sFatigue (+ 25) . over (sDamage' "Torso") (+ 10)) | 170 | , (6, 25, Effect "Organschäden" . previews ctx $ over sFatigue (+ 25) . over (sDamage' "Torso") (+ 10)) |
168 | , (26, 45, effect "Innere Blutung (3 Schaden (Au) Minuten)") | 171 | , (26, 45, effect "Innere Blutung (3 Schaden (Au) Minuten)") |
169 | , (46, 75, Effect "Bewusstlos" unconscious) | 172 | , (46, 75, Effect "Bewusstlos" unconscious) |
@@ -174,10 +177,10 @@ human = Humanoid | |||
174 | , ("Linker Arm", arm "Linker Arm") | 177 | , ("Linker Arm", arm "Linker Arm") |
175 | , ("Unterleib", def | 178 | , ("Unterleib", def |
176 | & set seVal (sDamage' "Unterleib" . to return) | 179 | & set seVal (sDamage' "Unterleib" . to return) |
177 | & set seBar (sMaxVitality . mapping (scaled 0.2)) | 180 | & set seBar (vitBar 0.2) |
178 | & set seReBar (sMaxVitality . mapping (scaled 0.2)) | 181 | & set seReBar (vitBar 0.2) |
179 | & set seEffect ( cTable [ (1, 5, effect "Querschnittsgelähmt") | 182 | & set seEffect ( cTable [ (1, 5, effect "Querschnittsgelähmt") |
180 | , (6, 25, Effect "Impotenz" . previews ctx $ over sFatigue (+ 15)) | 183 | , (6, 25, Effect "Kastration" . previews ctx $ over sFatigue (+ 15)) |
181 | , (26, 50, effect "Innere Blutung (2 Schaden (Au) Minuten)") | 184 | , (26, 50, effect "Innere Blutung (2 Schaden (Au) Minuten)") |
182 | , (51, 100, Effect "Bewusstlos" unconscious) | 185 | , (51, 100, Effect "Bewusstlos" unconscious) |
183 | ]) | 186 | ]) |
@@ -192,15 +195,15 @@ human = Humanoid | |||
192 | , _sSequence = Nothing | 195 | , _sSequence = Nothing |
193 | 196 | ||
194 | , _sPainShock = def | 197 | , _sPainShock = def |
195 | & set seReBar (sMaxVitality . mapping (scaled 0.75)) | 198 | & set seReBar (vitBar 0.75) |
196 | & set seEffect ( cTable [ (1, 5, Effect "Organversagen" $ death "Torso") | 199 | & set seEffect ( cTable [ (1, 5, death "Torso") |
197 | , (6, 25, Effect "Koma" unconscious) | 200 | , (6, 25, Effect "Koma" unconscious) |
198 | , (26, 45, Effect "Bewusstlos" . unconsciousR $ d 10) | 201 | , (26, 45, Effect "Bewusstlos" . unconsciousR $ d 10) |
199 | , (46, 75, Effect "Bewusstlos" unconscious) | 202 | , (46, 75, Effect "Bewusstlos" unconscious) |
200 | , (76, 100, Effect "Verlangsamt" $ d 10 >>= (\loss -> previews ctx $ over (sSequence . _Just . seqVal . _Just) (+ (-loss)))) | 203 | , (76, 100, Effect "Verlangsamt" $ d 10 >>= (\loss -> previews ctx $ over (sSequence . _Just . seqVal . _Just) (+ (-loss)))) |
201 | ]) | 204 | ]) |
202 | , _sFatigueShock = def | 205 | , _sFatigueShock = def |
203 | & set seReBar (sMaxVitality . mapping (scaled 0.75)) | 206 | & set seReBar (vitBar 0.75) |
204 | & set seEffect ( cTable [ (1, 25, Effect "Bewusstlos" . unconsciousR $ 2 * d 10) | 207 | & set seEffect ( cTable [ (1, 25, Effect "Bewusstlos" . unconsciousR $ 2 * d 10) |
205 | , (26, 50, Effect "Bewusstlos" . unconsciousR $ d 10) | 208 | , (26, 50, Effect "Bewusstlos" . unconsciousR $ d 10) |
206 | , (51, 75, Effect "Bewusstlos" unconscious) | 209 | , (51, 75, Effect "Bewusstlos" unconscious) |
@@ -213,8 +216,8 @@ human = Humanoid | |||
213 | where | 216 | where |
214 | arm zone = def | 217 | arm zone = def |
215 | & set seVal (sDamage' zone . to return) | 218 | & set seVal (sDamage' zone . to return) |
216 | & set seBar (sMaxVitality . mapping (scaled 0.3)) | 219 | & set seBar (vitBar 0.3) |
217 | & set seReBar (sMaxVitality . mapping (scaled 0.2)) | 220 | & set seReBar (vitBar 0.2) |
218 | & set seEffect (cTable [ (1, 10, amputate zone) | 221 | & set seEffect (cTable [ (1, 10, amputate zone) |
219 | , (11, 25, effect $ review hitzone zone ++ " ist gelähmt und unbrauchbar") | 222 | , (11, 25, effect $ review hitzone zone ++ " ist gelähmt und unbrauchbar") |
220 | , (26, 45, effect $ review hitzone zone ++ " hat eingeschränkte Funktion (-50%)") | 223 | , (26, 45, effect $ review hitzone zone ++ " hat eingeschränkte Funktion (-50%)") |
@@ -223,8 +226,8 @@ human = Humanoid | |||
223 | ]) | 226 | ]) |
224 | bein zone = def | 227 | bein zone = def |
225 | & set seVal (sDamage' zone . to return) | 228 | & set seVal (sDamage' zone . to return) |
226 | & set seBar (sMaxVitality . mapping (scaled 0.4)) | 229 | & set seBar (vitBar 0.4) |
227 | & set seReBar (sMaxVitality . mapping (scaled 0.2)) | 230 | & set seReBar (vitBar 0.2) |
228 | & set seEffect (cTable [ (1, 10, amputate zone) | 231 | & set seEffect (cTable [ (1, 10, amputate zone) |
229 | , (11, 45, effect $ review hitzone zone ++ " ist gelähmt und unbrauchbar (halbierte Bewegung)") | 232 | , (11, 45, effect $ review hitzone zone ++ " ist gelähmt und unbrauchbar (halbierte Bewegung)") |
230 | , (46, 75, Effect "Schwerste Schmerzen" . previews ctx $ over sFatigue (+ 10)) | 233 | , (46, 75, Effect "Schwerste Schmerzen" . previews ctx $ over sFatigue (+ 10)) |
@@ -257,17 +260,75 @@ dog = Quadruped | |||
257 | 260 | ||
258 | , _sSeqEpsilon = False | 261 | , _sSeqEpsilon = False |
259 | 262 | ||
260 | , _sHitzones = [ ("Kopf", 0.05) | 263 | , _sHitzones = cTable [ (1, 5, "Kopf") |
261 | , ("Torso", 0.49) | 264 | , (6, 54, "Torso") |
262 | , ("Rechter Vorderlauf", 0.08) | 265 | , (55, 62, "Rechter Vorderlauf") |
263 | , ("Linker Vorderlauf", 0.08) | 266 | , (63, 70, "Linker Vorderlauf") |
264 | , ("Hinterteil", 0.10) | 267 | , (71, 80, "Hinterteil") |
265 | , ("Rechter Hinterlauf", 0.10) | 268 | , (81, 90, "Rechter Hinterlauf") |
266 | , ("Linker Hinterlauf", 0.10) | 269 | , (91, 100, "Linker Hinterlauf") |
267 | ] | 270 | ] |
268 | , _sDamage = const 0 | ||
269 | , _sArmor = const def | 271 | , _sArmor = const def |
272 | , _sCripple = fromJust . flip Map.lookup [ ("Kopf", def | ||
273 | & set seVal (sDamage' "Kopf" . to return) | ||
274 | & set seBar (vitBar 0.5) | ||
275 | & set seReBar (vitBar 0.2) | ||
276 | & set seEffect (cTable [ (1, 10, death "Kopf") | ||
277 | , (11, 25, effect "Blind") | ||
278 | , (26, 35, effect "Blind, Rechts") | ||
279 | , (36, 45, effect "Blind, Links") | ||
280 | , (46, 75, effect "Geruchssinn ist verloren") | ||
281 | , (76, 100, Effect "Bewusstlos" . unconsciousR $ 2 * d 10) | ||
282 | ]) | ||
283 | ) | ||
284 | , ("Torso", def | ||
285 | & set seVal (sDamage' "Torso" . to return) | ||
286 | & set seBar (vitBar 0.75) | ||
287 | & set seReBar (vitBar 0.2) | ||
288 | & set seEffect ( cTable [ (1, 5, death "Torso") | ||
289 | , (6, 25, Effect "Organschäden" . previews ctx $ over sFatigue (+ 25) . over (sDamage' "Torso") (+ 10)) | ||
290 | , (26, 45, effect "Innere Blutung (3 Schaden (Au) Minuten)") | ||
291 | , (46, 75, Effect "Bewusstlos" unconscious) | ||
292 | , (76, 100, Effect "Bewusstlos" . unconsciousR $ d 10) | ||
293 | ]) | ||
294 | ) | ||
295 | , ("Hinterteil", def | ||
296 | & set seVal (sDamage' "Hinterteil" . to return) | ||
297 | & set seBar (vitBar 0.2) | ||
298 | & set seReBar (vitBar 0.2) | ||
299 | & set seEffect ( cTable [ (1, 5, effect "Querschnittsgelähmt") | ||
300 | , (6, 25, Effect "Kastration" . previews ctx $ over sFatigue (+ 10)) | ||
301 | , (26, 50, effect "Innere Blutung (2 Schaden (Au) Minuten)") | ||
302 | , (51, 100, Effect "Bewusstlos" . unconsciousR $ 2 * d 10) | ||
303 | ]) | ||
304 | ) | ||
305 | , (\x -> (x, lauf x)) "Rechter Vorderlauf" | ||
306 | , (\x -> (x, lauf x)) "Linker Vorderlauf" | ||
307 | , (\x -> (x, lauf x)) "Rechter Hinterlauf" | ||
308 | , (\x -> (x, lauf x)) "Linker Hinterlauf" | ||
309 | ] | ||
310 | |||
311 | , _sDamage = const 0 | ||
312 | , _sFatigue = 0 | ||
313 | |||
314 | , _sSequence = Nothing | ||
315 | |||
316 | , _sPainShock = def | ||
317 | , _sFatigueShock = def | ||
318 | |||
319 | , _sExtraSkills = [] | ||
320 | , _sModifiers = damageMods | ||
270 | } | 321 | } |
322 | where | ||
323 | lauf zone = def | ||
324 | & set seVal (sDamage' zone . to return) | ||
325 | & set seBar (vitBar 0.3) | ||
326 | & set seReBar (vitBar 0.2) | ||
327 | & set seEffect ( cTable [ (1, 10, amputate zone) | ||
328 | , (11, 25, effect $ review hitzone zone ++ " ist gelähmt und unbrauchbar (halbierte Bewegung)") | ||
329 | , (26, 45, Effect "Schmerzen" . previews ctx $ over sFatigue (+ 15)) | ||
330 | , (46, 100, Effect "Fleischwunde" . previews ctx $ over sFatigue (+ 5)) | ||
331 | ]) | ||
271 | 332 | ||
272 | dolphin = Dolphin | 333 | dolphin = Dolphin |
273 | { _sAStrength = vStrength | 334 | { _sAStrength = vStrength |
@@ -298,8 +359,52 @@ dolphin = Dolphin | |||
298 | , ("Rumpf", 0.65) | 359 | , ("Rumpf", 0.65) |
299 | , ("Schwanz", 0.25) | 360 | , ("Schwanz", 0.25) |
300 | ] | 361 | ] |
301 | , _sDamage = const 0 | ||
302 | , _sArmor = const def | 362 | , _sArmor = const def |
363 | , _sCripple = fromJust . flip Map.lookup [ ("Kopf", def | ||
364 | & set seVal (sDamage' "Kopf" . to return) | ||
365 | & set seBar (vitBar 0.6) | ||
366 | & set seReBar (vitBar 0.2) | ||
367 | & set seEffect ( cTable [ (1, 10, death "Kopf") | ||
368 | , (11, 25, effect "Blind") | ||
369 | , (26, 35, effect "Blind, Rechts") | ||
370 | , (36, 45, effect "Blind, Links") | ||
371 | , (46, 75, effect "Verlust des Biosonar") | ||
372 | , (76, 100, Effect "Bewusstlos" . unconsciousR $ 2 * d 10) | ||
373 | ]) | ||
374 | ) | ||
375 | , ("Rumpf", def | ||
376 | & set seVal (sDamage' "Rumpf" . to return) | ||
377 | & set seBar (vitBar 0.8) | ||
378 | & set seReBar (vitBar 0.2) | ||
379 | & set seEffect ( cTable [ (1, 5, death "Rumpf") | ||
380 | , (6, 25, Effect "Organschäden" . previews ctx $ over sFatigue (+ 7) . over (sDamage' "Rumpf") (+ 20)) | ||
381 | , (26, 45, effect "Blutung (2 Schaden (Au) Minuten)") | ||
382 | , (46, 75, Effect "Bewusstlos" unconscious) | ||
383 | , (76, 100, Effect "Bewusstlos" . unconsciousR $ d 10) | ||
384 | ]) | ||
385 | ) | ||
386 | , ("Schwanz", def | ||
387 | & set seVal (sDamage' "Schwanz" . to return) | ||
388 | & set seBar (vitBar 0.4) | ||
389 | & set seReBar (vitBar 0.2) | ||
390 | & set seEffect ( cTable [ (1, 10, amputate "Schwanz") | ||
391 | , (11, 25, effect "Halbierte Bewegung") | ||
392 | , (26, 45, Effect "Schmerz" . previews ctx $ over sFatigue (+ 15)) | ||
393 | , (46, 100, effect "Fleischwunde") | ||
394 | ]) | ||
395 | ) | ||
396 | ] | ||
397 | |||
398 | , _sDamage = const 0 | ||
399 | , _sFatigue = 0 | ||
400 | |||
401 | , _sSequence = Nothing | ||
402 | |||
403 | , _sPainShock = def | ||
404 | , _sFatigueShock = def | ||
405 | |||
406 | , _sExtraSkills = [] | ||
407 | , _sModifiers = damageMods | ||
303 | } | 408 | } |
304 | 409 | ||
305 | childOfMu = human | 410 | childOfMu = human |