Add seagull sounds, remove random generator paramatricity for level gen
This commit is contained in:
@@ -54,6 +54,7 @@ chaseCrit = defaultCreature
|
||||
,seagullWhistle1S
|
||||
,seagullCryS
|
||||
,seagullCry1S
|
||||
,seagullCry2S
|
||||
] 50 0
|
||||
, _crMvType = defaultChaseMvType
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user