Gut sounds when gibbing

This commit is contained in:
2026-02-10 23:40:04 +00:00
parent ed86d310d5
commit e608664f11
10 changed files with 25 additions and 18 deletions
+3 -5
View File
@@ -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