Creature springs checks for heights
This commit is contained in:
@@ -139,6 +139,5 @@ hasAutoDoorBody :: Creature -> Bool
|
||||
hasAutoDoorBody cr = case cr ^. crHP of
|
||||
HP {} -> True
|
||||
CrIsCorpse {} -> True
|
||||
CrIsGibs -> False
|
||||
CrIsPitted -> False
|
||||
CrDestroyed {} -> False
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import ShapePicture.Data
|
||||
-- allow for knockbacks etc to be determined as well as intended movements
|
||||
updateCreature :: Creature -> World -> World
|
||||
updateCreature cr
|
||||
| cr ^. crPos . _z < negate 300 = (tocr . crHP .~ CrIsPitted) . destroyAllInvItems cr
|
||||
| cr ^. crPos . _z < negate 300 = (tocr . crHP .~ CrDestroyed Pitted) . destroyAllInvItems cr
|
||||
| CrIsCorpse _ <- cr ^. crHP = updateCarriage (_crID cr) . chasmTestCorpse cr
|
||||
| null (cr ^? crHP . _HP) = id
|
||||
| otherwise = updateLivingCreature cr
|
||||
@@ -143,7 +143,7 @@ corpseOrGib cr = case cr ^? crDamage . to maxDamageType . _Just . _1 of
|
||||
Just PhysicalDamage
|
||||
| _crPain cr > 200 ->
|
||||
makeCrGibs cr
|
||||
. sethp CrIsGibs
|
||||
. sethp (CrDestroyed Gibbed)
|
||||
. dodeathsound GibsDeath
|
||||
_ ->
|
||||
sethp (CrIsCorpse thecorpse)
|
||||
|
||||
Reference in New Issue
Block a user