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
|
||||
|
||||
Reference in New Issue
Block a user