Work on creature destruction/damage update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Update.Cloud (cloudPoisonDamage) where
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Foldable
|
||||
import Dodge.Creature.Radius
|
||||
import Dodge.Data.World
|
||||
@@ -15,4 +16,5 @@ cloudPoisonDamage c w = foldl' (flip doDam) w (filter f $ crsNearPoint clpos w)
|
||||
doDam cr =
|
||||
cWorld . lWorld . creatures . ix (_crID cr) . crDamage .:~ Poison 1
|
||||
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