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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+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' :: Creature -> World -> World
checkDeath' cr w = case cr ^. crHP of checkDeath' cr w = case cr ^. crHP of
HP x | x > 0 -> w & tocr . crDamage .~ [] HP x | x > 0 -> w & tocr . crDamage .~ []
HP x HP x | x > -200 && _crDeathTimer cr > 0 ->
| x > -200 && _crDeathTimer cr < 5 ->
w w
& tocr . crDamage .~ [] & tocr . crDamage .~ []
& tocr . crDeathTimer +~ 1 & tocr . crDeathTimer -~ 1
HP _ -> HP _ ->
w w
& dropAll cr -- the order of these is possibly important & dropAll cr -- the order of these is possibly important
@@ -120,8 +119,7 @@ corpseOrGib cr = case cr ^? crDamage . to maxDamageType . _Just . _1 of
return $ return $
w w
& soundStart (CrMouth cid) (cr ^. crPos . _xy) sid Nothing & soundStart (CrMouth cid) (cr ^. crPos . _xy) sid Nothing
& randGen & randGen .~ g
.~ g
cid = cr ^. crID cid = cr ^. crID
sethp x = cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ x sethp x = cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ x
thecorpse = makeCorpse cr thecorpse = makeCorpse cr
+8 -1
View File
@@ -56,7 +56,14 @@ defaultDeathSounds = \case
CookDeath -> mempty CookDeath -> mempty
PoisonDeath -> mempty PoisonDeath -> mempty
PlainDeath -> mempty PlainDeath -> mempty
GibsDeath -> mempty GibsDeath ->
[gut1S
,gut2S
,gut3S
,gut4S
,gut5S
,gut6S
]
vocalizationTest :: Creature -> Maybe SoundID vocalizationTest :: Creature -> Maybe SoundID
vocalizationTest cr = case cr ^? crVocalization . vcCoolDown of vocalizationTest cr = case cr ^? crVocalization . vcCoolDown of
+2 -1
View File
@@ -53,7 +53,8 @@ defaultCreature =
-- , _crHammerPosition = HammerUp -- , _crHammerPosition = HammerUp
, _crName = "DEFAULTCRNAME" , _crName = "DEFAULTCRNAME"
-- , _crStatistics = CreatureStatistics 50 50 50 -- , _crStatistics = CreatureStatistics 50 50 50
, _crDeathTimer = 0 , _crDeathTimer = 5 -- how long a creature remains standing
-- after a killing blow has been dealt
} }
--defaultCreatureSkin :: CreatureType --defaultCreatureSkin :: CreatureType
+12 -11
View File
@@ -2800,15 +2800,16 @@ chaseCritInternal src/Dodge/Humanoid.hs 8;" f
chaseCritMv src/Dodge/Creature/ReaderUpdate.hs 121;" f chaseCritMv src/Dodge/Creature/ReaderUpdate.hs 121;" f
chaseCritPerceptionUpdate src/Dodge/Creature/Perception.hs 32;" f chaseCritPerceptionUpdate src/Dodge/Creature/Perception.hs 32;" f
chaseCritVocalization src/Dodge/Creature/ChaseCrit.hs 36;" f chaseCritVocalization src/Dodge/Creature/ChaseCrit.hs 36;" f
chasmRotate src/Dodge/Creature/Update.hs 161;" f chasmRotate src/Dodge/Creature/Update.hs 177;" f
chasmSimpleMaze src/Dodge/Room/Tutorial.hs 294;" f chasmSimpleMaze src/Dodge/Room/Tutorial.hs 294;" f
chasmSpitTerminal src/Dodge/Room/Tutorial.hs 265;" f chasmSpitTerminal src/Dodge/Room/Tutorial.hs 265;" f
chasmTest src/Dodge/Creature/Update.hs 142;" f chasmTestCorpse src/Dodge/Creature/Update.hs 158;" f
chasmTestLiving src/Dodge/Creature/Update.hs 139;" f
chasmWallToSurface src/Dodge/Base/Collide.hs 118;" f chasmWallToSurface src/Dodge/Base/Collide.hs 118;" f
checkCombineSelectionExists src/Dodge/DisplayInventory.hs 100;" f checkCombineSelectionExists src/Dodge/DisplayInventory.hs 100;" f
checkConnection src/Dodge/Inventory/Swap.hs 66;" f checkConnection src/Dodge/Inventory/Swap.hs 66;" f
checkDeath src/Dodge/Creature/Update.hs 77;" f checkDeath src/Dodge/Creature/Update.hs 78;" f
checkDeath' src/Dodge/Creature/Update.hs 80;" f checkDeath' src/Dodge/Creature/Update.hs 81;" f
checkEndGame src/Dodge/Update.hs 807;" f checkEndGame src/Dodge/Update.hs 807;" f
checkErrorGL src/Shader/Compile.hs 86;" f checkErrorGL src/Shader/Compile.hs 86;" f
checkFBO src/Framebuffer/Check.hs 6;" f checkFBO src/Framebuffer/Check.hs 6;" f
@@ -2927,7 +2928,7 @@ copierItemUpdate src/Dodge/Creature/State.hs 131;" f
copyItemToFloor src/Dodge/FloorItem.hs 14;" f copyItemToFloor src/Dodge/FloorItem.hs 14;" f
corDoor src/Dodge/Room/Room.hs 398;" f corDoor src/Dodge/Room/Room.hs 398;" f
cornerList src/Preload/Render.hs 236;" f cornerList src/Preload/Render.hs 236;" f
corpseOrGib src/Dodge/Creature/Update.hs 102;" f corpseOrGib src/Dodge/Creature/Update.hs 99;" f
corridor src/Dodge/Room/Corridor.hs 17;" f corridor src/Dodge/Room/Corridor.hs 17;" f
corridorBoss src/Dodge/LockAndKey.hs 133;" f corridorBoss src/Dodge/LockAndKey.hs 133;" f
corridorN src/Dodge/Room/Corridor.hs 57;" f corridorN src/Dodge/Room/Corridor.hs 57;" f
@@ -2972,7 +2973,7 @@ crShape src/Dodge/Creature/Shape.hs 8;" f
crSpring src/Dodge/Update.hs 914;" f crSpring src/Dodge/Update.hs 914;" f
crStratConMatches src/Dodge/Creature/Test.hs 80;" f crStratConMatches src/Dodge/Creature/Test.hs 80;" f
crStrength src/Dodge/Creature/Statistics.hs 29;" f crStrength src/Dodge/Creature/Statistics.hs 29;" f
crUpdate src/Dodge/Creature/Update.hs 70;" f crUpdate src/Dodge/Creature/Update.hs 71;" f
crUpdateInvidLocations src/Dodge/Inventory/Location.hs 66;" f crUpdateInvidLocations src/Dodge/Inventory/Location.hs 66;" f
crUpdateItemLocations src/Dodge/Inventory/Location.hs 48;" f crUpdateItemLocations src/Dodge/Inventory/Location.hs 48;" f
crVocalizationSound src/Dodge/Creature/Vocalization.hs 15;" f crVocalizationSound src/Dodge/Creature/Vocalization.hs 15;" f
@@ -3403,7 +3404,7 @@ drawZone src/Dodge/Debug/Picture.hs 152;" f
drawZoneCirc src/Dodge/Debug/Picture.hs 293;" f drawZoneCirc src/Dodge/Debug/Picture.hs 293;" f
drawZoneCol src/Dodge/Debug/Picture.hs 149;" f drawZoneCol src/Dodge/Debug/Picture.hs 149;" f
drawZoneNearPointCursor src/Dodge/Debug/Picture.hs 286;" f drawZoneNearPointCursor src/Dodge/Debug/Picture.hs 286;" f
dropAll src/Dodge/Creature/Update.hs 139;" f dropAll src/Dodge/Creature/Update.hs 136;" f
dropInventoryPath src/Dodge/HeldUse.hs 1346;" f dropInventoryPath src/Dodge/HeldUse.hs 1346;" f
dropItem src/Dodge/Creature/Action.hs 155;" f dropItem src/Dodge/Creature/Action.hs 155;" f
dropper src/Dodge/Item/Scope.hs 82;" f dropper src/Dodge/Item/Scope.hs 82;" f
@@ -4424,7 +4425,7 @@ pointerToItemID src/Dodge/Item/Location.hs 42;" f
pointerYourRootItem src/Dodge/Item/Location.hs 33;" f pointerYourRootItem src/Dodge/Item/Location.hs 33;" f
pointerYourSelectedItem src/Dodge/Item/Location.hs 26;" f pointerYourSelectedItem src/Dodge/Item/Location.hs 26;" f
pointsToPoly src/Geometry/ConvexPoly.hs 35;" f pointsToPoly src/Geometry/ConvexPoly.hs 35;" f
poisonSPic src/Dodge/Creature/Update.hs 135;" f poisonSPic src/Dodge/Creature/Update.hs 132;" f
poisonSprayer src/Dodge/Item/Held/SprayGuns.hs 17;" f poisonSprayer src/Dodge/Item/Held/SprayGuns.hs 17;" f
poke34 src/Shader/Poke.hs 509;" f poke34 src/Shader/Poke.hs 509;" f
pokeArrayOff src/Shader/Poke.hs 521;" f pokeArrayOff src/Shader/Poke.hs 521;" f
@@ -4792,7 +4793,7 @@ scaleSH src/Shape.hs 266;" f
scalp src/Dodge/Creature/Picture.hs 93;" f scalp src/Dodge/Creature/Picture.hs 93;" f
scancodeToHotkey src/Dodge/Creature/YourControl.hs 102;" f scancodeToHotkey src/Dodge/Creature/YourControl.hs 102;" f
scodeToChar src/Dodge/ScodeToChar.hs 6;" f scodeToChar src/Dodge/ScodeToChar.hs 6;" f
scorchSPic src/Dodge/Creature/Update.hs 132;" f scorchSPic src/Dodge/Creature/Update.hs 129;" f
screenBox src/Dodge/Base/Window.hs 54;" f screenBox src/Dodge/Base/Window.hs 54;" f
screenPolygon src/Dodge/Base/Window.hs 18;" f screenPolygon src/Dodge/Base/Window.hs 18;" f
screenPolygonBord src/Dodge/Base/Window.hs 28;" f screenPolygonBord src/Dodge/Base/Window.hs 28;" f
@@ -5371,7 +5372,6 @@ updateClouds src/Dodge/Update.hs 705;" f
updateCombinePositioning src/Dodge/DisplayInventory.hs 40;" f updateCombinePositioning src/Dodge/DisplayInventory.hs 40;" f
updateCombineSections src/Dodge/DisplayInventory.hs 47;" f updateCombineSections src/Dodge/DisplayInventory.hs 47;" f
updateCreature src/Dodge/Creature/Update.hs 37;" f updateCreature src/Dodge/Creature/Update.hs 37;" f
updateCreature' src/Dodge/Creature/Update.hs 46;" f
updateCreatureGroups src/Dodge/Update.hs 573;" f updateCreatureGroups src/Dodge/Update.hs 573;" f
updateCreatureSoundPositions src/Dodge/Update.hs 552;" f updateCreatureSoundPositions src/Dodge/Update.hs 552;" f
updateCreatureStride src/Dodge/Update.hs 347;" f updateCreatureStride src/Dodge/Update.hs 347;" f
@@ -5420,6 +5420,7 @@ updateLaser src/Dodge/Laser/Update.hs 11;" f
updateLasers src/Dodge/Update.hs 470;" f updateLasers src/Dodge/Update.hs 470;" f
updateLeftParentSF src/Dodge/Item/Grammar.hs 170;" f updateLeftParentSF src/Dodge/Item/Grammar.hs 170;" f
updateLinearShockwave src/Dodge/LinearShockwave/Update.hs 8;" f updateLinearShockwave src/Dodge/LinearShockwave/Update.hs 8;" f
updateLivingCreature src/Dodge/Creature/Update.hs 47;" f
updateLongPressInGame src/Dodge/Update/Input/InGame.hs 447;" f updateLongPressInGame src/Dodge/Update/Input/InGame.hs 447;" f
updateMachine src/Dodge/Machine/Update.hs 25;" f updateMachine src/Dodge/Machine/Update.hs 25;" f
updateMagnets src/Dodge/Update.hs 361;" f updateMagnets src/Dodge/Update.hs 361;" f
@@ -5434,7 +5435,7 @@ updateObjMapMaybe src/Dodge/Update.hs 578;" f
updatePastWorlds src/Dodge/Update.hs 459;" f updatePastWorlds src/Dodge/Update.hs 459;" f
updatePreload src/Preload/Update.hs 21;" f updatePreload src/Preload/Update.hs 21;" f
updateProjectile src/Dodge/Projectile/Update.hs 26;" f updateProjectile src/Dodge/Projectile/Update.hs 26;" f
updatePulse src/Dodge/Creature/Update.hs 168;" f updatePulse src/Dodge/Creature/Update.hs 184;" f
updatePulseBall src/Dodge/Update.hs 484;" f updatePulseBall src/Dodge/Update.hs 484;" f
updatePulseLaser src/Dodge/Update.hs 648;" f updatePulseLaser src/Dodge/Update.hs 648;" f
updatePulseLasers src/Dodge/Update.hs 479;" f updatePulseLasers src/Dodge/Update.hs 479;" f