Split gasses and clouds

This commit is contained in:
2025-12-02 21:47:17 +00:00
parent 984a114310
commit b2cb8cfe11
11 changed files with 262 additions and 192 deletions
+3 -3
View File
@@ -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