Gut sounds when gibbing
This commit is contained in:
@@ -81,11 +81,10 @@ checkDeath cid w = maybe id checkDeath' (w ^? cWorld . lWorld . creatures . ix c
|
||||
checkDeath' :: Creature -> World -> World
|
||||
checkDeath' cr w = case cr ^. crHP of
|
||||
HP x | x > 0 -> w & tocr . crDamage .~ []
|
||||
HP x
|
||||
| x > -200 && _crDeathTimer cr < 5 ->
|
||||
HP x | x > -200 && _crDeathTimer cr > 0 ->
|
||||
w
|
||||
& tocr . crDamage .~ []
|
||||
& tocr . crDeathTimer +~ 1
|
||||
& tocr . crDeathTimer -~ 1
|
||||
HP _ ->
|
||||
w
|
||||
& dropAll cr -- the order of these is possibly important
|
||||
@@ -120,8 +119,7 @@ corpseOrGib cr = case cr ^? crDamage . to maxDamageType . _Just . _1 of
|
||||
return $
|
||||
w
|
||||
& soundStart (CrMouth cid) (cr ^. crPos . _xy) sid Nothing
|
||||
& randGen
|
||||
.~ g
|
||||
& randGen .~ g
|
||||
cid = cr ^. crID
|
||||
sethp x = cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ x
|
||||
thecorpse = makeCorpse cr
|
||||
|
||||
@@ -56,7 +56,14 @@ defaultDeathSounds = \case
|
||||
CookDeath -> mempty
|
||||
PoisonDeath -> mempty
|
||||
PlainDeath -> mempty
|
||||
GibsDeath -> mempty
|
||||
GibsDeath ->
|
||||
[gut1S
|
||||
,gut2S
|
||||
,gut3S
|
||||
,gut4S
|
||||
,gut5S
|
||||
,gut6S
|
||||
]
|
||||
|
||||
vocalizationTest :: Creature -> Maybe SoundID
|
||||
vocalizationTest cr = case cr ^? crVocalization . vcCoolDown of
|
||||
|
||||
@@ -53,7 +53,8 @@ defaultCreature =
|
||||
-- , _crHammerPosition = HammerUp
|
||||
, _crName = "DEFAULTCRNAME"
|
||||
-- , _crStatistics = CreatureStatistics 50 50 50
|
||||
, _crDeathTimer = 0
|
||||
, _crDeathTimer = 5 -- how long a creature remains standing
|
||||
-- after a killing blow has been dealt
|
||||
}
|
||||
|
||||
--defaultCreatureSkin :: CreatureType
|
||||
|
||||
Reference in New Issue
Block a user