Handle machine damage/destruction during wall damage

This commit is contained in:
2026-02-11 17:59:08 +00:00
parent 38eef8fd54
commit af8f803404
3 changed files with 66 additions and 46 deletions
+6 -4
View File
@@ -24,11 +24,13 @@ import Sound.Data
updateMachine :: Machine -> World -> World
updateMachine mc
| _mcHP mc < 1 = destroyMachine mc
| otherwise =
mcApplyDamage (_mcDamage mc) mc
. mcPlaySound mc
= mcPlaySound mc
. mcTypeUpdate mc (_mcType mc)
-- | _mcHP mc < 1 = destroyMachine mc
-- | otherwise =
-- mcApplyDamage (_mcDamage mc) mc
-- . mcPlaySound mc
-- . mcTypeUpdate mc (_mcType mc)
mcTypeUpdate :: Machine -> MachineType -> World -> World
mcTypeUpdate mc = \case