Split gasses and clouds
This commit is contained in:
@@ -8,10 +8,10 @@ import Geometry.Vector3D
|
||||
import LensHelp
|
||||
import Linear
|
||||
|
||||
cloudPoisonDamage :: Cloud -> World -> World
|
||||
cloudPoisonDamage :: Gas -> World -> World
|
||||
cloudPoisonDamage c w = foldl' (flip doDam) w (filter f $ crsNearPoint clpos w)
|
||||
where
|
||||
doDam cr =
|
||||
cWorld . lWorld . creatures . ix (_crID cr) . crDamage .:~ Poison 1
|
||||
f cr = dist3 (_crPos cr & _z +~ 20) (_clPos c) < crRad (cr ^. crType) + 20
|
||||
clpos = stripZ $ _clPos c
|
||||
f cr = dist3 (_crPos cr & _z +~ 20) (_gsPos c) < crRad (cr ^. crType) + 20
|
||||
clpos = stripZ $ _gsPos c
|
||||
|
||||
Reference in New Issue
Block a user