Creature springs checks for heights
This commit is contained in:
@@ -31,7 +31,7 @@ updateExpBarrel ps cr w = case cr ^. crHP of
|
||||
HP _ ->
|
||||
w
|
||||
& makeExplosionAt ((cr ^. crPos) & _z +~ 20) 0
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrIsGibs
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrDestroyed Gibbed
|
||||
_ -> w
|
||||
where
|
||||
f w' p = makeSpark NormalSpark (p + normalizeV p + cr ^. crPos . _xy) (argV p) w'
|
||||
@@ -44,7 +44,7 @@ updateExpBarrel ps cr w = case cr ^. crHP of
|
||||
updateBarrel :: Creature -> World -> World
|
||||
updateBarrel cr = case cr ^. crHP of
|
||||
HP x | x > 0 -> doDamage (cr ^. crID)
|
||||
HP _ -> cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrIsGibs
|
||||
HP _ -> cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrDestroyed Gibbed
|
||||
_ -> id
|
||||
|
||||
damsToExpBarrel :: [Damage] -> Creature -> Creature
|
||||
|
||||
Reference in New Issue
Block a user