Refactor crPos to be a V3

This commit is contained in:
2025-10-10 13:47:31 +01:00
parent 98ece551c7
commit 49fb982877
58 changed files with 375 additions and 307 deletions
+2 -1
View File
@@ -6,11 +6,12 @@ import Dodge.Data.World
import Dodge.Zoning.Creature
import Geometry.Vector3D
import LensHelp
import Linear
cloudPoisonDamage :: Cloud -> 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 (addZ 20 $ _crPos cr) (_clPos c) < crRad (cr ^. crType) + 20
f cr = dist3 (_crPos cr & _z +~ 20) (_clPos c) < crRad (cr ^. crType) + 20
clpos = stripZ $ _clPos c