Fix shockwave damage radius for walls
This commit is contained in:
@@ -23,23 +23,10 @@ moveShockwave w sw
|
||||
tFraction = fromIntegral t / fromIntegral (_swMaxTime sw)
|
||||
rad = r - (3 / 4) * r * tFraction
|
||||
doDams
|
||||
| (p ^. _z >= 0) && (p ^. _z < 25) = damageInCircle (Explosive dam) (p ^. _xy) rad
|
||||
| (p ^. _z >= 0) && (p ^. _z < 25)
|
||||
&& t > 5
|
||||
= damageInCircle (Explosive dam) (p ^. _xy) rad
|
||||
| otherwise = id
|
||||
-- doDams w' =
|
||||
-- over (cWorld . lWorld . creatures) (IM.map damCr) $
|
||||
-- foldl'
|
||||
-- (flip $ damageWall (Explosive 1000 p))
|
||||
-- w'
|
||||
-- hitBlocks
|
||||
-- hitBlocks = map snd . overlapCircWalls p rad $ wlsNearCirc p rad w
|
||||
-- -- this is not expansive enough
|
||||
-- damCr cr
|
||||
-- | _crID cr `elem` is || dist (_crPos cr) p >= rad + crRad (cr ^. crType) = cr
|
||||
-- | otherwise = cr & crDamage .:~ Explosive dam p
|
||||
|
||||
--where
|
||||
-- cpos = _crPos cr
|
||||
-- v = normalizeV (cpos -.- p)
|
||||
|
||||
moveInverseShockwave ::
|
||||
World ->
|
||||
|
||||
Reference in New Issue
Block a user