Handle machine damage/destruction during wall damage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user