Add seagull sounds, remove random generator paramatricity for level gen

This commit is contained in:
2022-05-19 17:56:45 +01:00
parent 40fc6792ae
commit 887dd547d9
10 changed files with 147 additions and 138 deletions
+1
View File
@@ -54,6 +54,7 @@ chaseCrit = defaultCreature
,seagullWhistle1S
,seagullCryS
,seagullCry1S
,seagullCry2S
] 50 0
, _crMvType = defaultChaseMvType
}
+3 -1
View File
@@ -18,6 +18,7 @@ import Sound.Data
import Control.Monad.State
import Data.Maybe
import Control.Lens
import System.Random
import qualified Data.IntMap.Strict as IM
import qualified Data.Map.Strict as M
@@ -85,8 +86,9 @@ chaseCritAwarenessUpdate w cr = case _crAttentionDir $ _crPerception cr of
| becomesCognizant -- && randBool
&& cr ^? crVocalization . vcCoolDown == Just 0
= let soundid = evalState (takeOne (_vcWarnings (_crVocalization cr))) (_randGen w)
numjits = fst $ randomR (15,25) (_randGen w)
in crActionPlan . crStrategy .~ StrategyActions WarningCry
[ImpulsesList ([Bark soundid]: replicate 20 [RandomImpulse thejitter]++
[ImpulsesList ([Bark soundid]: replicate numjits [RandomImpulse thejitter]++
[[ChangeStrategy $ CloseToMelee 0] ])
, AimAt 0 (_crPos $ _creatures w IM.! 0)
]