Make block damages slightly more logical
This commit is contained in:
+2
-10
@@ -6,7 +6,7 @@ module Dodge.Update ( updateUniverse ) where
|
||||
import Dodge.Data
|
||||
import Dodge.Menu
|
||||
import Dodge.CullBox
|
||||
import Dodge.Block
|
||||
--import Dodge.Block
|
||||
import Dodge.Distortion
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Wall.Delete
|
||||
@@ -82,7 +82,7 @@ functionalUpdate cfig w = checkEndGame
|
||||
-- creatures should be updated early so that crOldPos is set before any position change
|
||||
. over creatures (fmap setOldPos)
|
||||
. updateCreatureGroups
|
||||
. updateBlocks
|
||||
-- . updateBlocks
|
||||
. updateWallDamages
|
||||
. updateSeenWalls
|
||||
-- . (youHammerPosition %~ moveHammerUp)
|
||||
@@ -168,14 +168,6 @@ updateIMl fim fup w = foldl' (flip $ dbArg fup) w (fim w)
|
||||
updateIMl' :: (World -> IM.IntMap a) -> (a -> World -> World) -> World -> World
|
||||
updateIMl' fim fup w = foldl' (flip fup) w (fim w)
|
||||
|
||||
updateBlocks :: World -> World
|
||||
updateBlocks w = foldr f w $ _blocks w
|
||||
where
|
||||
f bl w' = case _blHP bl of
|
||||
-- x | x < 1 -> splinterBlock bl w'
|
||||
x | x < 1 -> destroyBlock bl w'
|
||||
_ -> w'
|
||||
|
||||
-- | Note the explict use of record syntax. Using lens created a space leak.
|
||||
resetWorldEvents :: World -> World
|
||||
resetWorldEvents w = w {_worldEvents = id}
|
||||
|
||||
Reference in New Issue
Block a user