Stop instant creature death, allow for more overkill

This commit is contained in:
2024-12-23 15:54:01 +00:00
parent ca61ae0c64
commit 205c0a5c19
6 changed files with 95 additions and 82 deletions
+10
View File
@@ -80,6 +80,16 @@ checkDeath cr w
| _crHP cr > 0 =
w
& cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .~ []
| _crHP cr <= -200 =
w
& dropByState cr -- the order of
& removecr -- these is important
& stopSoundFrom (CrWeaponSound (_crID cr) 0)
& addCrGibs cr
| _crHP cr > -200 && _crDeathTimer cr < 5 =
w
& cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .~ []
& cWorld . lWorld . creatures . ix (_crID cr) . crDeathTimer +~ 1
| otherwise =
w
& dropByState cr -- the order of
+1
View File
@@ -69,6 +69,7 @@ data Creature = Creature
, _crHammerPosition :: HammerPosition
, _crName :: String
, _crStatistics :: CreatureStatistics
, _crDeathTimer :: Int
}
data CreatureCorpse = MakeDefaultCorpse
+1
View File
@@ -55,6 +55,7 @@ defaultCreature =
, _crHammerPosition = HammerUp
, _crName = "DEFAULTCRNAME"
, _crStatistics = CreatureStatistics 50 50 50
, _crDeathTimer = 0
}
defaultCreatureSkin :: CreatureType