Add sound on creature piercing damage
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Creature.Damage (applyCreatureDamage) where
|
||||
|
||||
import Dodge.Material.Damage
|
||||
import Data.List
|
||||
import Dodge.Creature.Mass
|
||||
import Dodge.Creature.Material
|
||||
@@ -48,7 +49,8 @@ applyCreatureDamage dms cr w = foldl' (applyIndividualDamage cr) w dms
|
||||
--p = _dmAt dm
|
||||
|
||||
applyIndividualDamage :: Creature -> World -> Damage -> World
|
||||
applyIndividualDamage cr w dm = case dm of
|
||||
applyIndividualDamage cr w dm = damageMaterial dm (crMaterial (_crType cr)) (Left cr) $
|
||||
case dm of
|
||||
Piercing{} -> applyPiercingDamage cr dm w
|
||||
_ -> w & damageHP cr (_dmAmount dm)
|
||||
|
||||
|
||||
+103
-75
@@ -1,80 +1,100 @@
|
||||
module Dodge.Material.Damage (damageMaterial) where
|
||||
|
||||
import RandomHelp
|
||||
import Dodge.SoundLogic
|
||||
import Color
|
||||
import Dodge.WorldEvent.Cloud
|
||||
import Dodge.Data.World
|
||||
import Dodge.Spark
|
||||
import Geometry
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Spark
|
||||
import Dodge.WorldEvent.Cloud
|
||||
import Geometry
|
||||
import RandomHelp
|
||||
|
||||
damageMaterial ::
|
||||
Damage ->
|
||||
Material ->
|
||||
Float -> -- the direction of the hit surface, in radians
|
||||
World ->
|
||||
World
|
||||
type ECW = Either Creature Wall
|
||||
|
||||
damageMaterial :: Damage -> Material -> ECW -> World -> World
|
||||
damageMaterial dm mt = case mt of
|
||||
Stone -> damageStone dm
|
||||
Metal -> damageMetal dm
|
||||
Flesh -> damageFlesh dm
|
||||
Dirt -> damageDirt dm
|
||||
-- Glass -> damageGlass dm
|
||||
-- Glass -> damageGlass dm
|
||||
_ -> defDamageMaterial dm
|
||||
|
||||
defDamageMaterial :: Damage -> Float -> World -> World
|
||||
defDamageMaterial :: Damage -> ECW -> World -> World
|
||||
defDamageMaterial _ _ w = w
|
||||
|
||||
damageStone :: Damage -> Float -> World -> World
|
||||
damageStone dm dir w = w & case dm of
|
||||
Lasering _ p t -> makeSpark FireSpark (outTo p t) (argV $ reflectIn v t)
|
||||
Piercing _ p t -> makeSpark NormalSpark (outTo p t) (argV $ reflectIn v t)
|
||||
. smokeCloudAt white 20 200 1 (addZ 20 (outTo p t))
|
||||
. randsound p [slapS,slap1S]
|
||||
Blunt _ p t -> smokeCloudAt white 20 200 1 (addZ 20 (outTo p t))
|
||||
Shattering _ p t -> smokeCloudAt white 20 200 1 (addZ 20 (outTo p t))
|
||||
Crushing{} -> id
|
||||
Explosive{} -> id
|
||||
Sparking{} -> id
|
||||
Flaming{} -> id
|
||||
Electrical{} -> id
|
||||
Poison{} -> id
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
damageStone :: Damage -> ECW -> World -> World
|
||||
damageStone dm ecw w =
|
||||
w & case dm of
|
||||
Lasering _ p t -> makeSpark FireSpark (outTo p t) (rdir p t)
|
||||
Piercing _ p t ->
|
||||
makeSpark NormalSpark (outTo p t) (rdir p t)
|
||||
. smokeCloudAt white 20 200 1 (addZ 20 (outTo p t))
|
||||
. randsound p [slapS, slap1S]
|
||||
Blunt _ p t -> smokeCloudAt white 20 200 1 (addZ 20 (outTo p t))
|
||||
Shattering _ p t -> smokeCloudAt white 20 200 1 (addZ 20 (outTo p t))
|
||||
Crushing{} -> id
|
||||
Explosive{} -> id
|
||||
Sparking{} -> id
|
||||
Flaming{} -> id
|
||||
Electrical{} -> id
|
||||
Poison{} -> id
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
where
|
||||
randsound p xs = let (x,g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
rdir p t = argV $ reflectIn v t
|
||||
where
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> vNormal (p - _crPos cr)
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
so = DamageHitSound (w ^. cWorld . lWorld . lClock)
|
||||
v = unitVectorAtAngle dir
|
||||
outTo x t = x -.- squashNormalizeV t
|
||||
|
||||
damageMetal :: Damage -> Float -> World -> World
|
||||
damageMetal dm dir w = w & case dm of
|
||||
Lasering _ p t -> makeSpark FireSpark (outTo p t) (argV $ reflectIn v t)
|
||||
Piercing _ p t -> makeSpark NormalSpark (outTo p t) (argV $ reflectIn v t)
|
||||
. randsound p [tingS,ting1S]
|
||||
Blunt _ p t -> id
|
||||
Shattering _ p t -> id
|
||||
Crushing{} -> id
|
||||
Explosive{} -> id
|
||||
Sparking{} -> id
|
||||
Flaming{} -> id
|
||||
Electrical{} -> id
|
||||
Poison{} -> id
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
damageMetal :: Damage -> ECW -> World -> World
|
||||
damageMetal dm ecw w =
|
||||
w & case dm of
|
||||
Lasering _ p t -> makeSpark FireSpark (outTo p t) (argV $ reflectIn v t)
|
||||
Piercing _ p t ->
|
||||
makeSpark NormalSpark (outTo p t) (argV $ reflectIn v t)
|
||||
. randsound p [tingS, ting1S, ting2S, ting3S]
|
||||
Blunt _ p t -> id
|
||||
Shattering _ p t -> id
|
||||
Crushing{} -> id
|
||||
Explosive{} -> id
|
||||
Sparking{} -> id
|
||||
Flaming{} -> id
|
||||
Electrical{} -> id
|
||||
Poison{} -> id
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
where
|
||||
v = unitVectorAtAngle dir
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> undefined
|
||||
outTo x t = x -.- squashNormalizeV t
|
||||
randsound p xs = let (x,g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
so = DamageHitSound (w ^. cWorld . lWorld . lClock)
|
||||
|
||||
damageFlesh :: Damage -> Float -> World -> World
|
||||
damageFlesh dm dir w = w & case dm of
|
||||
damageFlesh :: Damage -> ECW -> World -> World
|
||||
damageFlesh dm ecw w = w & case dm of
|
||||
Lasering _ p t -> id
|
||||
Piercing _ p t -> randsound p [blood1S,blood2S,blood4S,blood5S,blood6S,blood7S,blood8S]
|
||||
Piercing _ p t ->
|
||||
randsound
|
||||
p
|
||||
[ bloodShort1S
|
||||
, bloodShort2S
|
||||
, bloodShort3S
|
||||
, bloodShort4S
|
||||
, bloodShort5S
|
||||
, bloodShort6S
|
||||
, bloodShort7S
|
||||
, bloodShort8S
|
||||
]
|
||||
Blunt _ p t -> id
|
||||
Shattering _ p t -> id
|
||||
Crushing{} -> id
|
||||
@@ -86,32 +106,40 @@ damageFlesh dm dir w = w & case dm of
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
where
|
||||
randsound p xs = let (x,g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> undefined
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
so = DamageHitSound (w ^. cWorld . lWorld . lClock)
|
||||
v = unitVectorAtAngle dir
|
||||
outTo x t = x -.- squashNormalizeV t
|
||||
|
||||
damageDirt :: Damage -> Float -> World -> World
|
||||
damageDirt dm dir w = w & case dm of
|
||||
Lasering _ p t -> makeSpark FireSpark (outTo p t) (argV $ reflectIn v t)
|
||||
Piercing _ p t -> smokeCloudAt orange 20 200 1 (addZ 20 (outTo p t))
|
||||
. randsound p [slapS,slap1S]
|
||||
Blunt _ p t -> smokeCloudAt orange 20 200 1 (addZ 20 (outTo p t))
|
||||
Shattering _ p t -> smokeCloudAt orange 20 200 1 (addZ 20 (outTo p t))
|
||||
Crushing{} -> id
|
||||
Explosive{} -> id
|
||||
Sparking{} -> id
|
||||
Flaming{} -> id
|
||||
Electrical{} -> id
|
||||
Poison{} -> id
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
damageDirt :: Damage -> ECW -> World -> World
|
||||
damageDirt dm ecw w =
|
||||
w & case dm of
|
||||
Lasering _ p t -> makeSpark FireSpark (outTo p t) (argV $ reflectIn v t)
|
||||
Piercing _ p t ->
|
||||
smokeCloudAt orange 20 200 1 (addZ 20 (outTo p t))
|
||||
. randsound p [slapS, slap1S]
|
||||
Blunt _ p t -> smokeCloudAt orange 20 200 1 (addZ 20 (outTo p t))
|
||||
Shattering _ p t -> smokeCloudAt orange 20 200 1 (addZ 20 (outTo p t))
|
||||
Crushing{} -> id
|
||||
Explosive{} -> id
|
||||
Sparking{} -> id
|
||||
Flaming{} -> id
|
||||
Electrical{} -> id
|
||||
Poison{} -> id
|
||||
Enterrement{} -> id
|
||||
Flashing{} -> id
|
||||
where
|
||||
randsound p xs = let (x,g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> undefined
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
so = DamageHitSound (w ^. cWorld . lWorld . lClock)
|
||||
v = unitVectorAtAngle dir
|
||||
outTo x t = x -.- squashNormalizeV t
|
||||
|
||||
--damageGlass :: Damage -> Float -> World -> (World,Int)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- generated at 2025-06-22 07:24:07.993044373 UTC
|
||||
-- generated at 2025-06-22 08:15:19.247090086 UTC
|
||||
module Dodge.SoundLogic.ExternallyGeneratedSounds where
|
||||
import Sound.Data
|
||||
soundToVol :: SoundID -> Float
|
||||
@@ -18,103 +18,113 @@ soundToVol v = case _getSoundID v of
|
||||
12 -> 500
|
||||
13 -> 300
|
||||
14 -> 100
|
||||
15 -> 500
|
||||
16 -> 1000
|
||||
17 -> 40
|
||||
18 -> 2000
|
||||
19 -> 100
|
||||
20 -> 50
|
||||
21 -> 200
|
||||
22 -> 50
|
||||
23 -> 2000
|
||||
24 -> 200
|
||||
25 -> 40
|
||||
26 -> 300
|
||||
27 -> 500
|
||||
28 -> 2000
|
||||
15 -> 100
|
||||
16 -> 500
|
||||
17 -> 1000
|
||||
18 -> 40
|
||||
19 -> 2000
|
||||
20 -> 100
|
||||
21 -> 50
|
||||
22 -> 200
|
||||
23 -> 100
|
||||
24 -> 50
|
||||
25 -> 2000
|
||||
26 -> 200
|
||||
27 -> 40
|
||||
28 -> 300
|
||||
29 -> 500
|
||||
30 -> 100
|
||||
31 -> 200
|
||||
32 -> 1000
|
||||
33 -> 100
|
||||
34 -> 100
|
||||
35 -> 1000
|
||||
36 -> 1000
|
||||
37 -> 40
|
||||
38 -> 400
|
||||
39 -> 2000
|
||||
40 -> 100
|
||||
41 -> 300
|
||||
42 -> 50
|
||||
43 -> 2000
|
||||
44 -> 50
|
||||
45 -> 1000
|
||||
46 -> 8000
|
||||
47 -> 2000
|
||||
48 -> 2000
|
||||
49 -> 1000
|
||||
50 -> 200
|
||||
30 -> 2000
|
||||
31 -> 500
|
||||
32 -> 100
|
||||
33 -> 200
|
||||
34 -> 1000
|
||||
35 -> 200
|
||||
36 -> 100
|
||||
37 -> 100
|
||||
38 -> 1000
|
||||
39 -> 1000
|
||||
40 -> 40
|
||||
41 -> 400
|
||||
42 -> 2000
|
||||
43 -> 100
|
||||
44 -> 300
|
||||
45 -> 50
|
||||
46 -> 2000
|
||||
47 -> 50
|
||||
48 -> 1000
|
||||
49 -> 8000
|
||||
50 -> 2000
|
||||
51 -> 2000
|
||||
52 -> 100
|
||||
53 -> 40
|
||||
54 -> 40
|
||||
55 -> 2000
|
||||
52 -> 1000
|
||||
53 -> 200
|
||||
54 -> 2000
|
||||
55 -> 100
|
||||
56 -> 100
|
||||
57 -> 500
|
||||
58 -> 40
|
||||
59 -> 300
|
||||
60 -> 300
|
||||
57 -> 40
|
||||
58 -> 100
|
||||
59 -> 40
|
||||
60 -> 2000
|
||||
61 -> 100
|
||||
62 -> 2000
|
||||
63 -> 1000
|
||||
64 -> 1000
|
||||
65 -> 1000
|
||||
66 -> 1000
|
||||
67 -> 1000
|
||||
68 -> 40
|
||||
69 -> 50
|
||||
62 -> 500
|
||||
63 -> 40
|
||||
64 -> 100
|
||||
65 -> 300
|
||||
66 -> 300
|
||||
67 -> 100
|
||||
68 -> 2000
|
||||
69 -> 1000
|
||||
70 -> 1000
|
||||
71 -> 500
|
||||
72 -> 500
|
||||
71 -> 1000
|
||||
72 -> 100
|
||||
73 -> 100
|
||||
74 -> 1000
|
||||
75 -> 20
|
||||
76 -> 500
|
||||
77 -> 300
|
||||
78 -> 200
|
||||
75 -> 1000
|
||||
76 -> 40
|
||||
77 -> 50
|
||||
78 -> 1000
|
||||
79 -> 500
|
||||
80 -> 1000
|
||||
81 -> 200
|
||||
82 -> 1000
|
||||
83 -> 2000
|
||||
84 -> 500
|
||||
85 -> 100
|
||||
86 -> 1000
|
||||
87 -> 300
|
||||
88 -> 2000
|
||||
89 -> 2000
|
||||
90 -> 100
|
||||
91 -> 500
|
||||
80 -> 500
|
||||
81 -> 100
|
||||
82 -> 100
|
||||
83 -> 1000
|
||||
84 -> 20
|
||||
85 -> 500
|
||||
86 -> 300
|
||||
87 -> 200
|
||||
88 -> 500
|
||||
89 -> 1000
|
||||
90 -> 200
|
||||
91 -> 1000
|
||||
92 -> 2000
|
||||
93 -> 100
|
||||
94 -> 300
|
||||
95 -> 1000
|
||||
96 -> 200
|
||||
97 -> 100
|
||||
98 -> 1000
|
||||
93 -> 500
|
||||
94 -> 200
|
||||
95 -> 100
|
||||
96 -> 1000
|
||||
97 -> 300
|
||||
98 -> 2000
|
||||
99 -> 2000
|
||||
100 -> 1000
|
||||
101 -> 100
|
||||
102 -> 200
|
||||
103 -> 500
|
||||
104 -> 100
|
||||
105 -> 2000
|
||||
106 -> 1000
|
||||
107 -> 2000
|
||||
108 -> 2000
|
||||
109 -> 200
|
||||
110 -> 100
|
||||
111 -> 200
|
||||
100 -> 100
|
||||
101 -> 500
|
||||
102 -> 2000
|
||||
103 -> 100
|
||||
104 -> 300
|
||||
105 -> 1000
|
||||
106 -> 200
|
||||
107 -> 100
|
||||
108 -> 1000
|
||||
109 -> 2000
|
||||
110 -> 1000
|
||||
111 -> 100
|
||||
112 -> 200
|
||||
113 -> 500
|
||||
114 -> 100
|
||||
115 -> 2000
|
||||
116 -> 1000
|
||||
117 -> 2000
|
||||
118 -> 2000
|
||||
119 -> 200
|
||||
120 -> 100
|
||||
121 -> 200
|
||||
_ -> 50
|
||||
soundToOnomato :: SoundID -> String
|
||||
soundToOnomato v = case _getSoundID v of
|
||||
@@ -133,103 +143,113 @@ soundToOnomato v = case _getSoundID v of
|
||||
12 -> "TRINKL"
|
||||
13 -> "BWAAH"
|
||||
14 -> "SQLEE"
|
||||
15 -> "DNDNDNDN"
|
||||
16 -> "CRMBL"
|
||||
17 -> "TIP"
|
||||
18 -> "TATATA"
|
||||
19 -> "SPRT"
|
||||
20 -> "BLIH"
|
||||
21 -> "SQWCH"
|
||||
22 -> "HMM"
|
||||
23 -> "PEW"
|
||||
24 -> "CRAKLE"
|
||||
25 -> "TAP"
|
||||
26 -> "DWAAH"
|
||||
27 -> "PRUM"
|
||||
28 -> "BANGG"
|
||||
29 -> "CRTINK"
|
||||
30 -> "PHF"
|
||||
31 -> "CRNCH"
|
||||
32 -> "ZHM"
|
||||
33 -> "CLCLH"
|
||||
34 -> "THUD"
|
||||
35 -> "TRWNG"
|
||||
36 -> "CRASH"
|
||||
37 -> "TAPTIP"
|
||||
38 -> "CRNKCRNKCRNK"
|
||||
39 -> "CHUGUGUG"
|
||||
40 -> "SKWLL"
|
||||
41 -> "WRRR"
|
||||
42 -> "HSSS"
|
||||
43 -> "BOOM"
|
||||
44 -> "HSS"
|
||||
45 -> "TAKH"
|
||||
46 -> "RINGGG"
|
||||
47 -> "CRH"
|
||||
48 -> "UGGAUGGA"
|
||||
49 -> "CRUMPLE"
|
||||
50 -> "TING"
|
||||
51 -> "CREUH"
|
||||
52 -> "SMACK"
|
||||
53 -> "CLICK"
|
||||
54 -> "TIPTOP"
|
||||
55 -> "CRUH"
|
||||
56 -> "CHNKCHNKCHUNK"
|
||||
57 -> "CLKCLK"
|
||||
58 -> "TIPTAP"
|
||||
59 -> "TNKTNKTNK"
|
||||
60 -> "CHPCHPCHP"
|
||||
61 -> "SLP"
|
||||
62 -> "SCREE"
|
||||
63 -> "DHDHL"
|
||||
64 -> "BRAP"
|
||||
65 -> "CRSK"
|
||||
66 -> "CRNKL"
|
||||
67 -> "TRNKL"
|
||||
68 -> "TAPP"
|
||||
69 -> "SHUHP"
|
||||
70 -> "CRUMBL"
|
||||
71 -> "DEDEDUM"
|
||||
72 -> "TAK"
|
||||
73 -> "SPLRT"
|
||||
74 -> "CRISH"
|
||||
75 -> "SWSH"
|
||||
76 -> "BIPBIPBIP"
|
||||
77 -> "BEP"
|
||||
78 -> "CRSKRL"
|
||||
79 -> "KRTNKL"
|
||||
80 -> "CRSNK"
|
||||
81 -> "SHTCK"
|
||||
82 -> "TTRKL"
|
||||
83 -> "UGGAUGGA"
|
||||
84 -> "DUDURAH"
|
||||
85 -> "KKSQWL"
|
||||
86 -> "CRMPL"
|
||||
87 -> "BWEP"
|
||||
88 -> "CHUGUGUG"
|
||||
89 -> "BANG"
|
||||
90 -> "SLPP"
|
||||
91 -> "DEDA"
|
||||
92 -> "WHSSH"
|
||||
93 -> "HNH"
|
||||
94 -> "BWAH"
|
||||
95 -> "CRUNK"
|
||||
96 -> "SQWLTCH"
|
||||
97 -> "DRR"
|
||||
98 -> "TRNKL"
|
||||
99 -> "BRAP"
|
||||
100 -> "BLPCHCH"
|
||||
101 -> "SKLE"
|
||||
102 -> "ZMM"
|
||||
103 -> "WRRR"
|
||||
104 -> "FWUMP"
|
||||
105 -> "BRAHCHCH"
|
||||
106 -> "BWMP"
|
||||
107 -> "BRPBRPBRP"
|
||||
108 -> "WE-OH"
|
||||
109 -> "THCK"
|
||||
110 -> "FHP"
|
||||
111 -> "QWLPH"
|
||||
15 -> "CLCLH"
|
||||
16 -> "DNDNDNDN"
|
||||
17 -> "CRMBL"
|
||||
18 -> "TIP"
|
||||
19 -> "TATATA"
|
||||
20 -> "SPRT"
|
||||
21 -> "BLIH"
|
||||
22 -> "SQWCH"
|
||||
23 -> "SKLE"
|
||||
24 -> "HMM"
|
||||
25 -> "PEW"
|
||||
26 -> "CRAKLE"
|
||||
27 -> "TAP"
|
||||
28 -> "DWAAH"
|
||||
29 -> "PRUM"
|
||||
30 -> "BANGG"
|
||||
31 -> "CRTINK"
|
||||
32 -> "PHF"
|
||||
33 -> "CRNCH"
|
||||
34 -> "ZHM"
|
||||
35 -> "TING"
|
||||
36 -> "CLCLH"
|
||||
37 -> "THUD"
|
||||
38 -> "TRWNG"
|
||||
39 -> "CRASH"
|
||||
40 -> "TAPTIP"
|
||||
41 -> "CRNKCRNKCRNK"
|
||||
42 -> "CHUGUGUG"
|
||||
43 -> "SKWLL"
|
||||
44 -> "WRRR"
|
||||
45 -> "HSSS"
|
||||
46 -> "BOOM"
|
||||
47 -> "HSS"
|
||||
48 -> "TAKH"
|
||||
49 -> "RINGGG"
|
||||
50 -> "CRH"
|
||||
51 -> "UGGAUGGA"
|
||||
52 -> "CRUMPLE"
|
||||
53 -> "TING"
|
||||
54 -> "CREUH"
|
||||
55 -> "KKSQWL"
|
||||
56 -> "SMACK"
|
||||
57 -> "CLICK"
|
||||
58 -> "SPRT"
|
||||
59 -> "TIPTOP"
|
||||
60 -> "CRUH"
|
||||
61 -> "CHNKCHNKCHUNK"
|
||||
62 -> "CLKCLK"
|
||||
63 -> "TIPTAP"
|
||||
64 -> "SKWLCH"
|
||||
65 -> "TNKTNKTNK"
|
||||
66 -> "CHPCHPCHP"
|
||||
67 -> "SLP"
|
||||
68 -> "SCREE"
|
||||
69 -> "DHDHL"
|
||||
70 -> "BRAP"
|
||||
71 -> "CRSK"
|
||||
72 -> "SPLRT"
|
||||
73 -> "SKWLL"
|
||||
74 -> "CRNKL"
|
||||
75 -> "TRNKL"
|
||||
76 -> "TAPP"
|
||||
77 -> "SHUHP"
|
||||
78 -> "CRUMBL"
|
||||
79 -> "DEDEDUM"
|
||||
80 -> "TAK"
|
||||
81 -> "SPLRT"
|
||||
82 -> "SQLEE"
|
||||
83 -> "CRISH"
|
||||
84 -> "SWSH"
|
||||
85 -> "BIPBIPBIP"
|
||||
86 -> "BEP"
|
||||
87 -> "CRSKRL"
|
||||
88 -> "KRTNKL"
|
||||
89 -> "CRSNK"
|
||||
90 -> "SHTCK"
|
||||
91 -> "TTRKL"
|
||||
92 -> "UGGAUGGA"
|
||||
93 -> "DUDURAH"
|
||||
94 -> "TING"
|
||||
95 -> "KKSQWL"
|
||||
96 -> "CRMPL"
|
||||
97 -> "BWEP"
|
||||
98 -> "CHUGUGUG"
|
||||
99 -> "BANG"
|
||||
100 -> "SLPP"
|
||||
101 -> "DEDA"
|
||||
102 -> "WHSSH"
|
||||
103 -> "HNH"
|
||||
104 -> "BWAH"
|
||||
105 -> "CRUNK"
|
||||
106 -> "SQWLTCH"
|
||||
107 -> "DRR"
|
||||
108 -> "TRNKL"
|
||||
109 -> "BRAP"
|
||||
110 -> "BLPCHCH"
|
||||
111 -> "SKLE"
|
||||
112 -> "ZMM"
|
||||
113 -> "WRRR"
|
||||
114 -> "FWUMP"
|
||||
115 -> "BRAHCHCH"
|
||||
116 -> "BWMP"
|
||||
117 -> "BRPBRPBRP"
|
||||
118 -> "WE-OH"
|
||||
119 -> "THCK"
|
||||
120 -> "FHP"
|
||||
121 -> "QWLPH"
|
||||
_ -> error "unitialised sound"
|
||||
soundPathList :: [String]
|
||||
soundPathList =
|
||||
@@ -248,6 +268,7 @@ soundPathList =
|
||||
, "smallGlass1.TRINKL.500.wav"
|
||||
, "sineRaisePitchTwoSec.BWAAH.300.wav"
|
||||
, "blood7.SQLEE.100.wav"
|
||||
, "bloodShort5.CLCLH.100.wav"
|
||||
, "combine.DNDNDNDN.500.wav"
|
||||
, "stone4.CRMBL.1000.wav"
|
||||
, "foot1.TIP.40.wav"
|
||||
@@ -255,6 +276,7 @@ soundPathList =
|
||||
, "blood2.SPRT.100.wav"
|
||||
, "heal.BLIH.50.wav"
|
||||
, "gut3.SQWCH.200.wav"
|
||||
, "bloodShort6.SKLE.100.wav"
|
||||
, "fridgeHum.HMM.50.wav"
|
||||
, "seagullWhistle1.PEW.2000.wav"
|
||||
, "elecCrackle.CRAKLE.200.wav"
|
||||
@@ -266,6 +288,7 @@ soundPathList =
|
||||
, "whiteNoiseFadeOut.PHF.100.wav"
|
||||
, "gut2.CRNCH.200.wav"
|
||||
, "tele.ZHM.1000.wav"
|
||||
, "ting2.TING.200.wav"
|
||||
, "blood5.CLCLH.100.wav"
|
||||
, "hit.THUD.100.wav"
|
||||
, "metal7.TRWNG.1000.wav"
|
||||
@@ -285,13 +308,16 @@ soundPathList =
|
||||
, "stone3.CRUMPLE.1000.wav"
|
||||
, "ting.TING.200.wav"
|
||||
, "seagullCry2.CREUH.2000.wav"
|
||||
, "bloodShort3.KKSQWL.100.wav"
|
||||
, "hit1.SMACK.100.wav"
|
||||
, "click1.CLICK.40.wav"
|
||||
, "bloodShort2.SPRT.100.wav"
|
||||
, "twoStepSlow.TIPTOP.40.wav"
|
||||
, "seagullCry.CRUH.2000.wav"
|
||||
, "crankSlow.CHNKCHNKCHUNK.100.wav"
|
||||
, "prime.CLKCLK.500.wav"
|
||||
, "twoStep.TIPTAP.40.wav"
|
||||
, "bloodShort8.SKWLCH.100.wav"
|
||||
, "reload.TNKTNKTNK.300.wav"
|
||||
, "reload1.CHPCHPCHP.300.wav"
|
||||
, "slap.SLP.100.wav"
|
||||
@@ -299,6 +325,8 @@ soundPathList =
|
||||
, "metal3.DHDHL.1000.wav"
|
||||
, "tap3.BRAP.1000.wav"
|
||||
, "glassShat4.CRSK.1000.wav"
|
||||
, "bloodShort1.SPLRT.100.wav"
|
||||
, "bloodShort4.SKWLL.100.wav"
|
||||
, "glassShat2.CRNKL.1000.wav"
|
||||
, "metal1.TRNKL.1000.wav"
|
||||
, "foot3.TAPP.40.wav"
|
||||
@@ -307,6 +335,7 @@ soundPathList =
|
||||
, "dededum.DEDEDUM.500.wav"
|
||||
, "tap1.TAK.500.wav"
|
||||
, "blood1.SPLRT.100.wav"
|
||||
, "bloodShort7.SQLEE.100.wav"
|
||||
, "metal4.CRISH.1000.wav"
|
||||
, "knife.SWSH.20.wav"
|
||||
, "computerBeeping.BIPBIPBIP.500.wav"
|
||||
@@ -318,6 +347,7 @@ soundPathList =
|
||||
, "metal5.TTRKL.1000.wav"
|
||||
, "seagullBarkTransformed.UGGAUGGA.2000.wav"
|
||||
, "eject.DUDURAH.500.wav"
|
||||
, "ting3.TING.200.wav"
|
||||
, "blood3.KKSQWL.100.wav"
|
||||
, "stone2.CRMPL.1000.wav"
|
||||
, "tone440raise.BWEP.300.wav"
|
||||
@@ -376,197 +406,217 @@ sineRaisePitchTwoSecS :: SoundID
|
||||
sineRaisePitchTwoSecS = SoundID 13
|
||||
blood7S :: SoundID
|
||||
blood7S = SoundID 14
|
||||
bloodShort5S :: SoundID
|
||||
bloodShort5S = SoundID 15
|
||||
combineS :: SoundID
|
||||
combineS = SoundID 15
|
||||
combineS = SoundID 16
|
||||
stone4S :: SoundID
|
||||
stone4S = SoundID 16
|
||||
stone4S = SoundID 17
|
||||
foot1S :: SoundID
|
||||
foot1S = SoundID 17
|
||||
foot1S = SoundID 18
|
||||
autoBS :: SoundID
|
||||
autoBS = SoundID 18
|
||||
autoBS = SoundID 19
|
||||
blood2S :: SoundID
|
||||
blood2S = SoundID 19
|
||||
blood2S = SoundID 20
|
||||
healS :: SoundID
|
||||
healS = SoundID 20
|
||||
healS = SoundID 21
|
||||
gut3S :: SoundID
|
||||
gut3S = SoundID 21
|
||||
gut3S = SoundID 22
|
||||
bloodShort6S :: SoundID
|
||||
bloodShort6S = SoundID 23
|
||||
fridgeHumS :: SoundID
|
||||
fridgeHumS = SoundID 22
|
||||
fridgeHumS = SoundID 24
|
||||
seagullWhistle1S :: SoundID
|
||||
seagullWhistle1S = SoundID 23
|
||||
seagullWhistle1S = SoundID 25
|
||||
elecCrackleS :: SoundID
|
||||
elecCrackleS = SoundID 24
|
||||
elecCrackleS = SoundID 26
|
||||
foot2S :: SoundID
|
||||
foot2S = SoundID 25
|
||||
foot2S = SoundID 27
|
||||
skwareFadeTwoSecS :: SoundID
|
||||
skwareFadeTwoSecS = SoundID 26
|
||||
skwareFadeTwoSecS = SoundID 28
|
||||
insertOneS :: SoundID
|
||||
insertOneS = SoundID 27
|
||||
insertOneS = SoundID 29
|
||||
bangEchoS :: SoundID
|
||||
bangEchoS = SoundID 28
|
||||
bangEchoS = SoundID 30
|
||||
smallGlass3S :: SoundID
|
||||
smallGlass3S = SoundID 29
|
||||
smallGlass3S = SoundID 31
|
||||
whiteNoiseFadeOutS :: SoundID
|
||||
whiteNoiseFadeOutS = SoundID 30
|
||||
whiteNoiseFadeOutS = SoundID 32
|
||||
gut2S :: SoundID
|
||||
gut2S = SoundID 31
|
||||
gut2S = SoundID 33
|
||||
teleS :: SoundID
|
||||
teleS = SoundID 32
|
||||
teleS = SoundID 34
|
||||
ting2S :: SoundID
|
||||
ting2S = SoundID 35
|
||||
blood5S :: SoundID
|
||||
blood5S = SoundID 33
|
||||
blood5S = SoundID 36
|
||||
hitS :: SoundID
|
||||
hitS = SoundID 34
|
||||
hitS = SoundID 37
|
||||
metal7S :: SoundID
|
||||
metal7S = SoundID 35
|
||||
metal7S = SoundID 38
|
||||
stone1S :: SoundID
|
||||
stone1S = SoundID 36
|
||||
stone1S = SoundID 39
|
||||
twoStep1S :: SoundID
|
||||
twoStep1S = SoundID 37
|
||||
twoStep1S = SoundID 40
|
||||
wrench1S :: SoundID
|
||||
wrench1S = SoundID 38
|
||||
wrench1S = SoundID 41
|
||||
seagullChatterS :: SoundID
|
||||
seagullChatterS = SoundID 39
|
||||
seagullChatterS = SoundID 42
|
||||
blood4S :: SoundID
|
||||
blood4S = SoundID 40
|
||||
blood4S = SoundID 43
|
||||
fireFadeS :: SoundID
|
||||
fireFadeS = SoundID 41
|
||||
fireFadeS = SoundID 44
|
||||
foamSprayLoopS :: SoundID
|
||||
foamSprayLoopS = SoundID 42
|
||||
foamSprayLoopS = SoundID 45
|
||||
explosionS :: SoundID
|
||||
explosionS = SoundID 43
|
||||
explosionS = SoundID 46
|
||||
foamSprayFadeOutS :: SoundID
|
||||
foamSprayFadeOutS = SoundID 44
|
||||
foamSprayFadeOutS = SoundID 47
|
||||
tap2S :: SoundID
|
||||
tap2S = SoundID 45
|
||||
tap2S = SoundID 48
|
||||
tinitusS :: SoundID
|
||||
tinitusS = SoundID 46
|
||||
tinitusS = SoundID 49
|
||||
seagullCry1S :: SoundID
|
||||
seagullCry1S = SoundID 47
|
||||
seagullCry1S = SoundID 50
|
||||
seagullBarkS :: SoundID
|
||||
seagullBarkS = SoundID 48
|
||||
seagullBarkS = SoundID 51
|
||||
stone3S :: SoundID
|
||||
stone3S = SoundID 49
|
||||
stone3S = SoundID 52
|
||||
tingS :: SoundID
|
||||
tingS = SoundID 50
|
||||
tingS = SoundID 53
|
||||
seagullCry2S :: SoundID
|
||||
seagullCry2S = SoundID 51
|
||||
seagullCry2S = SoundID 54
|
||||
bloodShort3S :: SoundID
|
||||
bloodShort3S = SoundID 55
|
||||
hit1S :: SoundID
|
||||
hit1S = SoundID 52
|
||||
hit1S = SoundID 56
|
||||
click1S :: SoundID
|
||||
click1S = SoundID 53
|
||||
click1S = SoundID 57
|
||||
bloodShort2S :: SoundID
|
||||
bloodShort2S = SoundID 58
|
||||
twoStepSlowS :: SoundID
|
||||
twoStepSlowS = SoundID 54
|
||||
twoStepSlowS = SoundID 59
|
||||
seagullCryS :: SoundID
|
||||
seagullCryS = SoundID 55
|
||||
seagullCryS = SoundID 60
|
||||
crankSlowS :: SoundID
|
||||
crankSlowS = SoundID 56
|
||||
crankSlowS = SoundID 61
|
||||
primeS :: SoundID
|
||||
primeS = SoundID 57
|
||||
primeS = SoundID 62
|
||||
twoStepS :: SoundID
|
||||
twoStepS = SoundID 58
|
||||
twoStepS = SoundID 63
|
||||
bloodShort8S :: SoundID
|
||||
bloodShort8S = SoundID 64
|
||||
reloadS :: SoundID
|
||||
reloadS = SoundID 59
|
||||
reloadS = SoundID 65
|
||||
reload1S :: SoundID
|
||||
reload1S = SoundID 60
|
||||
reload1S = SoundID 66
|
||||
slapS :: SoundID
|
||||
slapS = SoundID 61
|
||||
slapS = SoundID 67
|
||||
tone440sawtoothS :: SoundID
|
||||
tone440sawtoothS = SoundID 62
|
||||
tone440sawtoothS = SoundID 68
|
||||
metal3S :: SoundID
|
||||
metal3S = SoundID 63
|
||||
metal3S = SoundID 69
|
||||
tap3S :: SoundID
|
||||
tap3S = SoundID 64
|
||||
tap3S = SoundID 70
|
||||
glassShat4S :: SoundID
|
||||
glassShat4S = SoundID 65
|
||||
glassShat4S = SoundID 71
|
||||
bloodShort1S :: SoundID
|
||||
bloodShort1S = SoundID 72
|
||||
bloodShort4S :: SoundID
|
||||
bloodShort4S = SoundID 73
|
||||
glassShat2S :: SoundID
|
||||
glassShat2S = SoundID 66
|
||||
glassShat2S = SoundID 74
|
||||
metal1S :: SoundID
|
||||
metal1S = SoundID 67
|
||||
metal1S = SoundID 75
|
||||
foot3S :: SoundID
|
||||
foot3S = SoundID 68
|
||||
foot3S = SoundID 76
|
||||
pickUpS :: SoundID
|
||||
pickUpS = SoundID 69
|
||||
pickUpS = SoundID 77
|
||||
stone5S :: SoundID
|
||||
stone5S = SoundID 70
|
||||
stone5S = SoundID 78
|
||||
dededumS :: SoundID
|
||||
dededumS = SoundID 71
|
||||
dededumS = SoundID 79
|
||||
tap1S :: SoundID
|
||||
tap1S = SoundID 72
|
||||
tap1S = SoundID 80
|
||||
blood1S :: SoundID
|
||||
blood1S = SoundID 73
|
||||
blood1S = SoundID 81
|
||||
bloodShort7S :: SoundID
|
||||
bloodShort7S = SoundID 82
|
||||
metal4S :: SoundID
|
||||
metal4S = SoundID 74
|
||||
metal4S = SoundID 83
|
||||
knifeS :: SoundID
|
||||
knifeS = SoundID 75
|
||||
knifeS = SoundID 84
|
||||
computerBeepingS :: SoundID
|
||||
computerBeepingS = SoundID 76
|
||||
computerBeepingS = SoundID 85
|
||||
tone440S :: SoundID
|
||||
tone440S = SoundID 77
|
||||
tone440S = SoundID 86
|
||||
gut6S :: SoundID
|
||||
gut6S = SoundID 78
|
||||
gut6S = SoundID 87
|
||||
smallGlass2S :: SoundID
|
||||
smallGlass2S = SoundID 79
|
||||
smallGlass2S = SoundID 88
|
||||
glassShat1S :: SoundID
|
||||
glassShat1S = SoundID 80
|
||||
glassShat1S = SoundID 89
|
||||
disconnectItemS :: SoundID
|
||||
disconnectItemS = SoundID 81
|
||||
disconnectItemS = SoundID 90
|
||||
metal5S :: SoundID
|
||||
metal5S = SoundID 82
|
||||
metal5S = SoundID 91
|
||||
seagullBarkTransformedS :: SoundID
|
||||
seagullBarkTransformedS = SoundID 83
|
||||
seagullBarkTransformedS = SoundID 92
|
||||
ejectS :: SoundID
|
||||
ejectS = SoundID 84
|
||||
ejectS = SoundID 93
|
||||
ting3S :: SoundID
|
||||
ting3S = SoundID 94
|
||||
blood3S :: SoundID
|
||||
blood3S = SoundID 85
|
||||
blood3S = SoundID 95
|
||||
stone2S :: SoundID
|
||||
stone2S = SoundID 86
|
||||
stone2S = SoundID 96
|
||||
tone440raiseS :: SoundID
|
||||
tone440raiseS = SoundID 87
|
||||
tone440raiseS = SoundID 97
|
||||
seagullChatter1S :: SoundID
|
||||
seagullChatter1S = SoundID 88
|
||||
seagullChatter1S = SoundID 98
|
||||
bangS :: SoundID
|
||||
bangS = SoundID 89
|
||||
bangS = SoundID 99
|
||||
slap1S :: SoundID
|
||||
slap1S = SoundID 90
|
||||
slap1S = SoundID 100
|
||||
dedaS :: SoundID
|
||||
dedaS = SoundID 91
|
||||
dedaS = SoundID 101
|
||||
missileLaunchS :: SoundID
|
||||
missileLaunchS = SoundID 92
|
||||
missileLaunchS = SoundID 102
|
||||
gruntS :: SoundID
|
||||
gruntS = SoundID 93
|
||||
gruntS = SoundID 103
|
||||
sineRaisePitchOneSecS :: SoundID
|
||||
sineRaisePitchOneSecS = SoundID 94
|
||||
sineRaisePitchOneSecS = SoundID 104
|
||||
metal2S :: SoundID
|
||||
metal2S = SoundID 95
|
||||
metal2S = SoundID 105
|
||||
gut5S :: SoundID
|
||||
gut5S = SoundID 96
|
||||
gut5S = SoundID 106
|
||||
slideDoorS :: SoundID
|
||||
slideDoorS = SoundID 97
|
||||
slideDoorS = SoundID 107
|
||||
metal6S :: SoundID
|
||||
metal6S = SoundID 98
|
||||
metal6S = SoundID 108
|
||||
autoGunS :: SoundID
|
||||
autoGunS = SoundID 99
|
||||
autoGunS = SoundID 109
|
||||
oldMachineBootS :: SoundID
|
||||
oldMachineBootS = SoundID 100
|
||||
oldMachineBootS = SoundID 110
|
||||
blood6S :: SoundID
|
||||
blood6S = SoundID 101
|
||||
blood6S = SoundID 111
|
||||
buzzS :: SoundID
|
||||
buzzS = SoundID 102
|
||||
buzzS = SoundID 112
|
||||
fireLoudS :: SoundID
|
||||
fireLoudS = SoundID 103
|
||||
fireLoudS = SoundID 113
|
||||
tap4S :: SoundID
|
||||
tap4S = SoundID 104
|
||||
tap4S = SoundID 114
|
||||
shotgunS :: SoundID
|
||||
shotgunS = SoundID 105
|
||||
shotgunS = SoundID 115
|
||||
sawtoothFailS :: SoundID
|
||||
sawtoothFailS = SoundID 106
|
||||
sawtoothFailS = SoundID 116
|
||||
miniS :: SoundID
|
||||
miniS = SoundID 107
|
||||
miniS = SoundID 117
|
||||
seagullWhistleS :: SoundID
|
||||
seagullWhistleS = SoundID 108
|
||||
seagullWhistleS = SoundID 118
|
||||
connectItemS :: SoundID
|
||||
connectItemS = SoundID 109
|
||||
connectItemS = SoundID 119
|
||||
whiteNoiseFadeInS :: SoundID
|
||||
whiteNoiseFadeInS = SoundID 110
|
||||
whiteNoiseFadeInS = SoundID 120
|
||||
gut1S :: SoundID
|
||||
gut1S = SoundID 111
|
||||
gut1S = SoundID 121
|
||||
|
||||
@@ -6,7 +6,6 @@ module Dodge.Wall.Damage (
|
||||
damageWall,
|
||||
) where
|
||||
|
||||
import Geometry.Vector
|
||||
import Dodge.Material.Damage
|
||||
import Dodge.Block
|
||||
import Dodge.Data.World
|
||||
@@ -25,7 +24,7 @@ damageWall dt wl w = case _wlStructure wl of
|
||||
_ -> w'
|
||||
where
|
||||
x = dt ^. dmAmount
|
||||
w' = damageMaterial dt (_wlMaterial wl) (argV $ uncurry (-) (_wlLine wl)) w
|
||||
w' = damageMaterial dt (_wlMaterial wl) (Right wl) w
|
||||
|
||||
-- block destruction is convoluted...
|
||||
maybeDestroyBlock :: Int -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user