Work on chase crit animations, eating dead bees

This commit is contained in:
2026-05-28 22:55:52 +01:00
parent eb817d34ef
commit 03f83fc924
12 changed files with 541 additions and 370 deletions
+17
View File
@@ -34,6 +34,7 @@ module Dodge.Base.Collide (
collide3WallsFloor,
collide3,
crHeight,
crMid,
) where
import AesonHelp
@@ -194,6 +195,22 @@ crHeight cr = case cr ^. crHP of
CrIsCorpse{} -> 5
AvatarDestroyed{} -> 0
crMid :: Creature -> Float
crMid cr = case cr ^. crHP of
HP{} -> case cr ^. crType of
HoverCrit {} -> 2
ChaseCrit {} -> 20
Avatar {} -> 20
CrabCrit {} -> 20
SlinkCrit {} -> 20
SlimeCrit {_slimeSlime = r} -> max 3 . min 20 $ 2 * slimeToRad r - 5
BeeCrit {} -> 2
HiveCrit {} -> 20
BarrelCrit{} -> 20
_ -> error $ "Need to define crHeight for this crType:\n" <> unlines (prettyShort (cr ^. crType))
CrIsCorpse{} -> 2
AvatarDestroyed{} -> 0
wallToSurface :: Wall -> (Point3, Point3, [(Point3, Point3)])
wallToSurface wl = (g x, g $ vNormal (x - y), [(g x, g (y - x)), (g y, g (x - y))])
where