Add damage origins

This commit is contained in:
2026-04-24 20:34:20 +01:00
parent 011286ccb5
commit e0e346aade
43 changed files with 535 additions and 449 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ 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
cWorld . lWorld . creatures . ix (_crID cr) . crDamage .:~ Poison 1 (c ^. gsOrigin)
f cr = dist3 (_crPos cr & _z +~ 20) (_gsPos c) < crRad (cr ^. crType) + 20
&& isJust (cr ^? crHP . _HP)
clpos = stripZ $ _gsPos c