Work on crab crit

This commit is contained in:
2026-04-08 23:47:22 +01:00
parent 77c0680bd5
commit 52d389f342
6 changed files with 230 additions and 186 deletions
+1
View File
@@ -68,6 +68,7 @@ walkCliffPush cr xs = pushAgainst (cr ^. crOldPos . _xy - cr ^. crOldOldPos . _x
groundCliffPush :: Creature -> [(Point2,Point2)] -> Point2
groundCliffPush cr xs = x *^ circSegsInside cxy r xs
where
-- at least 0.01 so that corpses don't hang on the edge of a cliff too long
x = max 0.01 $ 0.25 * (1 - dist cxy p / (2*r)) ** 2
cxy = cr ^. crPos . _xy
r = cr ^. crType . to crRad