This commit is contained in:
2025-06-14 23:16:29 +01:00
parent 02498e5abb
commit 078a3cc7ea
19 changed files with 29 additions and 60 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ setFromToDams bu p = case _buPayload bu of
damageThingHit :: Bullet -> (Point2, Either Creature Wall) -> World -> World
damageThingHit bu (p, crwl) = case crwl of
Left cr -> cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .++~ dams
Left cr -> cWorld . lWorld . creatures . ix (_crID cr) . crDamage .++~ dams
-- Right wl -> cWorld . lWorld . wallDamages %~ IM.insertWith (++) (_wlID wl) dams
-- hopefully the following doesn't introduce a space leak
Right wl -> cWorld . lWorld . wallDamages . at (_wlID wl) . non mempty <>~ dams