Add new chase crit sounds
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -46,6 +46,11 @@ chaseCrit = defaultCreature
|
|||||||
, _crInv = IM.fromList [(0,medkit 200)]
|
, _crInv = IM.fromList [(0,medkit 200)]
|
||||||
, _crMeleeCooldown = 0
|
, _crMeleeCooldown = 0
|
||||||
, _crFaction = ColorFaction green
|
, _crFaction = ColorFaction green
|
||||||
, _crVocalization = Vocalization seagullChatterS 50 0
|
, _crVocalization = Vocalization seagullChatterS
|
||||||
|
[seagullBarkS
|
||||||
|
,seagullChatterS,seagullWhistleS
|
||||||
|
,seagullWhistle1S
|
||||||
|
,seagullCryS
|
||||||
|
] 50 0
|
||||||
, _crMvType = defaultChaseMvType
|
, _crMvType = defaultChaseMvType
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ basicAwarenessUpdate cr = case _crAttentionDir $ _crPerception cr of
|
|||||||
Nothing -> id
|
Nothing -> id
|
||||||
| otherwise = id
|
| otherwise = id
|
||||||
|
|
||||||
|
-- TODO fold in randgen update, requires that this is a world to world function
|
||||||
chaseCritAwarenessUpdate :: World -> Creature -> Creature
|
chaseCritAwarenessUpdate :: World -> Creature -> Creature
|
||||||
chaseCritAwarenessUpdate w cr = case _crAttentionDir $ _crPerception cr of
|
chaseCritAwarenessUpdate w cr = case _crAttentionDir $ _crPerception cr of
|
||||||
Fixated i -> cr & crPerception . crAwarenessLevel
|
Fixated i -> cr & crPerception . crAwarenessLevel
|
||||||
@@ -76,23 +77,19 @@ chaseCritAwarenessUpdate w cr = case _crAttentionDir $ _crPerception cr of
|
|||||||
oldAwareness = _crAwarenessLevel $ _crPerception cr
|
oldAwareness = _crAwarenessLevel $ _crPerception cr
|
||||||
newAwareness = (IM.mapMaybe decreaseAwareness . IM.unionWith combineAwareness is) oldAwareness
|
newAwareness = (IM.mapMaybe decreaseAwareness . IM.unionWith combineAwareness is) oldAwareness
|
||||||
becomesCognizant = any isCognizant $ IM.unionWith cogRaised oldAwareness newAwareness
|
becomesCognizant = any isCognizant $ IM.unionWith cogRaised oldAwareness newAwareness
|
||||||
randBool = takeOne [False,True] & evalState $ _randGen w
|
--randBool = takeOne [False,True] & evalState $ _randGen w
|
||||||
thejitter = do
|
thejitter = do
|
||||||
p <- randInCirc 2
|
p <- randInCirc 2
|
||||||
return $ Move p
|
return $ Move p
|
||||||
maybeBark
|
maybeBark
|
||||||
| becomesCognizant && randBool = case vocalizationTest cr of
|
| becomesCognizant -- && randBool
|
||||||
Just soundid -> crActionPlan . crStrategy .~ StrategyActions WarningCry
|
&& cr ^? crVocalization . vcCoolDown == Just 0
|
||||||
[ImpulsesList ([Bark soundid]: replicate 20 [RandomImpulse thejitter]++
|
= let soundid = evalState (takeOne (_vcWarnings (_crVocalization cr))) (_randGen w)
|
||||||
[[ChangeStrategy $ CloseToMelee 0] ])
|
in crActionPlan . crStrategy .~ StrategyActions WarningCry
|
||||||
, AimAt 0 (_crPos $ _creatures w IM.! 0)
|
[ImpulsesList ([Bark soundid]: replicate 20 [RandomImpulse thejitter]++
|
||||||
]
|
[[ChangeStrategy $ CloseToMelee 0] ])
|
||||||
--[ImpulsesList [Bark soundid: replicate 20 (RandomImpulse thejitter)]
|
, AimAt 0 (_crPos $ _creatures w IM.! 0)
|
||||||
-- `DoActionThen` 20
|
]
|
||||||
-- `WaitThen` DoImpulses [ChangeStrategy $ CloseToMelee 0]
|
|
||||||
--, AimAt 0 (_crPos $ _creatures w IM.! 0)
|
|
||||||
--]
|
|
||||||
Nothing -> id
|
|
||||||
| otherwise = id
|
| otherwise = id
|
||||||
|
|
||||||
cogRaised :: AwarenessLevel -> AwarenessLevel -> AwarenessLevel
|
cogRaised :: AwarenessLevel -> AwarenessLevel -> AwarenessLevel
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ data Vocalization
|
|||||||
= Mute
|
= Mute
|
||||||
| Vocalization
|
| Vocalization
|
||||||
{_vcSound :: SoundID
|
{_vcSound :: SoundID
|
||||||
|
,_vcWarnings :: [SoundID]
|
||||||
,_vcMaxCoolDown :: Int
|
,_vcMaxCoolDown :: Int
|
||||||
,_vcCoolDown :: Int
|
,_vcCoolDown :: Int
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- generated at 2022-03-22 15:35:37.255279739 UTC
|
-- generated at 2022-05-19 12:29:16.87589614 UTC
|
||||||
module Dodge.SoundLogic.ExternallyGeneratedSounds where
|
module Dodge.SoundLogic.ExternallyGeneratedSounds where
|
||||||
import Sound.Data
|
import Sound.Data
|
||||||
soundToVol :: SoundID -> Float
|
soundToVol :: SoundID -> Float
|
||||||
@@ -40,39 +40,41 @@ soundToVol v = case _getSoundID v of
|
|||||||
34 -> 8000
|
34 -> 8000
|
||||||
35 -> 8000
|
35 -> 8000
|
||||||
36 -> 5000
|
36 -> 5000
|
||||||
37 -> 8000
|
37 -> 10000
|
||||||
38 -> 4000
|
38 -> 8000
|
||||||
39 -> 3000
|
39 -> 4000
|
||||||
40 -> 8000
|
40 -> 3000
|
||||||
41 -> 2000
|
41 -> 8000
|
||||||
42 -> 10000
|
42 -> 2000
|
||||||
43 -> 5000
|
43 -> 10000
|
||||||
44 -> 2000
|
44 -> 5000
|
||||||
45 -> 3000
|
45 -> 2000
|
||||||
46 -> 5000
|
46 -> 3000
|
||||||
47 -> 10000
|
47 -> 5000
|
||||||
48 -> 12000
|
48 -> 10000
|
||||||
49 -> 5000
|
49 -> 12000
|
||||||
50 -> 10000
|
50 -> 5000
|
||||||
51 -> 12000
|
51 -> 5000
|
||||||
52 -> 2000
|
52 -> 10000
|
||||||
53 -> 3000
|
53 -> 12000
|
||||||
54 -> 8000
|
54 -> 2000
|
||||||
55 -> 5000
|
55 -> 3000
|
||||||
56 -> 2000
|
56 -> 8000
|
||||||
57 -> 3000
|
57 -> 5000
|
||||||
58 -> 10000
|
58 -> 2000
|
||||||
59 -> 500
|
59 -> 3000
|
||||||
60 -> 10000
|
60 -> 10000
|
||||||
61 -> 3000
|
61 -> 500
|
||||||
62 -> 15000
|
62 -> 10000
|
||||||
63 -> 10000
|
63 -> 3000
|
||||||
64 -> 3000
|
64 -> 15000
|
||||||
65 -> 1000
|
65 -> 10000
|
||||||
66 -> 15000
|
66 -> 3000
|
||||||
67 -> 10000
|
67 -> 1000
|
||||||
68 -> 5000
|
68 -> 15000
|
||||||
69 -> 8000
|
69 -> 10000
|
||||||
|
70 -> 5000
|
||||||
|
71 -> 8000
|
||||||
_ -> 50
|
_ -> 50
|
||||||
soundToOnomato :: SoundID -> String
|
soundToOnomato :: SoundID -> String
|
||||||
soundToOnomato v = case _getSoundID v of
|
soundToOnomato v = case _getSoundID v of
|
||||||
@@ -113,39 +115,41 @@ soundToOnomato v = case _getSoundID v of
|
|||||||
34 -> "BRAP"
|
34 -> "BRAP"
|
||||||
35 -> "CRUMPLE"
|
35 -> "CRUMPLE"
|
||||||
36 -> "TRINKL"
|
36 -> "TRINKL"
|
||||||
37 -> "TAK"
|
37 -> "PEW"
|
||||||
38 -> "SMACK"
|
38 -> "TAK"
|
||||||
39 -> "DRR"
|
39 -> "SMACK"
|
||||||
40 -> "CRASH"
|
40 -> "DRR"
|
||||||
41 -> "SWSH"
|
41 -> "CRASH"
|
||||||
42 -> "CRAKLE"
|
42 -> "SWSH"
|
||||||
43 -> "CRTINK"
|
43 -> "CRAKLE"
|
||||||
44 -> "FHP"
|
44 -> "CRTINK"
|
||||||
45 -> "CHPCHPCHP"
|
45 -> "FHP"
|
||||||
46 -> "BIPBIPBIP"
|
46 -> "CHPCHPCHP"
|
||||||
47 -> "CHUGUGUG"
|
47 -> "BIPBIPBIP"
|
||||||
48 -> "BRPBRPBRP"
|
48 -> "CHUGUGUG"
|
||||||
49 -> "CHNKCHNKCHUNK"
|
49 -> "BRPBRPBRP"
|
||||||
50 -> "WRRR"
|
50 -> "CRUH"
|
||||||
51 -> "BRDBRDBRD"
|
51 -> "CHNKCHNKCHUNK"
|
||||||
52 -> "PHF"
|
52 -> "WRRR"
|
||||||
53 -> "BWAAH"
|
53 -> "BRDBRDBRD"
|
||||||
54 -> "BEP"
|
54 -> "PHF"
|
||||||
55 -> "HSSS"
|
55 -> "BWAAH"
|
||||||
56 -> "SHUHP"
|
56 -> "BEP"
|
||||||
57 -> "THUD"
|
57 -> "HSSS"
|
||||||
58 -> "WHSSH"
|
58 -> "SHUHP"
|
||||||
59 -> "HMM"
|
59 -> "THUD"
|
||||||
60 -> "BRAHCHCH"
|
60 -> "WHSSH"
|
||||||
61 -> "TIP"
|
61 -> "HMM"
|
||||||
62 -> "BANGG"
|
62 -> "BRAHCHCH"
|
||||||
63 -> "ZHM"
|
63 -> "TIP"
|
||||||
64 -> "TAP"
|
64 -> "BANGG"
|
||||||
65 -> "BLPCHCH"
|
65 -> "ZHM"
|
||||||
66 -> "BANG"
|
66 -> "TAP"
|
||||||
67 -> "CHUGUGUG"
|
67 -> "BLPCHCH"
|
||||||
68 -> "DEDA"
|
68 -> "BANG"
|
||||||
69 -> "CRISH"
|
69 -> "CHUGUGUG"
|
||||||
|
70 -> "DEDA"
|
||||||
|
71 -> "CRISH"
|
||||||
_ -> error "unitialised sound"
|
_ -> error "unitialised sound"
|
||||||
soundPathList :: [String]
|
soundPathList :: [String]
|
||||||
soundPathList =
|
soundPathList =
|
||||||
@@ -186,6 +190,7 @@ soundPathList =
|
|||||||
, "tap3.BRAP.8000.wav"
|
, "tap3.BRAP.8000.wav"
|
||||||
, "impact3.CRUMPLE.8000.wav"
|
, "impact3.CRUMPLE.8000.wav"
|
||||||
, "smallGlass1.TRINKL.5000.wav"
|
, "smallGlass1.TRINKL.5000.wav"
|
||||||
|
, "seagullWhistle1.PEW.10000.wav"
|
||||||
, "tap1.TAK.8000.wav"
|
, "tap1.TAK.8000.wav"
|
||||||
, "hit1.SMACK.4000.wav"
|
, "hit1.SMACK.4000.wav"
|
||||||
, "slideDoor.DRR.3000.wav"
|
, "slideDoor.DRR.3000.wav"
|
||||||
@@ -198,6 +203,7 @@ soundPathList =
|
|||||||
, "computerBeeping.BIPBIPBIP.5000.wav"
|
, "computerBeeping.BIPBIPBIP.5000.wav"
|
||||||
, "seagullChatter1.CHUGUGUG.10000.wav"
|
, "seagullChatter1.CHUGUGUG.10000.wav"
|
||||||
, "mini.BRPBRPBRP.12000.wav"
|
, "mini.BRPBRPBRP.12000.wav"
|
||||||
|
, "seagullCry.CRUH.5000.wav"
|
||||||
, "crankSlow.CHNKCHNKCHUNK.5000.wav"
|
, "crankSlow.CHNKCHNKCHUNK.5000.wav"
|
||||||
, "fireLoud.WRRR.10000.wav"
|
, "fireLoud.WRRR.10000.wav"
|
||||||
, "mini1.BRDBRDBRD.12000.wav"
|
, "mini1.BRDBRDBRD.12000.wav"
|
||||||
@@ -294,69 +300,73 @@ impact3S :: SoundID
|
|||||||
impact3S = SoundID 35
|
impact3S = SoundID 35
|
||||||
smallGlass1S :: SoundID
|
smallGlass1S :: SoundID
|
||||||
smallGlass1S = SoundID 36
|
smallGlass1S = SoundID 36
|
||||||
|
seagullWhistle1S :: SoundID
|
||||||
|
seagullWhistle1S = SoundID 37
|
||||||
tap1S :: SoundID
|
tap1S :: SoundID
|
||||||
tap1S = SoundID 37
|
tap1S = SoundID 38
|
||||||
hit1S :: SoundID
|
hit1S :: SoundID
|
||||||
hit1S = SoundID 38
|
hit1S = SoundID 39
|
||||||
slideDoorS :: SoundID
|
slideDoorS :: SoundID
|
||||||
slideDoorS = SoundID 39
|
slideDoorS = SoundID 40
|
||||||
impact1S :: SoundID
|
impact1S :: SoundID
|
||||||
impact1S = SoundID 40
|
impact1S = SoundID 41
|
||||||
knifeS :: SoundID
|
knifeS :: SoundID
|
||||||
knifeS = SoundID 41
|
knifeS = SoundID 42
|
||||||
elecCrackleS :: SoundID
|
elecCrackleS :: SoundID
|
||||||
elecCrackleS = SoundID 42
|
elecCrackleS = SoundID 43
|
||||||
smallGlass3S :: SoundID
|
smallGlass3S :: SoundID
|
||||||
smallGlass3S = SoundID 43
|
smallGlass3S = SoundID 44
|
||||||
whiteNoiseFadeInS :: SoundID
|
whiteNoiseFadeInS :: SoundID
|
||||||
whiteNoiseFadeInS = SoundID 44
|
whiteNoiseFadeInS = SoundID 45
|
||||||
reload1S :: SoundID
|
reload1S :: SoundID
|
||||||
reload1S = SoundID 45
|
reload1S = SoundID 46
|
||||||
computerBeepingS :: SoundID
|
computerBeepingS :: SoundID
|
||||||
computerBeepingS = SoundID 46
|
computerBeepingS = SoundID 47
|
||||||
seagullChatter1S :: SoundID
|
seagullChatter1S :: SoundID
|
||||||
seagullChatter1S = SoundID 47
|
seagullChatter1S = SoundID 48
|
||||||
miniS :: SoundID
|
miniS :: SoundID
|
||||||
miniS = SoundID 48
|
miniS = SoundID 49
|
||||||
|
seagullCryS :: SoundID
|
||||||
|
seagullCryS = SoundID 50
|
||||||
crankSlowS :: SoundID
|
crankSlowS :: SoundID
|
||||||
crankSlowS = SoundID 49
|
crankSlowS = SoundID 51
|
||||||
fireLoudS :: SoundID
|
fireLoudS :: SoundID
|
||||||
fireLoudS = SoundID 50
|
fireLoudS = SoundID 52
|
||||||
mini1S :: SoundID
|
mini1S :: SoundID
|
||||||
mini1S = SoundID 51
|
mini1S = SoundID 53
|
||||||
whiteNoiseFadeOutS :: SoundID
|
whiteNoiseFadeOutS :: SoundID
|
||||||
whiteNoiseFadeOutS = SoundID 52
|
whiteNoiseFadeOutS = SoundID 54
|
||||||
sineRaisePitchTwoSecS :: SoundID
|
sineRaisePitchTwoSecS :: SoundID
|
||||||
sineRaisePitchTwoSecS = SoundID 53
|
sineRaisePitchTwoSecS = SoundID 55
|
||||||
tone440S :: SoundID
|
tone440S :: SoundID
|
||||||
tone440S = SoundID 54
|
tone440S = SoundID 56
|
||||||
foamSprayLoopS :: SoundID
|
foamSprayLoopS :: SoundID
|
||||||
foamSprayLoopS = SoundID 55
|
foamSprayLoopS = SoundID 57
|
||||||
pickUpS :: SoundID
|
pickUpS :: SoundID
|
||||||
pickUpS = SoundID 56
|
pickUpS = SoundID 58
|
||||||
hitS :: SoundID
|
hitS :: SoundID
|
||||||
hitS = SoundID 57
|
hitS = SoundID 59
|
||||||
missileLaunchS :: SoundID
|
missileLaunchS :: SoundID
|
||||||
missileLaunchS = SoundID 58
|
missileLaunchS = SoundID 60
|
||||||
fridgeHumS :: SoundID
|
fridgeHumS :: SoundID
|
||||||
fridgeHumS = SoundID 59
|
fridgeHumS = SoundID 61
|
||||||
shotgunS :: SoundID
|
shotgunS :: SoundID
|
||||||
shotgunS = SoundID 60
|
shotgunS = SoundID 62
|
||||||
foot1S :: SoundID
|
foot1S :: SoundID
|
||||||
foot1S = SoundID 61
|
foot1S = SoundID 63
|
||||||
bangEchoS :: SoundID
|
bangEchoS :: SoundID
|
||||||
bangEchoS = SoundID 62
|
bangEchoS = SoundID 64
|
||||||
teleS :: SoundID
|
teleS :: SoundID
|
||||||
teleS = SoundID 63
|
teleS = SoundID 65
|
||||||
foot2S :: SoundID
|
foot2S :: SoundID
|
||||||
foot2S = SoundID 64
|
foot2S = SoundID 66
|
||||||
oldMachineBootS :: SoundID
|
oldMachineBootS :: SoundID
|
||||||
oldMachineBootS = SoundID 65
|
oldMachineBootS = SoundID 67
|
||||||
bangS :: SoundID
|
bangS :: SoundID
|
||||||
bangS = SoundID 66
|
bangS = SoundID 68
|
||||||
seagullChatterS :: SoundID
|
seagullChatterS :: SoundID
|
||||||
seagullChatterS = SoundID 67
|
seagullChatterS = SoundID 69
|
||||||
dedaS :: SoundID
|
dedaS :: SoundID
|
||||||
dedaS = SoundID 68
|
dedaS = SoundID 70
|
||||||
impact4S :: SoundID
|
impact4S :: SoundID
|
||||||
impact4S = SoundID 69
|
impact4S = SoundID 71
|
||||||
|
|||||||
Reference in New Issue
Block a user