Stop instant creature death, allow for more overkill
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -69,6 +69,7 @@ data Creature = Creature
|
||||
, _crHammerPosition :: HammerPosition
|
||||
, _crName :: String
|
||||
, _crStatistics :: CreatureStatistics
|
||||
, _crDeathTimer :: Int
|
||||
}
|
||||
|
||||
data CreatureCorpse = MakeDefaultCorpse
|
||||
|
||||
@@ -55,6 +55,7 @@ defaultCreature =
|
||||
, _crHammerPosition = HammerUp
|
||||
, _crName = "DEFAULTCRNAME"
|
||||
, _crStatistics = CreatureStatistics 50 50 50
|
||||
, _crDeathTimer = 0
|
||||
}
|
||||
|
||||
defaultCreatureSkin :: CreatureType
|
||||
|
||||
Reference in New Issue
Block a user