Stop gibbed/pitted creatures from opening doors

This commit is contained in:
2026-03-23 22:59:35 +00:00
parent daba012e83
commit 7917192b77
6 changed files with 20 additions and 21 deletions
+9
View File
@@ -22,6 +22,7 @@ module Dodge.Creature.Test (
crHasTarget,
crStratConMatches,
crSafeDistFromTarg,
hasAutoDoorBody,
) where
import Linear
@@ -136,3 +137,11 @@ isAnimate :: Creature -> Bool
isAnimate cr = case _crActionPlan cr of
Inanimate -> False
_ -> True
hasAutoDoorBody :: Creature -> Bool
hasAutoDoorBody cr = case cr ^. crHP of
HP {} -> True
CrIsCorpse {} -> True
CrIsGibs -> False
CrIsPitted -> False