Cleanup barrels

This commit is contained in:
2025-06-14 23:08:11 +01:00
parent 5286485d62
commit 02498e5abb
14 changed files with 352 additions and 353 deletions
+5 -2
View File
@@ -39,9 +39,12 @@ updateEnergyBall w eb
| _ebTimer eb <= 0 = (w, Nothing)
| otherwise =
( ebEffect eb . ebFlicker eb $ damageCircle (_ebPos eb) (_ebEff eb) w
, Just $ eb & ebTimer -~ 1 & ebPos .~ bp & ebVel .~ 0.85 * bv
, Just $ eb & ebTimer -~ 1 & ebPos .~ bp & ebVel .~ drag * bv
)
where
drag = case eb ^. ebEff of
ExplosiveBall -> 0.9
_ -> 0.85
p = eb ^. ebPos + eb ^. ebVel
(bp, bv) = fromMaybe (p, eb ^. ebVel) $ bouncePoint (const True) 0 (eb ^. ebPos) p w
@@ -95,7 +98,7 @@ ebColor eb = case eb ^. ebEff of
IncendiaryBall{} -> red
FlameletBall{} -> red
ElectricalBall{} -> cyan
ExplosiveBall -> yellow
ExplosiveBall -> white
FlashBall -> white
damageCircle :: Point2 -> EnergyBallType -> World -> World