This commit is contained in:
2025-06-20 21:57:07 +01:00
parent b2d64ce698
commit 0dfae3e5a9
2 changed files with 2 additions and 12 deletions
+2 -9
View File
@@ -4,7 +4,6 @@ module Dodge.Prop.Moving (
) where
import Dodge.Damage
import Dodge.Creature.Radius
import Dodge.Base
import Dodge.Data.World
import Geometry
@@ -19,16 +18,10 @@ fallSmallBounceDamage pr w =
p = _prPos pr
v = _prVel pr
dodamage
| _prPosZ pr < 25 = damageInCircle (return . const thedam) p 5
| _prPosZ pr < 25 = damageInCircle (const [thedam]) p 5
-- cWorld . lWorld . creatures . each %~ dodamage'
| otherwise = id
thedam = Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr)
dodamage' cr
| dist (_crPos cr) p < crRad (cr ^. crType) + 5 =
cr & crDamage
.:~ Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr) v
--(p -.- v) p (p +.+ v)
| otherwise = cr
thedam = Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr) v
fallSmallBounce :: Prop -> World -> World
fallSmallBounce pr w =