Creature springs checks for heights
This commit is contained in:
@@ -32,6 +32,7 @@ module Dodge.Base.Collide (
|
||||
anythingHitCirc,
|
||||
collide3WallsFloor,
|
||||
collide3,
|
||||
crHeight,
|
||||
) where
|
||||
|
||||
import Data.Foldable
|
||||
@@ -174,10 +175,13 @@ collide3Creature sp cr (ep, m) = fromMaybe (ep, m) $ do
|
||||
|
||||
crHeight :: Creature -> Maybe Float
|
||||
crHeight cr = case cr ^. crHP of
|
||||
HP{} -> Just 25
|
||||
HP{} -> Just $ case cr ^. crType of
|
||||
HoverCrit {} -> 10
|
||||
ChaseCrit {} -> 25
|
||||
Avatar {} -> 25
|
||||
_ -> error "Need to define crHeight for this crType"
|
||||
CrIsCorpse{} -> Just 5
|
||||
CrIsGibs -> Nothing
|
||||
CrIsPitted -> Nothing
|
||||
CrDestroyed{} -> Nothing
|
||||
|
||||
wallToSurface :: Wall -> (Point3, Point3, [(Point3, Point3)])
|
||||
wallToSurface wl = (g x, g $ vNormal (x - y), [(g x, g (y - x)), (g y, g (x - y))])
|
||||
|
||||
Reference in New Issue
Block a user