Refactor damages

This commit is contained in:
2025-06-07 14:26:00 +01:00
parent 7a192e7631
commit 81a7dcd962
24 changed files with 271 additions and 277 deletions
+1 -1
View File
@@ -14,6 +14,6 @@ cloudPoisonDamage c w = w & dodamagesto (filter f $ crsNearPoint clpos w)
dodamagesto scrs mcrs = foldl' (flip doDam) mcrs scrs
doDam cr =
cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage
.:~ Damage POISONDAM 1 clpos clpos clpos
.:~ Poison 1
f cr = dist3 (addZ 20 $ _crPos cr) (_clPos c) < crRad (cr ^. crType) + _clRad c + 10
clpos = stripZ $ _clPos c