Improve creature turning wrt inertia

This commit is contained in:
2026-04-27 22:23:39 +01:00
parent f4c59612ea
commit 259325f81f
10 changed files with 206 additions and 160 deletions
+12 -5
View File
@@ -133,12 +133,19 @@ isAnimate :: Creature -> Bool
{-# INLINE isAnimate #-}
isAnimate cr = case _crActionPlan cr of
Inanimate -> False
SlimeIntelligence -> False
SlimeIntelligence -> True
ActionPlan{} -> True
hasAutoDoorBody :: Creature -> Bool
hasAutoDoorBody cr = case cr ^. crHP of
HP {} -> True
CrIsCorpse {} -> True
CrDestroyed {} -> False
hasAutoDoorBody cr = crittype && notdestroyed
where
notdestroyed = case cr ^. crHP of
HP {} -> True
CrIsCorpse {} -> True
CrDestroyed {} -> False
crittype = case cr ^. crType of
SlimeCrit {} -> False
BeeCrit {} -> False
HiveCrit {} -> False
_ -> True