Add damage origins
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user