Simplify shockwave damages

This commit is contained in:
2025-06-23 18:15:28 +01:00
parent 4e008366f4
commit 54eab6dd9e
12 changed files with 468 additions and 457 deletions
+1 -6
View File
@@ -2,7 +2,7 @@
- Indestructible walls may still produce sparks, dust etc
-}
module Dodge.Wall.Damage (
damageBlocksBy,
-- damageBlocksBy,
damageWall,
) where
@@ -36,8 +36,3 @@ maybeDestroyDoor :: Int -> World -> World
maybeDestroyDoor drid w = case w ^? cWorld . lWorld . doors . ix drid of
Just dr | _drHP dr < 1 -> destroyDoor dr w
_ -> w
damageBlocksBy :: Int -> Wall -> World -> World
damageBlocksBy x wl = case wl ^? wlStructure . wsBlock of
Just blid -> cWorld . lWorld . blocks . ix blid . blHP -~ x
Nothing -> id
+1 -1
View File
@@ -1,4 +1,4 @@
module Dodge.Wall.Draw where
module Dodge.Wall.Draw (drawWall) where
import Dodge.Data.Wall
import Picture.Base